Gateways are used to describe the behaviour of converging and diverging flows.
In this pattern, which is an "or" (OR) gateway, there must be a minimum of two, but no upper limit, outgoing flows. With at least one of the outgoing flows designated as a default flow.
BPEL comments
1 If the split occurs from a gateway the stereotype of the gateway is determined from the definition property Gateway.Stereotype this must be specified as an "OR" gateway.
2 A <sequence> element is created and all subsequent constructs for this pattern reside within this element.
3 A <flow> element is constructed that will hold all of the non-default outgoing sequence flows
4 The ncname of the flow is taken from the process or gateway name.
5 The standard-attributes are determined from the process or gateway symbol.
6 For each outgoing sequence flow, if the sequence flow is not a default flow. The default flow indicator is determined from the sequence flow symbol property "Sequence Flow". Default. If the value is "False" then this is not a default flow.
▪If the flow is not a default flow a <switch> element is created and a <case> element is created within the switch.
▪The bool-expr value for the<condition> attribute is determined from the sequence flow symbol. "Sequence Flow". Condition
▪A <sequence> element is created and the ncname of the sequence taken from the sequence flow name. All subsequent activities that proceed onwards from the respective sequence flow reside within this sequence element and occupy the position indicated by the "Target Activity"
▪A <empty/> element is created within a <otherwise element
7 If the sequence flow is a default flow. The default flow indicator is determined from the sequence flow symbol property "Sequence Flow". Default. If the value is "True" then this is a default flow. There must be a default flow, if there is then there should only be one default flow, if there are multiple default flows then this should be flagged as an invalid model.
▪If the flow is a default flow, immediately after the end of the <flow> element a <switch> element is created and a <case> element is created within the switch. This will handle the default path.
▪The bool-expr value for the <condition> attribute is determined from the sequence flow symbol. "Sequence Flow". Condition
▪A <sequence> element is created and the ncname of the sequence taken from the sequence flow name. All subsequent activities that proceed onwards from the respective sequence flow reside within this sequence element and occupy the position indicated by the "Default Activity"
▪An <empty/> element is created within a <otherwise> element.