BPMN elements are used to model processes and include other models created within a project into a process definition.
A process must always contain at least one start event as they define how a process begins.
The types of start event are:
Start events are where the trigger is unspecified for starting a process. The trigger can be using a form, manually through the Digital Workspace, using the REST API or from atrigger.
The basic properties for a start event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the start event. This is system generated and cannot be altered, for exampleStartEvent_1w29b3h. |
| Name | Optional. The name of the start event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the start event does. |
An optionalform can be used to begin a process. The form must exist within the same project as the process definition to be selected. Select a form from the dropdown, else create a new form using the+ symbol.
Once a form has been selected, it can be edited using theOpen Form symbol.
The mapping type sets how data is passed between the start event and the process. There arefive options for how to send this data. The default value isDon’t map variables. For form widgets and form variables you can add static values. For example you can pass a form variable calledpath which can be a file location or URL.
Start events are displayed as a single thin circle without an icon inside.
An example of the XML of a start event without a form defined is:
<bpmn2:startEvent name="FormStart_4"><bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing></bpmn2:startEvent>An example of the XML of a start event with a form defined is:
<bpmn2:startEvent name="FormStart_4" activiti:formKey="form-4ccd023b-d607-4cab-8623-da4c87dd9611"><bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing></bpmn2:startEvent>Note: The
activiti:formKeyis theidof the form used to start the process.
Error start events can only be used inevent sub-processes. They begin an event sub-processes when a named error is received.
The basic properties for an error start event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the error start event. This is system generated and cannot be altered, for exampleStartEvent_1w29b3h. |
| Name | Optional. The name of the error start event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the error start event does. |
An optionalform can be used to begin a process. The form must exist within the same project as the process definition to be selected. Select a form from the dropdown, else create a new form using the+ symbol.
Once a form has been selected, it can be edited using theOpen Form symbol.
The mapping type sets how data is passed between the error start event and the process. There arefive options for how to send this data. The default value isSend no variables.
An error needs to be defined for the error start event to catch. A previously createdError can be selected from the dropdown in its properties, or a new one created using the+ symbol. AnError name andError code can then be set.
Error events are used to model an exception in a business process. Errors are thrown by error end events and caught by error start events and error boundary events.
TheerrorRef property in theerrorEventDefinition of an error event element will match against theid of an error when viewing theXML Editor.
Error events are displayed as a lightning bolt icon inside different shapes that differentiate between the event types. A solid lightning bolt represents a throwing event, whilst a hollow lightning bolt represents a catching event.
To create a new error use the+ symbol against an error event such as a start error event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Errors button will be visible in the right-hand properties panel.
Error start events are displayed as a single thin circle with a hollow lightning bolt icon inside.
An example of the XML of an error start event is:
<bpmn2:startEvent><bpmn2:errorEventDefinition errorRef="Error_0vbkbeb" /></bpmn2:startEvent>An example of the XML of an error is:
<bpmn2:error name="payment-failed-error" errorCode="404" />Message start events begin a process instance when a named message is received.
The basic properties for a message start event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the message start event. This is system generated and cannot be altered, for exampleStartEvent_1w29b3h. |
| Name | Optional. The name of the message start event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the message start event does. |
An optionalform can be used to begin a process. The form must exist within the same project as the process definition to be selected. Select a form from the dropdown, else create a new form using the+ symbol.
Once a form has been selected, it can be edited using theOpen Form symbol.
The mapping type sets how data is passed between the message start event and the process. There arefive options for how to send this data. The default value isSend no variables.
A message needs to be defined for the message start event to catch when it is thrown. A previously createdMessage can be selected from the dropdown in its properties, or a new one created using the+ symbol. AMessage name and payload can then be set.
Messages have a name and contain a payload. They are sent by message throwing events and received by message catching events in a 1:1 relationship between throw events and catch events. Messages contain a payload known as a message payload and can be passed between scopes, for example between two different process definitions within the same diagram that are separated by differentpools.
The messageid property of a message is matched against themessageRef property in the corresponding throw and catch message elements when viewing theXML Editor.
To create a new message use the+ symbol against a message event such as a message boundary event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Messages button will be visible in the right-hand properties panel.
Message events are displayed as an envelope icon inside different shapes that differentiate between the event types. A solid envelope represents a throwing event, whilst a hollow envelope represents a catching event.
Message payloads contain a set of values that are sent from a throwing event and received by a catching event.
Message payloads can only be created on a message throw event and contain one or more properties that have aname,type andvalue. The property types for payloads are:
| Type | Description |
|---|---|
| String | A sequence of characters, for example#Mint-Ice-Cream-4! |
| Integer | A positive whole number, for example642 |
| Boolean | A value of eithertrue orfalse |
| Date | A specific date in the formatYYYY-MM-DD, for example2020-04-22 |
| Variable | A value passed from aprocess variable. |
The receiving message catch event is then used to map the received values in the payload to process variables in its own scope.
Message payload mappings can be viewed in theExtensions Editor of a process diagram. Throwing events are mapped asinputs and catching events are mapped asoutputs from an event.
Message events can optionally contain a correlation key. If a correlation key is present then when a message is thrown it uses theactiviti:correlationKey value and themessageRef of the throwing event to match against the same two properties in a catching event. If only one property is matched then the message will not be caught.
Using aprocess variable for the correlation key in a throwing event and a static value for its corresponding catching event allows for the message to only be caught in specific circumstances.
Note: Message start events cannot contain a correlation key unless they are used in asub process.
When messages are used between two differentpools the sequence flow that connects them is a dotted line called a message flow. The message flow is part of thecollaboration element in the XML created by introducing a pool. Message flows reference the throwing message event as thesourceRef and the catching message event as thetargetRef.
Message start events are displayed as a single thin circle with a hollow envelope icon inside.
An example of the XML of a message start event is:
<bpmn2:startEvent><bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing><bpmn2:messageEventDefinition messageRef="Message_15xakkk" /></bpmn2:startEvent>An example of the XML of a message is:
<bpmn2:message name="Message_15xakkk" />An example of the XML of a message payload is:
"mappings": { "EndEvent_0ss2fp3": { "inputs": { "name": { "type": "variable", "value": "username" }, "order-number": { "type": "value", "value": 1459283 } } } },An example of the XML of a message with a correlation key is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_1hxecs2" activiti:correlationKey="${userId}" />In this example the message will only be caught if a catching event has amessageRef ofMessage_1hxecs2 and anactiviti:correlationKey that matches the value ofuserId.
An example of the XML of a message flow is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /><bpmn2:messageFlow sourceRef="Event_00acemq" targetRef="Event_13u5jtf" /></bpmn2:collaboration>Signal start events begin a process instance using a caught, named signal.
The basic properties for a signal start event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the signal start event. This is system generated and cannot be altered, for exampleStartEvent_1w29b3h. |
| Name | Optional. The name of the signal start event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the signal start event does. |
A signal needs to be defined for the signal start event to catch. A previously usedSignal can be selected from the dropdown in its properties, or a new one created using the+ symbol. ASignal name can then be set.
Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Signal events can be either catching or throwing. A throwing signal event will emit a signal when it is reached in a process instance that will be picked up by any catching signal event with a matching signal name. Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Theid of a signal will match against thesignalRef of a catching or throwing event.
Signal events are displayed as a triangle icon inside different shapes that differentiate between the event types. A solid triangle represents a throwing event, whilst a hollow triangle represents a catching event.
Signal start events are displayed as a single thin circle with a hollow triangle icon inside.
An example of the XML of a signal start event is:
<bpmn2:startEvent><bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> <bpmn2:signalEventDefinition signalRef="Signal_0hnsd2r" /></bpmn2:startEvent>An example of the XML of a signal with a global scope is:
<bpmn2:signal name="Signal_0hnsd2r" />An example of the XML of a signal with a process instance scope is:
<bpmn2:signal name="Signal_0hnsd2r" activiti:scope="processInstance" />Timer start events begin a process at a specific time once or repeatedly at intervals.
The basic properties for a timer start event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the timer start event. This is system generated and cannot be altered, for exampleStartEvent_1w29b3h. |
| Name | Optional. The name of the timer start event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the timer start event does. |
An optionalform can be used to begin a process. The form must exist within the same project as the process definition to be selected. Select a form from the dropdown, else create a new form using the+ symbol.
Once a form has been selected, it can be edited using theOpen Form symbol.
The mapping type sets how data is passed between the timer start event and the process. There arefive options for how to send this data. The default value isSend no variables.
A choice of timer must be set for timer start events, based on aCycle,Date orDuration.
Timer events are used to influence events at specific times, after a set amount of time has passed or at intervals. All timer events use the international standardISO 8601 for specifying time formats.
Note: All properties within
timerEventDefinitioncan accept process variables as their values as long as they are in ISO 8601 or cron expression format.
Timer events are displayed as a clock icon inside different shapes that differentiate between the event types.
ThetimeDate property for timer events defines a specific date and time in ISO 8601 format for when the trigger will be fired and can include a specified time zone.
The following is an example of thetimerEventDefinition using atimeDate:
2017-05-17 represents the 17th May 2017 inYYYY-MM-DD formatT12:42:23 represents the time of 12:42:23 inhh:mm:ss formatZ represents that the time format is in UTC (Coordinated Universal Time). The time can also contain UTC offsets such as+01 for an hour ahead of UTC. When an offset is defined theZ is not required, for example:T12:42:23+01ThetimeDuration property for timer events defines how long a timer should wait in ISO 8601 format before the trigger is fired.
The following are the letters used to refer to duration:
| Letter | Description |
|---|---|
P | Designates that the following letters and numbers represent a duration. Must always be present |
Y | Represents a year and follows the number of years, for exampleP2Y is 2 years |
M | Represents a month and follows the number of months when preceded by aP, for exampleP3Y4M is 2 years and 4 months |
W | Represents a week and follows the number of weeks, for exampleP10W for 10 weeks |
D | Represents a day and follows the number of days, for exampleP1Y1M1D for 1 year, 1 month and 1 day |
T | Designates that the following letters represent a duration of hours to seconds. Must always be present to refer to hours, minutes and seconds |
H | Represents an hour and follows the number of hours, for exampleP1DT0.5H for 1 day and half an hour |
M | Represents a minute and follows the number of minutes when preceded by aT, for examplePT1M for 1 minute |
S | Represents a second and follows the number of seconds, for exampleP2Y3M4DT5H6M7S for 2 years, 3 months, 4 days, 5 hours, 6 minutes and 7 seconds |
ThetimeCycle property for timer events defines intervals for the trigger to fire at. Intervals can be defined using the time intervals that adhere to the ISO 8601 standard or by using cron expressions.
Time intervals use the syntaxR/ to set a number of repetitions, for exampleR5/ would repeat five times.
Following the repetition, a duration can be set for when the repetition occurs, for exampleR5/PT10H would repeat every 10 hours, five times.
Note The duration uses the same format as for
timeDuration.
An optional end date can also be set after the duration and separated by a/.
Note: The end date uses the same format as for
timeDate.
Cron expressions can also be used to define repeating triggers for timer events.
Timer start events are displayed as a single thin circle with a clock icon inside.
An example of the XML of a timer start event is:
<bpmn2:startEvent> <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> <timerEventDefinition> <timeCycle xsi:type="bpmn2:tFormalExpression">R10/2020-12-10T13:00/PT12H</timeCycle> </timerEventDefinition></bpmn2:startEvent>Note: This will start the process 10 times, at 12 hour intervals starting on the 10th December 2020.
An example of the XML fortimeDate is:
<bpmn2:timerEventDefinition> <bpmn2:timeDate xsi:type="bpmn2:tFormalExpression">2017-05-17T12:42:23Z</bpmn2:timeDate></bpmn2:timerEventDefinition>An example of the XML fortimeDuration is:
<bpmn2:timerEventDefinition> <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">P5D</bpmn2:timeDuration></bpmn2:timerEventDefinition>Note: This represents a duration of 5 days.
An example of the XML fortimeCycle using time interval syntax is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression">R3/PT30M</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents three repetitions every 30 minutes.
An example of the XML fortimeCycle using a cron expression is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle>0 0/5 * * * ?</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents a trigger firing every 5 minutes beginning at the top of the hour.
End events indicate where the current process flow ends, therefore there can be no outgoingsequence flow from an end event. Different types of end event can have have actions other than just ending the process flow execution path.
The types of end event are:
End events complete the process flow with no additional behavior.
The basic properties for an end event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the end event. This is system generated and cannot be altered, for exampleEndEvent_00ln22h. |
| Name | Optional. The name of the end event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the end event does. |
End events are displayed as a single thick circle without an icon inside.
An example of the XML of an end event is:
<bpmn2:endEvent> <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming></bpmn2:endEvent>Error end events throw an error when the process flow reaches them.
The basic properties for an error end event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the error end event. This is system generated and cannot be altered, for exampleEndEvent_00ln22h. |
| Name | Optional. The name of the error end event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the error end event does. |
An error needs to be defined for the error end event to throw. A previously createdError can be selected from the dropdown in its properties, or a new one created using the+ symbol. AnError name andError code can then be set.
Error events are used to model an exception in a business process. Errors are thrown by error end events and caught by error start events and error boundary events.
TheerrorRef property in theerrorEventDefinition of an error event element will match against theid of an error when viewing theXML Editor.
Error events are displayed as a lightning bolt icon inside different shapes that differentiate between the event types. A solid lightning bolt represents a throwing event, whilst a hollow lightning bolt represents a catching event.
To create a new error use the+ symbol against an error event such as a start error event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Errors button will be visible in the right-hand properties panel.
Error end events are displayed as a single thick circle with a solid lightning bolt icon inside.
An example of the XML of an error end event is:
<bpmn2:endEvent> <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming> <bpmn2:errorEventDefinition errorRef="Error_3vbkafg" /></bpmn2:endEvent>An example of the XML of an error is:
<bpmn2:error name="payment-failed-error" errorCode="404" />Message end events complete the process flow and send a message event.
The basic properties for a message end event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the message end event. This is system generated and cannot be altered, for exampleEndEvent_00ln22h. |
| Name | Optional. The name of the message end event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the message end event does. |
A message needs to be defined for the message end event to send. A previously createdMessage can be selected from the dropdown in its properties, or a new one created using the+ symbol. AMessage name and payload can then be set.
Messages have a name and contain a payload. They are sent by message throwing events and received by message catching events in a 1:1 relationship between throw events and catch events. Messages contain a payload known as a message payload and can be passed between scopes, for example between two different process definitions within the same diagram that are separated by differentpools.
The messageid property of a message is matched against themessageRef property in the corresponding throw and catch message elements when viewing theXML Editor.
To create a new message use the+ symbol against a message event such as a message boundary event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Messages button will be visible in the right-hand properties panel.
Message events are displayed as an envelope icon inside different shapes that differentiate between the event types. A solid envelope represents a throwing event, whilst a hollow envelope represents a catching event.
Message payloads contain a set of values that are sent from a throwing event and received by a catching event.
Message payloads can only be created on a message throw event and contain one or more properties that have aname,type andvalue. The property types for payloads are:
| Type | Description |
|---|---|
| String | A sequence of characters, for example#Mint-Ice-Cream-4! |
| Integer | A positive whole number, for example642 |
| Boolean | A value of eithertrue orfalse |
| Date | A specific date in the formatYYYY-MM-DD, for example2020-04-22 |
| Variable | A value passed from aprocess variable. |
The receiving message catch event is then used to map the received values in the payload to process variables in its own scope.
Message payload mappings can be viewed in theExtensions Editor of a process diagram. Throwing events are mapped asinputs and catching events are mapped asoutputs from an event.
Message events can optionally contain a correlation key. If a correlation key is present then when a message is thrown it uses theactiviti:correlationKey value and themessageRef of the throwing event to match against the same two properties in a catching event. If only one property is matched then the message will not be caught.
Using aprocess variable for the correlation key in a throwing event and a static value for its corresponding catching event allows for the message to only be caught in specific circumstances.
Note: Message start events cannot contain a correlation key unless they are used in asub process.
When messages are used between two differentpools the sequence flow that connects them is a dotted line called a message flow. The message flow is part of thecollaboration element in the XML created by introducing a pool. Message flows reference the throwing message event as thesourceRef and the catching message event as thetargetRef.
Message end events are displayed as a single thick circle with a solid envelope icon inside.
An example of the XML of a message end event is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_1</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_45sdihj" /></bpmn2:endEvent>An example of the XML of a message is:
<bpmn2:message name="Message_15xakkk" />An example of the XML of a message payload is:
"mappings": { "EndEvent_0ss2fp3": { "inputs": { "name": { "type": "variable", "value": "username" }, "order-number": { "type": "value", "value": 1459283 } } } },An example of the XML of a message with a correlation key is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_1hxecs2" activiti:correlationKey="${userId}" />In this example the message will only be caught if a catching event has amessageRef ofMessage_1hxecs2 and anactiviti:correlationKey that matches the value ofuserId.
An example of the XML of a message flow is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /><bpmn2:messageFlow sourceRef="Event_00acemq" targetRef="Event_13u5jtf" /></bpmn2:collaboration>Terminate end events cause the current process scope to be immediately ended, including any parallel process flows. The scope is determined by the location of the terminate end event. If the terminate end event is in asub-process orcall activity, only the sub-process or call activity instance will be ended, not the parent or originating process instance. In the case of a multi-instance sub-process or call activity only a single instance will be ended.
The basic properties for a terminate end event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the terminate end event. This is system generated and cannot be altered, for exampleEndEvent_00ln22h. |
| Name | Optional. The name of the terminate end event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the terminate end event does. |
Terminate end events are displayed as a single thick circle with a solid circle inside.
An example of the XML of a terminate end event is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_1</bpmn2:incoming><bpmn2:terminateEventDefinition/></bpmn2:endEvent>Intermediate events can be used at any point throughout a process. They always provide additional behavior such as throwing a signal or catching a timer.
The types of intermediate event are:
Message intermediate catching events cause the process flow to wait until the message named in themessageRef property is received before it proceeds.
The basic properties for a message intermediate catch event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the message intermediate catch event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the message intermediate catch event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the message intermediate catch event does. |
A message needs to be defined for the message intermediate catch event to catch. A previously createdMessage can be selected from the dropdown in its properties, or a new one created using the+ symbol. AMessage name and payload can then be set.
Messages have a name and contain a payload. They are sent by message throwing events and received by message catching events in a 1:1 relationship between throw events and catch events. Messages contain a payload known as a message payload and can be passed between scopes, for example between two different process definitions within the same diagram that are separated by differentpools.
The messageid property of a message is matched against themessageRef property in the corresponding throw and catch message elements when viewing theXML Editor.
To create a new message use the+ symbol against a message event such as a message boundary event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Messages button will be visible in the right-hand properties panel.
Message events are displayed as an envelope icon inside different shapes that differentiate between the event types. A solid envelope represents a throwing event, whilst a hollow envelope represents a catching event.
Message payloads contain a set of values that are sent from a throwing event and received by a catching event.
Message payloads can only be created on a message throw event and contain one or more properties that have aname,type andvalue. The property types for payloads are:
| Type | Description |
|---|---|
| String | A sequence of characters, for example#Mint-Ice-Cream-4! |
| Integer | A positive whole number, for example642 |
| Boolean | A value of eithertrue orfalse |
| Date | A specific date in the formatYYYY-MM-DD, for example2020-04-22 |
| Variable | A value passed from aprocess variable. |
The receiving message catch event is then used to map the received values in the payload to process variables in its own scope.
Message payload mappings can be viewed in theExtensions Editor of a process diagram. Throwing events are mapped asinputs and catching events are mapped asoutputs from an event.
Message events can optionally contain a correlation key. If a correlation key is present then when a message is thrown it uses theactiviti:correlationKey value and themessageRef of the throwing event to match against the same two properties in a catching event. If only one property is matched then the message will not be caught.
Using aprocess variable for the correlation key in a throwing event and a static value for its corresponding catching event allows for the message to only be caught in specific circumstances.
Note: Message start events cannot contain a correlation key unless they are used in asub process.
When messages are used between two differentpools the sequence flow that connects them is a dotted line called a message flow. The message flow is part of thecollaboration element in the XML created by introducing a pool. Message flows reference the throwing message event as thesourceRef and the catching message event as thetargetRef.
Message intermediate catching events are displayed as two thin concentric circles with a hollow envelope icon inside.
An example of the XML of a message intermediate catch events is:
<bpmn2:intermediateCatchEvent><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> <bpmn2:messageEventDefinition messageRef="Message_6" /></bpmn2:intermediateCatchEvent>An example of the XML of a message is:
<bpmn2:message name="Message_15xakkk" />An example of the XML of a message payload is:
"mappings": { "EndEvent_0ss2fp3": { "inputs": { "name": { "type": "variable", "value": "username" }, "order-number": { "type": "value", "value": 1459283 } } } },An example of the XML of a message with a correlation key is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_1hxecs2" activiti:correlationKey="${userId}" />In this example the message will only be caught if a catching event has amessageRef ofMessage_1hxecs2 and anactiviti:correlationKey that matches the value ofuserId.
An example of the XML of a message flow is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /><bpmn2:messageFlow sourceRef="Event_00acemq" targetRef="Event_13u5jtf" /></bpmn2:collaboration>Message intermediate throw events send the message event named in themessageRef property when the process flow reaches them.
The basic properties for a message intermediate throw event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the message intermediate throw event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the message intermediate throw event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the message intermediate throw event does. |
A message needs to be defined for the message intermediate throw event to catch. A previously createdMessage can be selected from the dropdown in its properties, or a new one created using the+ symbol. AMessage name and payload can then be set.
Messages have a name and contain a payload. They are sent by message throwing events and received by message catching events in a 1:1 relationship between throw events and catch events. Messages contain a payload known as a message payload and can be passed between scopes, for example between two different process definitions within the same diagram that are separated by differentpools.
The messageid property of a message is matched against themessageRef property in the corresponding throw and catch message elements when viewing theXML Editor.
To create a new message use the+ symbol against a message event such as a message boundary event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Messages button will be visible in the right-hand properties panel.
Message events are displayed as an envelope icon inside different shapes that differentiate between the event types. A solid envelope represents a throwing event, whilst a hollow envelope represents a catching event.
Message payloads contain a set of values that are sent from a throwing event and received by a catching event.
Message payloads can only be created on a message throw event and contain one or more properties that have aname,type andvalue. The property types for payloads are:
| Type | Description |
|---|---|
| String | A sequence of characters, for example#Mint-Ice-Cream-4! |
| Integer | A positive whole number, for example642 |
| Boolean | A value of eithertrue orfalse |
| Date | A specific date in the formatYYYY-MM-DD, for example2020-04-22 |
| Variable | A value passed from aprocess variable. |
The receiving message catch event is then used to map the received values in the payload to process variables in its own scope.
Message payload mappings can be viewed in theExtensions Editor of a process diagram. Throwing events are mapped asinputs and catching events are mapped asoutputs from an event.
Message events can optionally contain a correlation key. If a correlation key is present then when a message is thrown it uses theactiviti:correlationKey value and themessageRef of the throwing event to match against the same two properties in a catching event. If only one property is matched then the message will not be caught.
Using aprocess variable for the correlation key in a throwing event and a static value for its corresponding catching event allows for the message to only be caught in specific circumstances.
Note: Message start events cannot contain a correlation key unless they are used in asub process.
When messages are used between two differentpools the sequence flow that connects them is a dotted line called a message flow. The message flow is part of thecollaboration element in the XML created by introducing a pool. Message flows reference the throwing message event as thesourceRef and the catching message event as thetargetRef.
Message intermediate throwing events are displayed as two thin concentric circles with a solid envelope icon inside.
An example of the XML of a message intermediate throw events is:
<bpmn2:intermediateThrowEvent><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> <bpmn2:messageEventDefinition messageRef="Message_6" /></bpmn2:intermediateThrowEvent>An example of the XML of a message is:
<bpmn2:message name="Message_15xakkk" />An example of the XML of a message payload is:
"mappings": { "EndEvent_0ss2fp3": { "inputs": { "name": { "type": "variable", "value": "username" }, "order-number": { "type": "value", "value": 1459283 } } } },An example of the XML of a message with a correlation key is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_1hxecs2" activiti:correlationKey="${userId}" />In this example the message will only be caught if a catching event has amessageRef ofMessage_1hxecs2 and anactiviti:correlationKey that matches the value ofuserId.
An example of the XML of a message flow is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /><bpmn2:messageFlow sourceRef="Event_00acemq" targetRef="Event_13u5jtf" /></bpmn2:collaboration>Signal intermediate catching events cause the process flow to wait until the signal named in thesignalRef property is received before it proceeds.
The basic properties for a signal intermediate catch event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the signal intermediate catch event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the signal intermediate catch event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the signal intermediate catch event does. |
A signal needs to be defined for the signal intermediate catch event to catch. A previously usedSignal can be selected from the dropdown in its properties, or a new one created using the+ symbol. ASignal name can then be set.
Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Signal events can be either catching or throwing. A throwing signal event will emit a signal when it is reached in a process instance that will be picked up by any catching signal event with a matching signal name. Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Theid of a signal will match against thesignalRef of a catching or throwing event.
Signal events are displayed as a triangle icon inside different shapes that differentiate between the event types. A solid triangle represents a throwing event, whilst a hollow triangle represents a catching event.
Signal intermediate catching events are displayed as two thin concentric circles with a hollow triangle icon inside.
An example of the XML of a signal intermediate catch events is:
<bpmn2:intermediateCatchEvent><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> <bpmn2:signalEventDefinition signalRef="Signal_0hnsd2r" /></bpmn2:intermediateCatchEvent>An example of the XML of a signal with a global scope is:
<bpmn2:signal name="Signal_0hnsd2r" />An example of the XML of a signal with a process instance scope is:
<bpmn2:signal name="Signal_0hnsd2r" activiti:scope="processInstance" />Signal intermediate throw events are events that emit a signal when they are reached in the process flow. The signal that is emitted is then caught by any catching signal events with a name matching the signal that was thrown.
The basic properties for a signal intermediate throw event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the signal intermediate throw event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the signal intermediate throw event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the signal intermediate throw event does. |
A signal needs to be defined for the signal intermediate throw event to emit when it is reached. A previously usedSignal can be selected from the dropdown in its properties, or a new one created using the+ symbol. ASignal name can then be set.
Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Signal events can be either catching or throwing. A throwing signal event will emit a signal when it is reached in a process instance that will be picked up by any catching signal event with a matching signal name. Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Theid of a signal will match against thesignalRef of a catching or throwing event.
Signal events are displayed as a triangle icon inside different shapes that differentiate between the event types. A solid triangle represents a throwing event, whilst a hollow triangle represents a catching event.
Signal intermediate throw events are displayed as two thin concentric circles with a solid triangle icon inside.
An example of the XML of a signal intermediate catch events is:
<bpmn2:intermediateThrowEvent><bpmn2:incoming>SequenceFlow_3</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing> <bpmn2:signalEventDefinition signalRef="Signal_1jiw9tp" /></bpmn2:intermediateThrowEvent>An example of the XML of a signal with a global scope is:
<bpmn2:signal name="Signal_0hnsd2r" />An example of the XML of a signal with a process instance scope is:
<bpmn2:signal name="Signal_0hnsd2r" activiti:scope="processInstance" />Timer intermediate catching events cause the process flow to wait until a specific time or interval is reached. The time to wait is defined in thetimerEventDefinition property.
The basic properties for a timer intermediate catch event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the timer intermediate catch event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the timer intermediate catch event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the timer intermediate catch event does. |
A choice of timer must be set for timer start events, based on aCycle,Date orDuration.
Timer events are used to influence events at specific times, after a set amount of time has passed or at intervals. All timer events use the international standardISO 8601 for specifying time formats.
Note: All properties within
timerEventDefinitioncan accept process variables as their values as long as they are in ISO 8601 or cron expression format.
Timer events are displayed as a clock icon inside different shapes that differentiate between the event types.
ThetimeDate property for timer events defines a specific date and time in ISO 8601 format for when the trigger will be fired and can include a specified time zone.
The following is an example of thetimerEventDefinition using atimeDate:
2017-05-17 represents the 17th May 2017 inYYYY-MM-DD formatT12:42:23 represents the time of 12:42:23 inhh:mm:ss formatZ represents that the time format is in UTC (Coordinated Universal Time). The time can also contain UTC offsets such as+01 for an hour ahead of UTC. When an offset is defined theZ is not required, for example:T12:42:23+01ThetimeDuration property for timer events defines how long a timer should wait in ISO 8601 format before the trigger is fired.
The following are the letters used to refer to duration:
| Letter | Description |
|---|---|
P | Designates that the following letters and numbers represent a duration. Must always be present |
Y | Represents a year and follows the number of years, for exampleP2Y is 2 years |
M | Represents a month and follows the number of months when preceded by aP, for exampleP3Y4M is 2 years and 4 months |
W | Represents a week and follows the number of weeks, for exampleP10W for 10 weeks |
D | Represents a day and follows the number of days, for exampleP1Y1M1D for 1 year, 1 month and 1 day |
T | Designates that the following letters represent a duration of hours to seconds. Must always be present to refer to hours, minutes and seconds |
H | Represents an hour and follows the number of hours, for exampleP1DT0.5H for 1 day and half an hour |
M | Represents a minute and follows the number of minutes when preceded by aT, for examplePT1M for 1 minute |
S | Represents a second and follows the number of seconds, for exampleP2Y3M4DT5H6M7S for 2 years, 3 months, 4 days, 5 hours, 6 minutes and 7 seconds |
ThetimeCycle property for timer events defines intervals for the trigger to fire at. Intervals can be defined using the time intervals that adhere to the ISO 8601 standard or by using cron expressions.
Time intervals use the syntaxR/ to set a number of repetitions, for exampleR5/ would repeat five times.
Following the repetition, a duration can be set for when the repetition occurs, for exampleR5/PT10H would repeat every 10 hours, five times.
Note The duration uses the same format as for
timeDuration.
An optional end date can also be set after the duration and separated by a/.
Note: The end date uses the same format as for
timeDate.
Cron expressions can also be used to define repeating triggers for timer events.
Timer intermediate catch events are displayed as two thin concentric circles with a clock icon inside.
An example of the XML of a signal intermediate catch events is:
<bpmn2:intermediateCatchEvent><bpmn2:incoming>SequenceFlow_3</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing><bpmn2:timerEventDefinition> <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">P5D</bpmn2:timeDuration></bpmn2:timerEventDefinition></bpmn2:intermediateCatchEvent>Note: This will wait five days before continuing the process.
An example of the XML fortimeDate is:
<bpmn2:timerEventDefinition> <bpmn2:timeDate xsi:type="bpmn2:tFormalExpression">2017-05-17T12:42:23Z</bpmn2:timeDate></bpmn2:timerEventDefinition>An example of the XML fortimeDuration is:
<bpmn2:timerEventDefinition> <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">P5D</bpmn2:timeDuration></bpmn2:timerEventDefinition>Note: This represents a duration of 5 days.
An example of the XML fortimeCycle using time interval syntax is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression">R3/PT30M</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents three repetitions every 30 minutes.
An example of the XML fortimeCycle using a cron expression is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle>0 0/5 * * * ?</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents a trigger firing every 5 minutes beginning at the top of the hour.
Boundary events are assigned to other BPMN elements such as service tasks and user tasks. They are used by dragging the selected boundary type onto the BPMN element to influence and using the spanner icon to select the type of boundary event to use.
Whilst the element that the boundary event is attached to is being executed within a process instance, the boundary event is waiting for its trigger event. Once that event occurs the behavior can follow one of two paths:
Interrupting behavior where the element’s execution is terminated by the boundary event and the sequence flow out of the boundary event is followed. Interrupting boundary events are displayed as solid lines.
Non-interrupting behavior where the element’s execution continues and a new sequence flow is followed from the boundary event in parallel to the main sequence flow. Non-interrupting boundary events are displayed as dashed lines.
Note: Depending on the boundary type, a trigger may never reach the attached boundary event. For example a signal may not be thrown for a signal boundary event to catch.
Boundary events use theattachedToRef property to indicate theid of the element they are attached to. Interrupting behavior is the default for boundary events. Non-interrupting events contain thecancelActivity=false property.
The types of boundary event are:
Error boundary events catch error events on the boundary of another element. Error boundary events are always interrupting, so as soon as an error is caught all process execution within the element they are attached to ceases.
The basic properties for an error boundary event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the error boundary event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the error boundary event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the error boundary event does. |
An error needs to be defined for the error boundary event to catch. A previously createdError can be selected from the dropdown in its properties, or a new one created using the+ symbol. AnError name andError code can then be set.
Error events are used to model an exception in a business process. Errors are thrown by error end events and caught by error start events and error boundary events.
TheerrorRef property in theerrorEventDefinition of an error event element will match against theid of an error when viewing theXML Editor.
Error events are displayed as a lightning bolt icon inside different shapes that differentiate between the event types. A solid lightning bolt represents a throwing event, whilst a hollow lightning bolt represents a catching event.
To create a new error use the+ symbol against an error event such as a start error event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Errors button will be visible in the right-hand properties panel.
Error boundary events are displayed as two thin concentric circles with a hollow lightning bolt icon inside attached to the border of another BPMN element.
An example of the XML of an error boundary events is:
<bpmn2:boundaryEvent attachedToRef="ServiceTask1"><bpmn2:errorEventDefinition errorRef="Error_0vbkbeb" /></bpmn2:boundaryEvent>An example of the XML of a signal is:
<bpmn2:error name="payment-failed-error" errorCode="404" />Message boundary events are attached to the boundary of another element. When a named message is received by the message boundary event, the process flow will be interrupted or a concurrent flow will be created depending on whether the event is interrupting or non-interrupting.
The basic properties for a message boundary event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the message boundary event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the message boundary event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the message boundary event does. |
A message needs to be defined for the message boundary event to catch when it is thrown. A previously createdMessage can be selected from the dropdown in its properties, or a new one created using the+ symbol. AMessage name and payload can then be set.
Messages have a name and contain a payload. They are sent by message throwing events and received by message catching events in a 1:1 relationship between throw events and catch events. Messages contain a payload known as a message payload and can be passed between scopes, for example between two different process definitions within the same diagram that are separated by differentpools.
The messageid property of a message is matched against themessageRef property in the corresponding throw and catch message elements when viewing theXML Editor.
To create a new message use the+ symbol against a message event such as a message boundary event, or make sure no BPMN element is selected by clicking on a blank section of the process canvas and theEdit Messages button will be visible in the right-hand properties panel.
Message events are displayed as an envelope icon inside different shapes that differentiate between the event types. A solid envelope represents a throwing event, whilst a hollow envelope represents a catching event.
Message payloads contain a set of values that are sent from a throwing event and received by a catching event.
Message payloads can only be created on a message throw event and contain one or more properties that have aname,type andvalue. The property types for payloads are:
| Type | Description |
|---|---|
| String | A sequence of characters, for example#Mint-Ice-Cream-4! |
| Integer | A positive whole number, for example642 |
| Boolean | A value of eithertrue orfalse |
| Date | A specific date in the formatYYYY-MM-DD, for example2020-04-22 |
| Variable | A value passed from aprocess variable. |
The receiving message catch event is then used to map the received values in the payload to process variables in its own scope.
Message payload mappings can be viewed in theExtensions Editor of a process diagram. Throwing events are mapped asinputs and catching events are mapped asoutputs from an event.
Message events can optionally contain a correlation key. If a correlation key is present then when a message is thrown it uses theactiviti:correlationKey value and themessageRef of the throwing event to match against the same two properties in a catching event. If only one property is matched then the message will not be caught.
Using aprocess variable for the correlation key in a throwing event and a static value for its corresponding catching event allows for the message to only be caught in specific circumstances.
Note: Message start events cannot contain a correlation key unless they are used in asub process.
When messages are used between two differentpools the sequence flow that connects them is a dotted line called a message flow. The message flow is part of thecollaboration element in the XML created by introducing a pool. Message flows reference the throwing message event as thesourceRef and the catching message event as thetargetRef.
Message boundary events are displayed as two thin concentric circles, or two thin dashed concentric circles, with a hollow envelope icon inside attached to the border of another BPMN element.
An example of the XML of an interrupting message boundary events is:
<bpmn2:boundaryEvent attachedToRef="UserTask2"><bpmn2:outgoing>SequenceFlow5</bpmn2:outgoing><bpmn2:messageEventDefinition messageRef="Message_15xakkk" /></bpmn2:boundaryEvent>An example of the XML of a non-interrupting message boundary events is:
<bpmn2:boundaryEvent cancelActivity="false" attachedToRef="SubProcess2"><bpmn2:outgoing>SequenceFlow8</bpmn2:outgoing><bpmn2:messageEventDefinition messageRef="Message_02satcd" /></bpmn2:boundaryEvent>The XML representation of a message is:
<bpmn2:message name="Message_02satcd" />An example of the XML of a message payload is:
"mappings": { "EndEvent_0ss2fp3": { "inputs": { "name": { "type": "variable", "value": "username" }, "order-number": { "type": "value", "value": 1459283 } } } },An example of the XML of a message with a correlation key is:
<bpmn2:endEvent><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:messageEventDefinition messageRef="Message_1hxecs2" activiti:correlationKey="${userId}" />In this example the message will only be caught if a catching event has amessageRef ofMessage_1hxecs2 and anactiviti:correlationKey that matches the value ofuserId.
An example of the XML of a message flow is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /><bpmn2:messageFlow sourceRef="Event_00acemq" targetRef="Event_13u5jtf" /></bpmn2:collaboration>Signal boundary events can be considered catching events as they always wait to receive a named signal from a throwing event.
The basic properties for a signal boundary event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the signal boundary event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the signal boundary event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the signal boundary event does. |
A signal needs to be defined for the signal boundary event to catch. A previously usedSignal can be selected from the dropdown in its properties, or a new one created using the+ symbol. ASignal name can then be set.
Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Signal events can be either catching or throwing. A throwing signal event will emit a signal when it is reached in a process instance that will be picked up by any catching signal event with a matching signal name. Signals can be restricted to the process instance they are thrown in, or be global in scope. The scope of a global signal is restricted to the project they are used in.
Theid of a signal will match against thesignalRef of a catching or throwing event.
Signal events are displayed as a triangle icon inside different shapes that differentiate between the event types. A solid triangle represents a throwing event, whilst a hollow triangle represents a catching event.
Signal boundary events are displayed as two thin concentric circles with a hollow triangle icon inside attached to the border of another BPMN element.
An example of the XML of a signal boundary events is:
<bpmn2:boundaryEvent attachedToRef="ServiceTask3"> <bpmn2:signalEventDefinition signalRef="Signal_0iikg75" /></bpmn2:boundaryEvent>An example of the XML of a signal with a global scope is:
<bpmn2:signal name="Signal_0hnsd2r" />An example of the XML of a signal with a process instance scope is:
<bpmn2:signal name="Signal_0hnsd2r" activiti:scope="processInstance" />Timer boundary events can be interrupting or non-interrupting. They wait for a specified time before triggering and can also be set to trigger at multiple intervals.
The basic properties for a timer boundary event are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the timer boundary event. This is system generated and cannot be altered, for exampleIntermediateThrowEvent_1yohpmt. |
| Name | Optional. The name of the timer boundary event. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the timer boundary event does. |
A choice of timer must be set for timer start events, based on aCycle,Date orDuration.
Timer events are used to influence events at specific times, after a set amount of time has passed or at intervals. All timer events use the international standardISO 8601 for specifying time formats.
Note: All properties within
timerEventDefinitioncan accept process variables as their values as long as they are in ISO 8601 or cron expression format.
Timer events are displayed as a clock icon inside different shapes that differentiate between the event types.
ThetimeDate property for timer events defines a specific date and time in ISO 8601 format for when the trigger will be fired and can include a specified time zone.
The following is an example of thetimerEventDefinition using atimeDate:
2017-05-17 represents the 17th May 2017 inYYYY-MM-DD formatT12:42:23 represents the time of 12:42:23 inhh:mm:ss formatZ represents that the time format is in UTC (Coordinated Universal Time). The time can also contain UTC offsets such as+01 for an hour ahead of UTC. When an offset is defined theZ is not required, for example:T12:42:23+01ThetimeDuration property for timer events defines how long a timer should wait in ISO 8601 format before the trigger is fired.
The following are the letters used to refer to duration:
| Letter | Description |
|---|---|
P | Designates that the following letters and numbers represent a duration. Must always be present |
Y | Represents a year and follows the number of years, for exampleP2Y is 2 years |
M | Represents a month and follows the number of months when preceded by aP, for exampleP3Y4M is 2 years and 4 months |
W | Represents a week and follows the number of weeks, for exampleP10W for 10 weeks |
D | Represents a day and follows the number of days, for exampleP1Y1M1D for 1 year, 1 month and 1 day |
T | Designates that the following letters represent a duration of hours to seconds. Must always be present to refer to hours, minutes and seconds |
H | Represents an hour and follows the number of hours, for exampleP1DT0.5H for 1 day and half an hour |
M | Represents a minute and follows the number of minutes when preceded by aT, for examplePT1M for 1 minute |
S | Represents a second and follows the number of seconds, for exampleP2Y3M4DT5H6M7S for 2 years, 3 months, 4 days, 5 hours, 6 minutes and 7 seconds |
ThetimeCycle property for timer events defines intervals for the trigger to fire at. Intervals can be defined using the time intervals that adhere to the ISO 8601 standard or by using cron expressions.
Time intervals use the syntaxR/ to set a number of repetitions, for exampleR5/ would repeat five times.
Following the repetition, a duration can be set for when the repetition occurs, for exampleR5/PT10H would repeat every 10 hours, five times.
Note The duration uses the same format as for
timeDuration.
An optional end date can also be set after the duration and separated by a/.
Note: The end date uses the same format as for
timeDate.
Cron expressions can also be used to define repeating triggers for timer events.
Timer boundary events are displayed as two thin concentric circles, or two thin dashed concentric circles, with a clock icon inside attached to the border of another BPMN element.
An example of the XML of an interrupting timer boundary events is:
<bpmn2:boundaryEvent attachedToRef="UserTask1"><bpmn2:outgoing>SequenceFlow5</bpmn2:outgoing><bpmn2:timerEventDefinition><bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT10M</bpmn2:timeDuration></bpmn2:timerEventDefinition></bpmn2:boundaryEvent>An example of the XML of a non-interrupting timer boundary events is:
<bpmn2:boundaryEvent cancelActivity="false" attachedToRef="SubProcess1"><bpmn2:outgoing>SequenceFlow8</bpmn2:outgoing><bpmn2:timerEventDefinition><bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">P5D</bpmn2:timeDuration></bpmn2:timerEventDefinition></bpmn2:boundaryEvent>An example of the XML fortimeDate is:
<bpmn2:timerEventDefinition> <bpmn2:timeDate xsi:type="bpmn2:tFormalExpression">2017-05-17T12:42:23Z</bpmn2:timeDate></bpmn2:timerEventDefinition>An example of the XML fortimeDuration is:
<bpmn2:timerEventDefinition> <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">P5D</bpmn2:timeDuration></bpmn2:timerEventDefinition>Note: This represents a duration of 5 days.
An example of the XML fortimeCycle using time interval syntax is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression">R3/PT30M</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents three repetitions every 30 minutes.
An example of the XML fortimeCycle using a cron expression is:
<bpmn2:timerEventDefinition> <bpmn2:timeCycle>0 0/5 * * * ?</bpmn2:timeCycle></bpmn2:timerEventDefinition>Note: This represents a trigger firing every 5 minutes beginning at the top of the hour.
Gateways are used to deal with convergence and divergence of the process flow. They allow for more than one fork of a process to be followed, or they can evaluate conditions so that a different route may be followed for each specific set of circumstances.
The types of gateway are:
Exclusive gateways represent a decision within a process.
Once the process flow reaches an exclusive gateway, all of the outgoing sequence flow options are evaluated in the order they are defined. The first option that evaluates to true is the sequence flow that is followed. A default sequence flow can be set incase none of the outgoing sequence flows evaluate to true.
The basic properties for an exclusive gateway are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the exclusive gateway. This is system generated and cannot be altered, for exampleGateway_1ppp31l. |
| Name | Optional. The name of the exclusive gateway. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the exclusive gateway does. |
The name of asequence flow can be used to select a default flow for the gateway to take. This path will be followed if none of the other sequence flows evaluate to true. Conditional expressions can be configured on sequence flows to select which path is taken.
Exclusive gateways are displayed as a single thin diamond shape with an X icon inside.
Note: A single thin diamond on its own defaults to an exclusive gateway, however the BPMN specification does not allow diamonds with, and without, an X in the same process definition.
An example of the XML of an exclusive gateway is:
<bpmn2:exclusiveGateway name="Content Accepted?" default="SequenceFlow_2"><bpmn2:incoming>SequenceFlow_1</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing><bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing></bpmn2:exclusiveGateway> <bpmn2:sequenceFlow sourceRef="Task_1" targetRef="ExclusiveGateway_1" /> <bpmn2:sequenceFlow name="yes" sourceRef="ExclusiveGateway_1" targetRef="Task_2"><bpmn2:conditionExpression xsi:type="bpmn:tFormalExpression">${content.approved == true}</bpmn2:conditionExpression></bpmn2:sequenceFlow> <bpmn2:sequenceFlow name="no" sourceRef="ExclusiveGateway_1" targetRef="Task_3"><bpmn2:conditionExpression xsi:type="bpmn:tFormalExpression">${content.approved == false}</bpmn2:conditionExpression> </bpmn2:sequenceFlow>Inclusive gateways allow for convergence and divergence in a process, however they also allow for conditional sequence flows.
Once the process flow reaches an inclusive gateway, all of the outgoing sequence flows are evaluated and all flows that evaluate to true are followed for divergent behavior. A default sequence flow can be set incase none of the outgoing sequence flows evaluate to true.
For a converging inclusive gateway, the process waits until all active sequence flows reach the gateway before continuing.
The basic properties for an inclusive gateway are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the inclusive gateway. This is system generated and cannot be altered, for exampleGateway_1ppp31l. |
| Name | Optional. The name of the inclusive gateway. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the inclusive gateway does. |
The name of asequence flow can be used to select a default flow for the gateway to take. This path will be followed if none of the other sequence flows evaluate to true. Conditional expressions can be configured on sequence flows to select which path is taken.
Inclusive gateways are displayed as a single thin diamond shape with a circle inside.
An example of the XML of an inclusive gateway is:
<bpmn2:inclusiveGateway name="Content Metadata" default="SequenceFlow_2"><bpmn2:incoming>SequenceFlow_1</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing><bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing></bpmn2:inclusiveGateway> <bpmn2:sequenceFlow sourceRef="Task_1" targetRef="InclusiveGateway_1" /> <bpmn2:sequenceFlow name="yes" sourceRef="InclusiveGateway_1" targetRef="Task_2"><bpmn2:conditionExpression xsi:type="bpmn:tFormalExpression">${content.size == "A4"}</bpmn2:conditionExpression></bpmn2:sequenceFlow> <bpmn2:sequenceFlow name="no" sourceRef="InclusiveGateway_1" targetRef="Task_3"><bpmn2:conditionExpression xsi:type="bpmn:tFormalExpression">${content.origin == "Email"}</bpmn2:conditionExpression> </bpmn2:sequenceFlow>Parallel gateways represent a concurrent convergence or divergence in a process.
Divergence means that all sequence flows exiting a parallel gateway are executed concurrently. A converging parallel gateway waits for all concurrent sequence flows to arrive at the gateway, before continuing with the process.
Parallel gateways do not evaluate conditions. Any conditions set on a sequence flow will be ignored by the parallel gateway.
Note: It is possible for a single parallel gateway to execute both converging and diverging behavior.
The basic properties for a parallel gateway are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the parallel gateway. This is system generated and cannot be altered, for exampleGateway_1ppp31l. |
| Name | Optional. The name of the parallel gateway. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the parallel gateway does. |
Parallel gateways are displayed as a single thin diamond shape with a + icon inside.
An example of the XML of a parallel gateway is:
<bpmn2:parallelGateway><bpmn2:sequenceFlow sourceRef="Fork_1" targetRef="UserTask_1" /> </bpmn2:sequenceFlow> <bpmn2:sequenceFlow sourceRef="Fork_1" targetRef="ServiceTask_1" /> </bpmn2:sequenceFlow></bpmn2:parallelGateway>Tasks are used in a process to include other models from a project in a process.
The types of task are:
Business rule tasks are used to includedecision tables in a process definition.
Business rule tasks are essentially treated as service tasks and will always have theimplementation value ofdmn-connector.EXECTUTE_TABLE. Thename of the decision table that is associated to the business rule task is used as thevalue under_activiti_dmn_table_ when viewing theExtensions Editor.
The basic properties for a business rule task are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the business rule task. This is system generated and cannot be altered, for exampleServiceTask_0a1cgxd. |
| Name | Optional. The name of the business rule task. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the business rule task does. |
Business rule tasks can be set to repeat sequentially or in parallel when the process flow reaches them.
The name of thedecision table to use. The decision table must exist within the same project as the process definition to be selected. Select a decision table from the dropdown, else create a new one using the+ symbol.
The mapping type sets how data is passed between the decision table and the process. There arefive options for how to send this data. The default value isSend no variables.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Business rule tasks are displayed as a single, thin rounded rectangle with a table icon inside.
An example of the XML of a business rule task is:
<bpmn2:serviceTask implementation="dmn-connector.EXECUTE_TABLE" />An example of theExtensions Editor JSON of a process containing a business rule task is:
"constants": {"ServiceTask_2f85xew": {"_activiti_dmn_table_": {"value": "my-decision-table-1" } } },An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Script tasks are used to includescripts in a process definition.
Script tasks are essentially treated as service tasks and will always have theimplementation value ofscript.EXECUTE. Thename of the script that is associated to the script task is used as thevalue under_activiti_script_ when viewing theExtensions Editor.
The basic properties for a script task are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the script task. This is system generated and cannot be altered, for exampleServiceTask_0a1cgxd. |
| Name | Optional. The name of the script task. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the script task does. |
Script tasks can be set to repeat sequentially or in parallel when the process flow reaches them.
The name of thescript to use. The script must exist within the same project as the process definition to be selected. Select a script from the dropdown, else create a new one using the+ symbol.
The mapping type sets how data is passed between the script and the process. There arefive options for how to send this data. The default value isSend no variables.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Script tasks are displayed as a single thin, rounded rectangle with a script icon inside.
An example of the XML of a script task is:
<bpmn2:serviceTask name="Order script" implementation="script.EXECUTE"><bpmn2:documentation>A script to loop and update the list of orders.</bpmn2:documentation></bpmn2:serviceTask>An example of theExtensions Editor JSON of a process containing a script task is:
"constants": { "Task_0ykbcv0": { "_activiti_script_": { "value": "order-script" } } }An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Service tasks are used to includeconnectors, business rule tasks and script tasks in a process.
Note: Service tasks do not emit the
TASK_CREATEDandTASK_COMPLETEDevents. TheINTEGRATION_REQUESTEDandINTEGRATION_RESULT_RECEIVEDevents should be monitored to report or track service tasks instead.
The basic properties for a service task are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the service task. This is system generated and cannot be altered, for exampleServiceTask_0a1cgxd. |
| Name | Optional. The name of the service task. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the service task does. |
Script tasks can be set to repeat sequentially or in parallel when the process flow reaches them.
The implementation value is used to associate a connector with a service task. For business rule tasks and script tasks this value is set by default and cannot be changed. The format is<connector-name>.<connector-action>.
An action selects which of the connector actions that service task should execute, for example whether to send a message or create a new channel in Slack when using theSlack connector.
The mapping type sets how data is passed between the connector and the process. There arefive options for how to send this data. The default value isSend no variables.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Service tasks are displayed as a single, thin rounded rectangle with a cog icon inside.
An example of the XML of a service task is:
<bpmn2:serviceTask name="send-email" implementation="email-connector.SEND"><bpmn2:documentation>A connector that sends an email.</bpmn2:documentation><bpmn2:incoming>SequenceFlow_19fgs1w</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_64jaw7e</bpmn2:outgoing></bpmn2:serviceTask>An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
User tasks represent a stage in the process where human action is required.
Human action is handled by a task being assigned to specific users or groups. The task that is assigned can be modeled using aform. Once a task is completed, the process flow continues on to the next element in the process. When a new user task is added to a process diagram, it is automatically assigned to the process initiator.
The basic properties for a user task are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the user task. This is system generated and cannot be altered, for exampleUserTask_0w526j8. |
| Name | Optional. The name of the user task. This will be displayed on the canvas. |
| Description | Optional. A free text description of what the user task does. The description can be made dynamic by writing an expression, for example: ${workflowType} for ${dealNumber} Closing Coordinator Task - Review Document. In the Digital Workspace and the Admin app, the expression is dynamically rendered as a user-friendly task description. For example, the previous expression might render as:Commitment and Policy for DEA1235385 Closing Coordinator Task - Review Document. |
The users or groups that are able to complete a task. A single user can be assigned or candidates can be set. Candidates are a list of users or groups that may claim a task at runtime. A single user or candidates must be set for a user task.
A single assignee is set in the XML attributeactiviti:assignee and candidates in the attributeactiviti:candidateGroups. On theTask Assignment window use the dropdown menu on the top right to set if the assignment is for a single user or for candidates. If for candidates, from theAssignment type dropdown list, select eitherSequential orManual assignment types. Assigning a task manually means a user is assigned the task by another user or themselves. Assigning tasks sequentially means tasks are assigned automatically in a ‘round-robin’ scenario.
Users and groups can be set from three different sources:
Static values are a free text field that has no validation as to whether a user exists or not. The text entered will require an exact match to ausername in the product environment for the user task to be correctly assigned at runtime.
Identity allows forusers and groups to be searched for and selected for the assignment. The users and groups must exist whilst modeling to display in this list.
Expression allows for an expression usingprocess variables to be used to select users and groups for the assignment. Expressions can be a simple process variable such as${userToAssign} or an expression such as${userDetails.username} that uses a process variable of type JSON. A JSON editor is provided for creating expressions for assignment, however the editor will only be displayed if there are process variables in the process.
Note: The value
"assignee": "${initiator}"can be set as an expression without creating a process variable. This will assign the task to the user that started the process instance.
The assignments for user tasks are stored in theassignments property of theExtensions Editor.
Note: Users and groups that are selected as assignees or candidates in a user task are automatically added asusers when deploying an application if they are set using the static or identity options. Setting an assignee or candidate using the expression source will require the potential users or groups to be manually assigned users when deploying an application.
An optional date and time for a user task to be completed by inISO 8601 format. There are three different ways of adding a due date:
SelectUse static date then choose the time and date using the date picker.
SelectUse time duration then enter a time in Months, Days, Hours, and Minutes.
SelectUse process variable then choose a process variable from the dropdown list. This option uses a process variable that must use the typedatetime.
Checking theUse process variable box for due date allows aprocess variable to be used to generate the date. The process variable must be of typedatetime.
Script tasks can be set to repeat sequentially or in parallel when the process flow reaches them.
An optional priority for the user task between 0 and 4. The priority property is to aid end users in their task management.
Aform can be assigned to the user task. The form must exist within the same project as the process definition to be selected. Select a form from the dropdown, else create a new form using the+ symbol.
Once a form has been selected, it can be edited using theOpen Form symbol.
The mapping type sets how data is passed between the user task and the process. There arefive options for how to send this data. The default value isSend no variables.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
User tasks are displayed as a single thin, rounded rectangle with a user icon inside.
An example of the XML of a user task is:
<bpmn2:userTask name="Order" activiti:formKey="form-38098a3e-bff1-46cb-ba0f-0c94fdb287ed" activiti:assignee="${userDetails.username}" activiti:dueDate="2020-01-01T01:00:00" activiti:priority="2"><bpmn2:documentation>A form to choose the flavor of ice cream.</bpmn2:documentation><bpmn2:incoming>SequenceFlow_02eaofe</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_14ma5mo</bpmn2:outgoing></bpmn2:userTask>An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Sub-processes and call activities are used to define separate processes. Sub-processes are defined and executed within the same process definition as the parent process, whilst call activities start a completely separate process.
The types of sub-process are:
Call activities are used to start an instance of another process definition. The original process waits until the called process is complete before continuing with its own process flow.
ThecalledElement property uses aprocessDefinitionId to define which process to start.
Note: When a call activity element is executed it receives its own
processInstanceId. Theprocess variables of a call activity are also completely separate to those in the parent process.
Note: Call activities can only be used to start a process instance of a process definition that exists in the same application as the process that is calling it.
The basic properties for a call activity are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the call activity. This is system generated and cannot be altered, for exampleCallActivity_1kb3t8n. |
| Name | Optional. The name of the call activity. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the call activity does. |
Sub-processes can be set to repeat sequentially or in parallel when the process flow reaches them.
The process definition the call activity should start is set using the called element property.
The called element can be set in two ways:
Static values select a process definition name from a dropdown list.
Expression values allow an expression to be set to dynamically call a process definition based on an expression or process variable.
The mapping type sets how data is passed between the parent process and the process being started by the call activity. There arefive options for how to send this data. The default value isSend no variables.
Note: if anExpression is used to set which process definition to call in the call element property, it is not possible to explicitly map the variable exchange in the mapping type.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Call activities are displayed as a single, thick rounded rectangle without an icon inside.
An example of the XML of a call activity is:
<bpmn2:callActivity name="Start request process" calledElement="process-a6d6ca00-cbb6-45d6-ae24-50ef53d37cc4"><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing></bpmn2:callActivity>An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Sub-processes are also known as embedded sub-processes and can be expanded or collapsed. Elements for the sub-process can only be dragged into an expanded sub-process. Use the spanner icon against a sub-process to toggle between a collapsed and expanded state.
A sub-process requires a start and an end event. Only astandard start event can be used in embedded sub-processes. The sequence flow within a sub-process cannot cross its boundary without the sub-process completing. The advantage of a sub-process is that it creates its own scope within a process. This allows for boundary events to be attached to the sub-process.
Note: When a sub-process is executed as part of a process instance, it does not receive a new
processInstanceId. The elements within the sub-process will be executed under the ID of the parent process.Process variables are also shared between a sub-process and its parent with no additional mapping required.
The basic properties for a sub-process are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the sub-process. This is system generated and cannot be altered, for exampleCallActivity_1kb3t8n. |
| Name | Optional. The name of the sub-process. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the sub-process does. |
Sub-processes can be set to repeat sequentially or in parallel when the process flow reaches them.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Whilst expanded, sub-processes are displayed as a single, thin rounded rectangle with the other BPMN elements they contain visible.
Whilst collapsed, sub-processes are displayed as a single, thin rounded rectangle with a+ symbol. The BPMN elements they contain are not visible in this state.
An example of the XML of a sub-process is:
<bpmn2:subProcess><bpmn2:incoming>SequenceFlow_8</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>...</bpmn2:subProcess>An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Event sub-processes are triggered by an event such as a signal or error and require a start and end event. As they are triggered by events an event sub-process can’t be started by a standard start event. Instead start events such as error start events or message start events are used.
Event sub-processes are not connected to the main process flow as they can only be triggered by an event. The XML for an event sub-process contains thetriggeredByEvent property set totrue.
Event sub-processes can be placed at the process level or inside a sub-process.
Note: When an event sub-process is executed as part of a process instance, it does not receive a new
processInstanceId. The elements within the event sub-process will be executed under the ID of the parent process.Process variables are also shared between an event sub-process and its parent with no additional mapping required.
The basic properties for an event sub-process are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the event sub-process. This is system generated and cannot be altered, for exampleCallActivity_1kb3t8n. |
| Name | Optional. The name of the event sub-process. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the event sub-process does. |
Sub-processes can be set to repeat sequentially or in parallel when the process flow reaches them.
Multi-instance allows for the element to be repeated within a process. There are two options for how to execute multi-instance elements: sequentially or in parallel.
Sequential executions only ever have a single instance running at any one time. The next instance will only start after the previous one has been completed.
Parallel executions start all instances at once, meaning they are all active and can all be worked on at the same time.
Multi instance elements are displayed as three parallel lines at the bottom of the original element. Sequential lines are horizontal and parallel lines are vertical.
Each multi-instance execution has three variables:
| Variable | Description |
|---|---|
| nrOfInstances | The total number of instances |
| nrOfActiveInstances | The number of currently active instances. For sequential multi-instances the value will always be 1 |
| nrOfCompletedInstances | The number of instances that have already been completed |
Note: These variables can be used in multi-instance expressions without having to be declared asprocess variables.
Each instance in the multi-instance execution also has an instance-local variable that is not visible to other instances, nor to the process instance:
| Variable | Description |
|---|---|
| loopCounter | The index in the for-each loop of that particular instance |
Cardinality sets the number of instances to be executed by the multi-instance element. This can be set as a static value, aprocess variable or calculated as an expression.
A collection can be used to set the number of instances to be executed by referencing a list of items.
An element variable can optionally be used with a collection. An element variable is used to create a variable for each instance of the multi-instance element and each variable created by the element variable is assigned one value from the collection.
A completion condition can optionally be included for multi-instances. When the completion condition evaluates totrue, all remaining instances are cancelled and the multi-instance activity ends.
A result collection can be set to aggregate the results from each instance into a variable. The result collection is created as a process variable after instance execution has finished.
The result element variable is used to select the field or variable from the BPMN element to aggregate into the result collection.
Event sub-processes are displayed as a single, thin dotted rectangle.
An example of the XML of an event sub-process is:
<bpmn2:subProcess triggeredByEvent="true">...</bpmn2:subProcess>An example of the XML for an element that contains sequential multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="true" />An example of the XML for an element that contains parallel multi-instance elements is:
<bpmn2:multiInstanceLoopCharacteristics isSequential="false" />or
<bpmn2:multiInstanceLoopCharacteristics />An example of the XML of multi-instance cardinality is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>5</bpmn2:loopCardinality></bpmn2:multiInstanceLoopCharacteristics>An example of the XML of a multi-instance collection is:
<bpmn2:userTask activiti:assignee="${user}"><bpmn2:incoming>SequenceFlow_5</bpmn2:incoming><bpmn2:multiInstanceLoopCharacteristics activiti:collection="${userList.users}" activiti:elementVariable="user"></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The
activiti:collectionreferences a process variable calleduserListthat contains the following JSON:{"users":["user1", "user2", "user3"]}In the example:
- Three user tasks will be created because there are three items in the process variable that
activiti:collectionuses.- A variable will be created for each instance called
userswith the valuesuser1,user2anduser3because theactiviti:elementVariableis set to"users".- A user tasks will be assigned to each of the users because the
activiti:assigneeis set to{users}which is the name of the variable created in each instance by the element variable.
An example of the XML of a multi-instance completion condition is:
<bpmn2:multiInstanceLoopCharacteristics><bpmn2:loopCardinality>10</bpmn2:loopCardinality><bpmn2:completionCondition>${nrOfCompletedInstances/nrOfInstances >= 0.6 }</bpmn2:completionCondition></bpmn2:multiInstanceLoopCharacteristics>Note: The completion condition will be met when 60% of instances have been completed and the remaining 4 instances will be cancelled.
An example of the XML of a multi-instance element is:
<bpmn2:userTask activiti:assignee="${users}"><bpmn2:multiInstanceLoopCharacteristics isSequential="true"><bpmn2:loopCardinality>4</bpmn2:loopCardinality><bpmn2:loopDataOutputRef>choices</bpmn2:loopDataOutputRef><bpmn2:outputDataItem name="flavor" /></bpmn2:multiInstanceLoopCharacteristics></bpmn2:userTask>Note: The user task will run 4 times sequentially and the values of
flavorfrom the form will be stored as a JSON object in the variablechoices. The process variablechoiceswill contain a list of results similar to the following:["chocolate", "mint", "strawberry"]
Sequence flows represent the direction of flow in a process, whilst pools and lanes are used to model different participants, personas and process definitions in the same diagram.
Sequence flows represent the direction of flow in a process. The can be drawn between BPMN elements using theGlobal connect tool.
The basic properties for a sequence flow are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the sequence flow. This is system generated and cannot be altered, for exampleSequenceFlow_1y8xkql. |
| Name | Optional. The name of the sequence flow. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the sequence flow does. |
A condition expression can be set when a sequence flow is connected to an inclusive or exclusive gateway. Conditions will be evaluated to decide whether a path is taken or not. The expression syntax can reference process variables using expressions such as${content.approved} == false} where that path will be taken if theapproved attribute of the variablecontent is set tofalse.
Another example of conditional expressions when evaluating a sequence flow is using amounts, for example${amount>500} will take the sequence flow if the process variableamount is greater than 500 at the point the gateway is reached.
Sequence flows are displayed as single black lines with an arrow indicating the direction of flow.
An example of the XML of a sequence flow is:
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming><bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>An example of the XML of a sequence flow with a condition expression set is:
<bpmn2:sequenceFlow name="no" sourceRef="ExclusiveGateway_1" targetRef="Task_1"><bpmn2conditionExpression xsi:type="bpmn:tFormalExpression">${content.approved == false}</bpmn2:conditionExpression></bpmn2:sequenceFlow>Pools allow multiple process definitions to be modeled in a single diagram, or to utilize lanes to show the personas interacting with a process defintion. An example of using two pools would be for a customer to fill out an order in one process definition that sends a message on order completion triggering a second process defintion for a warehouse team to action. The two processes would have two completely different process instance IDs at runtime but can be modeled on the same diagram to capture the business process in a single location.
Lanes are used to display different personas interacting with a process definition to the modeler. They have no impact on a process at runtime. Lanes are sub-divisions of pools and cannot exist without them. They can also be nested for example to show different teams within a department.
Important: The scope ofprocess variables are restricted to each process definition.
The basic properties for a pool are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the pool. This is system generated and cannot be altered, for exampleParticipant_0efla7f. |
| Documentation | Optional. A free text description of what the pool does. |
Note: Pools use the process definition name rather than having an additional name property.
The basic properties for a lane are:
| Property | Description |
|---|---|
| ID | Required. The unique identifier for the lane. This is system generated and cannot be altered, for exampleLane_1ikh7j5. |
| Name | Optional. The name of the lane. This will be displayed on the canvas. |
| Documentation | Optional. A free text description of what the lane does. |
An example of the XML of a pool is:
<bpmn2:collaboration><bpmn2:participant processRef="Process_1d9yxsm" /><bpmn2:participant processRef="Process_1piiyp4" /></bpmn2:collaboration>An example of the XML of a lane is:
<bpmn2:process><bpmn2:laneSet><bpmn2:lane name="HR Department"><bpmn2:flowNodeRef>Event_0b61hqt</bpmn2:flowNodeRef><bpmn2:flowNodeRef>Gateway_1dmrhcn</bpmn2:flowNodeRef></bpmn2:lane><bpmn2:lane name="Finance Department"><bpmn2:flowNodeRef>Task_16ju082</bpmn2:flowNodeRef><bpmn2:flowNodeRef>Event_00acemq</bpmn2:flowNodeRef></bpmn2:lane></bpmn2:laneSet>