Architecting and designing > Business Process Analysis (BPA) > BPEL generation > BPEL to BPMN mapping reference > BPMN to BPEL mapping for Process Task Type mappings
  
BPMN to BPEL mapping for Process Task Type mappings
You can generate BPEL code for BPMN Process Task Type mappings.
Pattern
Process task
BPMN comments
Processes can have their task types specified, the mapping for each task type is described here.
The process task type is determined from"BPMN Process"."Task Type"
Service
Pattern
This graphic is described in the surrounding text.
BPMN comments
In this pattern the process must have an outgoing message flow attached.
BPEL comments
1 For the process involved, if the property "BPMN Process."Task Type" = "Service" then a <invoke> element is created.
2 The ncname of the <partnerLink> attribute is derived from the pool or lane that the message symbol is connected from by examining the name of the definition used in the pool or lane's property Participant.Participant.name. If the Participant property is not populated then the name is taken from the pool or lane name Participant.name.
3 The qname of the "portType" is constructed from the message flow symbol definition, which is a "Class"definition as follows.
"Message Flow"."Port Type" gives a "Class" definition, in which its stereotype must be a " WSDL PortType"Determined from Class.Stereotype
The name of the "Class", Class.name is prefixed with the name of the "Namespace" property Class.Namespace and a colon.
4 The ncname of the <operation> is determined from the "Class" definition "Message Flow".Operation.name. The class stereotype must be a "WSDL Operation" determined from Class.Stereotype
5 The ncname of the <inputVariable> is determined from the Input Variable identified in the message flow.
6 The ncname of the <outputVariable> is determined from the Ouput Variable identified in the message flow.
7 The standard-attributes are determined from the respective Process symbol that the Message flow is connected to.
Element construct
<invoke partnerLink="ncname"
portType="qname"
operation="ncname"
inputVariable="ncname"
outputVariable="ncname"
standard-attributes>
</invoke>
Send
Pattern
This graphic is described in the surrounding text.
BPMN comments
In this pattern, the process must have an outgoing message flow attached.
BPEL Comments
1 If the property "BPMN Process"."Task Type" = "Send" then either a <reply> or <invoke> element is created depending on the variables involved
Examine the BPEL Variable definitions contained in "Message Flow"."Output Variable".name and "Message Flow"."Input Variable".name.
If there is an Input Variable, there might or might not be an Output Variable specified, then an <invoke> element is created.
If there is ONLY an Output Variable and no Input Variable then a <reply> element is created.
2 If a <reply> element is created then the following applies.
3 The ncname of the <partnerLink> attribute is derived from the pool or lane that the message symbol is connected from by examining the name of the definition used in the pool or lane's property Participant.Participant.name. If the Participant property is not populated then the name is taken from the pool or lane name Participant.name.
4 The qname of the "portType" is constructed from the message flow symbol definition, which is a "Class" definition as follows.
"Message Flow"."Port Type" gives a "Class" definition, in which its stereotype must be a " WSDL PortType" Determined from Class.Stereotype
The name of the "Class", Class.name is prefixed with the name of the "Namespace" property Class.Namespace and a colon.
5 The ncname of the <operation> is determined from the "Class" definition "Message Flow".Operation.name. The class stereotype must be a "WSDL Operation" determined from Class.Stereotype
6 The ncname of the <variable> is taken from the BPEL Variable definition contained in "Message Flow"."Output Variable".name
7 The qname of the faultName attribute value is taken from the BPMN Process definition property "BPMN Process".Faultname
8 The standard-attributes are determined from the respective Process or Event symbol that the Message flow is connected to.
9 If an <invoke> element is created then the partnerLink, portType, operation, standard-attributes are all created as for the <reply> element but no <variable> or <faultname> attributes are created.
10 The ncname of the <inputVariable> is determined from the Input Variable identified in the message flow.
11 The ncname of the <outputVariable> is determined from the Ouput Variable identified in the message flow.
Element Construct
<invoke partnerLink="ncname"
portType="qname"
operation="ncname"
inputVariable="ncname"
outputVariable="ncname"
standard-attributes>
</invoke>
<reply partnerLink="ncname"
portType="qname"
operation="ncname"
variable="ncname"
faultName="qname"
standard-attributes>
</reply>
See also
Receive
BPEL to BPMN mapping reference