180 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
5.4.1 Where we are in the process: Building Stage 2 of the base scenario
The diagram in Figure 5-5 is intended to provide an overview of where we are within the key
steps involved to build Stage 2 of the base scenario. This focuses on adding storage
capabilities to DB2, incorporating Web services, modifying the JSPs and adding an approval
workflow.
As a starting point, we created a copy in the J2EE project from the servlet
(SubmissionServlet1) and all JSPs and gave them new names (SubmissionServlet,
dirlisting.jsp and similar). We did this so that we could continue work on the created code
structures without destroying the Stage 1 application.
Figure 5-5 Overview of major steps involved in building Stage 2 of base scenario application
5.4.2 Servlet Access to form data (prepopulation / data retrieval)
While Web service integration is a good choice for runtime data exchange during work in a
form opened in the Forms viewer, data prepopulation and retrieval is done on server side
before the form is presented to the end user and after a submitted form is received on the
server. Both actions are basically an access to the form available as a file or a stream.
There are two different access methods:
Access through Workplace Forms API
Access by text parsing
In this redbook we provide both techniques. In the servlet context we use API based methods
only. For Domino integration we discuss the text parsing methods as well. Both scenarios will
access the form in form open event (filling a template with initial data on first open) and data
extraction on form submit.
-Creating tables
-Populating
tables
-Form pre-
population
-Extraction of
form data
-Reading form
data from DB2
DB2 / Data
Storage
1
2
3
Servlet
Access to
Forms
Building the Base Scenario – Stage 2
Web
Services
-Common
scenario for
web services
in forms
-Web Service
Development
-Web Service
Runtime
-Modifying
index1.jsp
-Creating
JSP to view
DB2 data
4
Adjustments
to JSPs
-Importing
WSDL file
-Calling Web
Services
5
Form pre-
population w/
Web
Services
6
Approval
Workflow
-Designing
-Workflow