8: Defining a Counter (Container
Operation)
To determine whether all the bookings were successful or not, you want to compare the number of booking messages with the number of confirmation messages in a later step in the business process.
To do so, in the process container, define an element as a counter for the booking messages sent. Also, define a container operation that increases the count by 1 for each message sent.
...
1. To define the container element in the process container, click an empty point in the editing area (ensure no block is selected).
2. Define the container element for the counter as follows:
¡ Name: MsgCount
¡ Category: XSD Simple Type
¡ Type: xsd:integer
¡ Container: shows Process
3.
Insert a
container operation (
) after the send
step.
4. Enter IncreaseCount as the step name.
5. To increase the MsgCount message counter by 1 each time a message is sent, define the step properties as follows:
a. Double-click Target, and then in the expression editor, select Simple Variable followed by MsgCount.
b. In the Operation field, select Assign.
c. Double-click Expression, and then in the expression editor, select Simple Variable followed by MsgCount.
d. In the Operator field, select +.
e. Double-click Expression and define the constant 1:
i. In the expression editor, select Constant.
ii. Enter the value 1.
iii. In the Type field, select xsd:integer.
See also: