Using intermediate message events and message end events to send messages

You can include an intermediate message event in your business process definition (BPD) when you want to model a message event that is sent during execution of a process, or a message end event when you want to send a message at an end of a path.
For example, you might want to call an external service or to send a message to be received by the start event in another process or processes. Message events can be included in the process flow, which is connected with sequence lines. Intermediate message events have both incoming and outgoing sequence flows, while message end events have only incoming sequence flows.
Tip: When you add message events in a BPD, you should be aware of the general information in Modeling message events that applies to all types of message events.

Before you begin

To perform this task, you must be in the IBM® Process Designer desktop editor.

Procedure

  1. Open the Process Designer desktop editor.
  2. Open a BPD and drag an intermediate or end event from the palette onto the BPD diagram.
  3. In the text box that displays over the event, type a name for the event.
  4. Use the Sequence Flow tool to connect the event as needed.
  5. In the diagram, select the new event.
  6. On the Properties tab, click Implementation. The default implementation for intermediate events that are included in the process flow is Message. If you are creating a message end event, select Message end event as the implementation type.
  7. If you are creating an intermediate message event, select Sending from the available message types in the drop-down list. By default, all message end events are sending message end events.
  8. In the Message Trigger section, complete one of the following actions.
    • To select an existing undercover agent, click Select next to the Attached Message UCA field.
    • To create an undercover agent, click New. See Undercover agents.
    Important: The sender and receiver of the message must 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 intermediate event and the sending message end event in the other BPD.
    Tip: Undercover agents must have a schedule type of On Event to function as a message trigger. Plus, the service that is attached to the selected undercover agent must have one or more input variables so that it can pass and correlate information from the event.
  9. If you created an end event, specify the input mapping.
    1. On the Properties tab, click Data Mapping.
    2. Open the Input section.
    3. Map each input variable to a local variable in the BPD. For each variable, select it then complete one of the following actions.
      • Click the variable selector icon to map each input variable to a local variable in the BPD.
      • Enter a literal value or the name of a local variable.
      • To use the default value from the variable, click Use default. When you enable this check box, the variable selector icon is disabled.