Participant Element

Use the participant element to define a participant in the business process, or to reference a participant within a simple activity. The participant element is used in the operation activity and with the produce and consume elements.

In the business process or a simple activity, the participant element defines a static participant that must be named using the name attribute. The definition can include annotations, metadata, and extension elements.

How the business process communicates with the participant and applies the proper security restrictions is left to the implementation. Use extension elements to provide implementation details.

The following sample operation refers to the online bookseller scenario example discussed in the previous sections, where the bookseller Process Customer Book Order process contacts the Inventory service to determine whether a book is in stock.

The participant, output, and input elements are required and must be in the line number order shown in the following example. Follow the specification for each line in the example exactly.

1
<operation name='User Name'>
2
<participant name='InventoryService' />
3
<output message='checkStockRequest'>
4
<assign to='ISBN'>1-56592-488-6</assign>
5
</output>
6
<input message='checkStockResponse'>
7
<assign to='foundBook' from='InStock' />
8
</input>
9
</operation>

The following list describes the elements and activities of each line in the BPML:

1
Type of activity is an operation. Supplying a name for the operation activity is optional.
Note: This name has no impact when running the business process, but the GPM uses it as a label.
2
Operation activity communicates with a participant. The participant element in this line identifies the participant with which this operation is associated. For Sterling B2B Integrator, the name attribute must match the name of an installed service, service instance, or service configuration. In this case, the name identifies the Inventory service.
3
Output element contains the information to send to the service. The message attribute is required in BPML, because a participant can perform different tasks, depending on the different messages it receives.

For example, when the inventory service receives a checksStockRequest message, it determines an item is in stock. A restockItemRequest message prompts the inventory system to restock the item.

4
An assign element within the output element provides the required information for the output message.

For example, if the business process and participant communicate through a message, the message attribute of the output element specifies the title, checkStockRequest. The assign element on line no. 4 specifies the first line of the message, ISBN = 1-56592-488-6. Each additional assign element in that output element adds another line to the message.

5
Ends the output element.
6
Within an output element, an input element identifies the response the process expects from the participant. When the participant receives the message written by the process, the participant responds with a return message that the input element reads. The message attribute of the input element identifies the name and type of the return message expected from the participant. Because a participant can send more than one type of message, a message attribute is required for the input element. The message attribute indicates which message is expected.
7
The assign attribute in an input element differs from the assign attribute in the output element. In the input element, the assign attribute reads information from the message and writes that information in the process data.

For example, if the book for which the process performs a stock check is available, the InventoryService response message contains a line similar to InStock = true.

The assign element within the input element writes the value from the InStock line to the process data. The InStock line includes an identifier written to the process data.

In the bookseller example, the value from the InStock line is true, so the line written to the process data would be similar to foundBook = true.

8
Ends the input element.
9
Ends the operation activity.