Because the toolkit supports mixed business processes (ones based on operations
and ones based on flow processors), you do not need to create shell operations
that merely delegate its business process to a specific flow processor instance.
Within the toolkit's support for operations, the request handler creates the
processor contexts and formats to support the business process using the ProcessorExternalizer.
The request handler implementation for supporting HTML clients is a good example
of this behavior because it uses both externalizers (ProcessorExternalizer
and OperationExternalizer) when creating the operations.
To create a proper design for implementing operations within processors,
consider the following:
- How the application server handles requests from different channels.
- Whether the request handler is compatible with existing operations.
- Whether the definition policy is for isolating channel-dependent responsibilities
from the reusable parts and, if so, how to remove channel-specific functionality
from operations and processors so that they are reusable.
With these considerations in mind, you want to define operation processors
according to their responsibilities. The following strategies may help you
in deciding how to implement these processors:
- Define operation processors with the appropriate client/server request
and reply formats needed by Java™ clients. The logic of these processors
is fully reusable by any other channel (see the refFlow attribute of the processor
definition) but a request handler for the standard Java client/server requires two additional
formats to access the business logic directly. In this case, the request and
reply formats are channel-specific. Furthermore, the processor can be HTTP-specific
and include the Java request and reply formats while reusing the flow
processor instances of other channels.
- Define operation processors that handle channel-specific tasks for a channel
server operations. The processor definitions include the channel-specific
request and reply format definitions. These server operations handle tasks
specific to the presentation channel, whereas the internal business operations
or processors are fully channel-independent. The server operations can, however,
instantiate an internal business operation or processor, map the received
data to an internal entity context, and execute an reusable internal business
flow. For Java clients, this approach to handling channel-specific
tasks can coexist with the infrastructure provided for HTML client support.
For HTML clients, the operation processor is the intermediary between the
request handler and the processor that provides the navigation flow. The operation
processor eventually invokes a reusable internal business flow (an operation).
For Java clients,
specific server operations are the intermediaries between the request handler
and a reusable operation.