IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Modeling events > Modeling message events

Use start message events

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.

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 BPM. 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:


Procedure

  1. In your BPD or event subprocess, drag a Start Event component from the palette onto the diagram.

  2. Click the Implementation option in the properties.

  3. Click the drop-down list and select Message from the Start Event types.

  4. 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 Understanding and using undercover agents.

    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.

  5. 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.

  6. 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.

  7. The Durable Subscription check box is not available for start message events, only for intermediate message events as described in the following section.

  8. Click the Data Mapping option in the properties.
  9. 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.

Modeling message events