152 Patterns: Serial and Parallel Processes
9.3 General design guidelines
In this scenario, it is acceptable to have a user initiate a short-running process
and await a response when the process completes. Precautions need to be
taken to ensure that the process does not stop during execution. If any
exceptions occur during the processing, the process should complete and the
response from the process should indicate that there was some form of failure.
For a short-running process, timeouts must be included on all of the activities to
ensure that the process does not get stranded.
In this Serial Process pattern scenario, there is no human intervention other than
from the order clerk who initiates the process. We can assume that the order
clerk will launch the process when he submits an order and that he will receive a
response when the order process is completed.
9.3.1 Design overview
This scenario is an implementation of the Process-focused Application
Integration::Serial Process pattern.
For information about the Serial Process Application pattern see:
3.4.6, “Serial Process Application pattern” on page 55
For information about the Serial Process Runtime pattern see:
5.1.1, “Serial Process Runtime pattern” on page 84
Process or workflow?
The term
process is used throughout this redbook to generically describe a
business process. A process may or may not contain human interaction.
The term
workflow is taken to mean a long-running process. A distinction of a
workflow or long-running process is that it persists process instance data
within the process manager’s database during the execution of the process. A
workflow may or may not include human interaction.
A
short-running process can be defined as a process that contains all
automated steps and will complete in a very short period of time. Contrary to a
long-running process, a short-running process does not persist any process
instance data. A WebSphere Process Choreographer non-interruptible
process falls into the category of a short-running process.
Chapter 9. Creating serial processes 153
For information about the Product mappings of the Serial Process Runtime
pattern see:
5.2.1, “Serial Process Product mappings” on page 93
This scenario is an implementation of Stage One of the ITSO Electronics
integration project. For information about the use case and actors used in Stage
I, see:
6.2.1, “Stage One: Internal ordering on demand” on page 110
9.3.2 Design considerations
We recommend that you consider the following design considerations when
planning any type of process implementation:
򐂰 Synchronous verses asynchronous process invocation
򐂰 The need for human interaction in processes
򐂰 Rules engines
򐂰 Security
򐂰 The impact of performance and capacity analysis
򐂰 Audit trail
Synchronous verses asynchronous process invocation
Most process managers support the two basic process invocation methods:
򐂰 synchronous invocation
򐂰 asynchronous invocation
A synchronous invocation of a process means that a response is not returned
from the process manager until the process completes (Figure 9-2 on page 154).
However, the completion of the process does not mean that it completed
successfully. The reply needs to be inspected to determine the success or failure
of the process.
154 Patterns: Serial and Parallel Processes
Figure 9-2 Synchronous process invocation
An asynchronous invocation of a process receives an immediate response, but
this response only indicates whether the process instance was started
successfully or not (Figure 9-3). Depending on the process manager, a response
may or may not be sent back to the user at the completion of the process.
Figure 9-3 Asynchronous process invocation
Choosing an invocation method
The characteristics of the two process invocation methods are used to determine
which method to choose for a given process template.
A synchronous invocation should usually be chosen when the following
circumstances are true:
򐂰 The process is short-running.
򐂰 The calling application will receive a response in a reasonable amount of
time.
򐂰 The user who has invoked the process expects to wait for a response.
Start Process
Request
Process Complete
Response
Start Process
Request
Process Started
Successfully Response

Get Patterns: Serial and Parallel Processes for Process Choreography and Workflow now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.