If you want a process or event subprocess to start when
a message is received, use a Start Message Event in your business
process definition (BPD) or inside your event subprocess.
About this task
For example, you may want an employee on-boarding
process to start when a record for each new employee is created in
your HR system. When the record is created, the system sends an event
to IBM® Business Process Manager. IBM BPM captures
the event and starts the follow-on steps for each new employee such
as setting up the necessary space and computer equipment, requesting
and creating a security badge, and so on.
When modeling
start message events, you should be aware of the following:
- The general information that applies to all types of message events
covered in Modeling message events .
- When a message is received by a start message event (specifying
that an incoming message is to start a process at run time), a new
instance of the process is created and a unique BPD instance ID is
assigned to it.
- If you use multiple start message events in a single BPD, use
a separate undercover agent for each. If you use the same undercover
agent for multiple start message events, IBM BPM instantiates
multiple instances of the BPD.
- In your BPD or event subprocess, drag a Start Event component
from the palette onto the diagram.
- Click the Implementation option in the properties.
- Click the drop-down list and select Message from
the Start Event types.
- In the Message Trigger section, click Select next
to the Attached UCA field to select an existing
undercover agent.
To create an undercover agent, click New.
See Undercover agents.
Note: Ensure
that the sender and receiver of the message both use the same undercover
agent. For example, if the sender of the message is a message end
event in another BPD, then select the same undercover agent for both
the receiving start event and the sending message end event in the
other BPD.
- In the Condition text box, type a JavaScript expression
if you want to define conditions under which the message event is
processed.
If you do specify a condition and the condition
evaluates to true, the message is accepted and processing continues.
If the condition evaluates to false, processing stops. In most cases,
special message conditions are not necessary.
- Enable the Consume Message check
box if you want the incoming message to be consumed after it has been
received by the message event. Refer to the bulleted list in Modeling message events to learn more about message consumption.
- The Durable Subscription check box
is not available for start message events, only for intermediate message
events as described in the following section.
- Click the Data Mapping option in the properties.
- Map one or more of the listed undercover agent output
variables to appropriate input variables when you want their runtime
values passed to the BPD instance.
For example, if the
start message event starts an instance of an on-boarding process when
an employee record is created in your HR system, you can map the employee
information from the undercover agent to a local variable in the BPD.
If
your start message event is inside an event subprocess, you must select
a variable to be used for correlating process instances. Correlation
allows IBM BPM to
identify the process instance that the message is meant for.
For
example, an employee number might be used to uniquely identify a given
instance of an on-boarding process. Selecting this variable for correlation
ensures that when the data related to a given employee number is passed
to the event subprocess, the appropriate instance of the on-boarding
process is found.