Architecting and designing : Business Process Analysis (BPA) : BPEL generation : BPEL to BPMN mapping reference : BPMN to BPEL mapping for XOR Gateway Splits
  
BPMN to BPEL mapping for XOR Gateway Splits
You can generate BPEL code for BPMN XOR Gateway Splits
Gateways are used to describe the behaviour of converging and diverging flows.
In this pattern, which is an "exclusive or" (XOR) gateway, there must be a minimum of two, but no upper limit, outgoing flows.
BPEL comments
1 The gateway stereotype is determined from the gateway definition property Gateway.Stereotype this might not be specified or maybe an "XOR" gateway.
2 A <switch> element is created and all subsequent constructs for this pattern reside within this element
3 The standard-attributes are determined from the gateway symbol.
4 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 <case> element is created.
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"
5 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 might be a k only be one default flow, if there are multiple default flows then this should be flagged as an invalid model.
Only one <otherwise> element is created
A <sequence> element is created within the <otherwise> element 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 Target Activity"
Element construct
<switch standard-attributes>
<case condition="bool-expr">
<sequence name = "ncname">
Target Activity
</sequence>
</case>
<otherwise>
<sequence name = "ncname">
Default Target Activity
</sequence>
</ otherwise >
</switch>
See also
OR Split
Parallel Processing: AND Gateway Split
Process Parallel Split
BPEL to BPMN mapping reference