Architecting and designing > Business Process Analysis (BPA) > BPEL generation > BPEL to BPMN mapping reference > BPMN to BPEL mapping for business process diagrams
  
BPMN to BPEL mapping for business process diagrams
You can generate BPEL code for BPMN business process diagrams.
Pattern
Business Process Diagram
Only Abstract (Public) Processes are suitable for BPEL synchronization. Private (Internal) Business Processes and Collaboration (Global) Processes are not suitable.
BPMN comments
There must be ONLY one Start and at least one End Event on the diagram that is the starting point for the generation.
Children diagrams need not have any Start or End Events.
BPEL comments
1 There is always only one <process> element.
2 The ncname of the <process> attribute is taken from the name of the diagram. "(Business Process".Name)
3 The sapattern and guid elements are taken from the diagram guid property.
4 The targetNamespace "uri" is taken from "Business Process"."Target NameSpace"."URI"
5 The xlmns "uri" Is taken from "Business Process"."NameSpace"."URI"
6 The xlmns:ns in which "ns" taken from the namespace name "Business Process"."Namespaces"."Name" appended with the URI value for the respective namespace "Business Process"."NameSpaces"."URI" this is repeated for however many namespaces there are.
7 The "suppressJoinFailure" is taken from "Business Process"."Suppress Join Fault?"
8 Children diagrams do not have a <process> element.
9 A <partnerLinks element is created that holds all of the <partnerLink> elements, including those from children diagrams. These are declared at the beginning of the bpel document and used later in the document and are contained in the main <process> element.
10 For all partnerlinks, the ncname of the <partnerLink name> attribute is derived from the pool or lane that the message symbol is connected from or to 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 the name is taken from the pool or lane name Pool.name or Lane.name.
11 The myRole attribute is taken from the Participant definition.
12 The partnerRole attribute is taken from the Participant definition property Participant.partnerRole.
13 The partnerLinkType attribute is taken from the Participant definition property Particpant.partnerLinkType which is a Class definition and the Qname value constructed as shown below:
The stereotype of the Class definition must be a "WSDL partnerLinkType" (Class.Stereotype)
The name of the partnerLinkType attribute is the name of the Class Class.name prefixed with the name of the "Namespace" property Class.Namespace and a colon.
14 All variables, if not declared within a <Scope> element, are summarized in the main process element level in the <variables> element. The variables are obtained from the "Message Flow"."Input Variable" and "Message Flow"."Output Variable"
The ncname of the attribute <variable name> is determined from the "BPEL Variable".name property
The value of "BPEL Variable". ". "Variable Type" determines which one out of the following attribute choices to create.
If "BPEL Variable". "Variable Type" = "WSDL Message" then an attribute messageType is created and the qname is determined from the "BPEL Variable". "Message Type" Class definition. The qname is constructed from the Class.name prefixed with the name of the "Namespace" property Class.Namespace and a colon.
If "BPEL Variable". "Variable Type" = "XML Schema Simple Type" then an attribute type is created and the qname is determined from the "BPEL Variable". "Simple Type"
If "BPEL Variable". "Variable Type" = "XML Schema Element" then an attribute element is created and the qname is determined from the "BPEL Variable". "Schema Element
15 All subsequent bpel elements reside within the <Sequence> element and occupy the placeholder position indicated by
Element construct
<process name="ncname"
<sapattern>
<guid>nnnnnnnnnnnn</guid>
</sapattern>
targetNamespace = "uri"
xlmns = "uri"
xlmns:"ns" = "uri"
suppressJoinFailure = "yes|no"
<partnerLinks>
<partnerLink
name= "ncname"
myRole="ncname"
partnerRole="ncname"
partnerLinkType="qname"
/partnerLink>
</partnerLinks>
<variables>
<variable name="ncname"
messageType="qname"
type="qname"
element="qname"/>
</variables>
<Sequence >
Diagram Activities
</Sequence >
</process>
See also
BPEL to BPMN mapping reference