In this example, the Java(TM) client is within a browser that has
the Java plug-in
and starts the client application. This is one of many possible implementations
for a Java client
but it makes the example independent of the virtual machine provided by the
browser. The startup applet launches the XML Desktop. Once the desktop is
available, the navigation controller and the actions configured for the visual
components control the view navigation and which business processes the user
requests. The flow processor is an implementation of the Automaton (a state
machine) that controls what happens when user's actions reach the server in
the application presentation layer.
The application presentation layer and application logic layer run on WebSphere(R) Business
Integration Server Foundation so that the example can show how the application
logic layer uses the work area and Process Choreographer features of that
edition.
- The user requests a customer search and provides the required input data:
- The user clicks a desktop button to search for a particular customer's
data.
- The search button has an associated operation panel. The panel contains
a set of entry fields for the search criteria and a list field.
- The user enters the required data. The operation panel enables the OK
button only when the user has typed values in all mandatory fields.
- When the user clicks OK, the client creates the customer search client
operation and creates a context for it. The client then chains it to an upper
level context. The client operation may identify the parent or the toolkit
may use the default context of the client/server session as the parent.
- The client operation checks that the operation context contains the data
needed to process the operation. This validation is a cross-field validation.
If data is missing, the client operation may execute a local service or send
a request to a remote server. The client operation unformats the data resulting
from executing the service and places the unformatted data in the operation
context.
- The client sends the client operation to the server using the multichannel
support component.
- The application presentation layer sends the customer search request to
the application logic layer.
- In the server, the servlet acting as the request handler receives the
customer search operation.
- The request handler calls the Bean Invoker Factory to get the invoker
for the customer search operation.
- The request handler uses a formatter to populate the request
with data from the context.
- The request handler places the session ID in the work area.
- The invoker makes an EJB call to the to Business Process Component
on the application logic layer to execute the customer search process.
- The application logic layer executes the business process:
- The Business Process Component receives the request and retrieves the
session ID from the work area. Note that a previous process (typically a logon
process) has created the session and the session CHA context.
- The Business Process Component creates a CHA context to hold the process
data and chains the process context to the session context.
- The Business Process Component performs the process using the Process
Choreographer.
- The Process Choreographer performs the activities of the process such
as performing a search in the customer database and logging the search in
an electronic journal.
- The Business Process Component creates the response message and formats
the data resulting from the search into the response message.
- The Business Process Component sends the response back the presentation
server.
- The client view displays a list of customers matching the search criteria:
- The flow processor unformats the response into the process context. The
flow processor broadcasts an event so that the navigation controller is aware
that the customer search process has completed and its data is available.
- The navigation controller updates the Customer Search panel with the response
data (in this case, a list of customers that match the provided search criteria).