 | Level: Intermediate Murali Pattathe (pattathe@ca.ibm.com), Advisory Software Developer, IBM Canada
18 Mar 2008 The article explains how to model BPEL process implementation
details in UML. The Unified Modeling Language (UML) provides convenient,
well-understood, well-documented, and commonly practiced support for use case,
collaboration, data, interface, class, component, interaction, state, and activity
modeling. You can exploit this to capture application models that can be transformed
to various platform architectures. The transformation from UML to Process Execution
Language (UML-to-BPEL) that this article describes translates UML artifacts into
BPEL artifacts.
The Business Process Execution Language for Web Services (BPEL4WS or BPEL) is an
XML-based standard for specifying business process behavior that is based on Web
services. It builds upon the Web Services Definition Language (WSDL) and XML
Schema Definition (XSD). The UML (Unified Modeling Language) to BPEL
transformation can take models of processes developed in a UML tool, such as IBM
Rational Software Architect or Rational Software Modeler, and convert them to the
correct BPEL, XSD, and WSDL files that are necessary to implement that process.
Currently, the UML-to-BPEL transformation that can be performed in IBM®
Rational® Software Architect (7.0.0.5) is not a standalone transformation;
therefore, you do not run the transformation alone. Rather, it is invoked by the
UML-to-SOA (service-oriented architecture) transformation when it is necessary.
Rational Software Architect provides many useful tools that help a software
architect design the system. UML transformations, such as UML to XSD and UML to
WSDL, are available only in Rational Software Architect, and UML-to-BPEL
transformation uses it for generating XSD and WSDL artifacts.
Overview of BPEL
BPEL provides an XML notation and related semantics for specifying business
process behavior that is based on Web services. A BPEL4WS process is defined in
terms of its interactions with partners. A partner may provide services to the
process, require services from the process, or participate in a two-way
interaction with the process. Thus, BPEL orchestrates the integration of Web
services by specifying the order in which it is meaningful to call a collection of
services, and it assigns responsibilities for each of the services to partners.
You can use it to specify both the public interfaces for the partners and the
description of the executable process.
The reason to use UML
UML is an Object Management Group (OMG) standard that provides a visual modeling
notation that is valuable for designing and understanding complex systems. UML has
several general advantages:
- It is the most widely known object-oriented modeling notation.
- It uses a graphical notation that is readily understood.
- It offers a rich set of semantics for capturing key features of object-oriented
systems.
UML is widely used in the development of object-oriented software. It has also
been used, with customizations, for component-based software, business process
modeling, services modeling, and systems design. This enables you to apply the
considerable body of UML experience to maturing Web service technologies.
Mapping to BPEL for Web
services
A UML-to-BPEL transformation uses the following approach to generate a BPEL file:
- The BPEL process is generated based on a UML component.
- A BPEL scope is generated in the BPEL process for each of the UML Activities
of the UML Component.
- BPEL partner links are generated based on the details of ports owned by the
UML Component.
UML-to-BPEL transformation requirements should take into consideration the
process of modeling a UML Activity.
The focus here is mainly on how the UML-to-BPEL transformation is currently
supported in Rational Software Architect Version 7.0.0.4 and some of the key
requirements of UML modeling that are necessary for generating BPEL artifacts.
This article uses a sample model, Purchase Order Process, to explain some of the
UML-to-BPEL transformation requirements when you model an Activity diagram.
Currently, the process of UML-to-BPEL transformation does not require extending
or customizing the UML, but it is necessary to have some of the details in place
when you model an Activity diagram.
Purchase Order Process model in detail
Let's look closer at the sample process. The UML OrderProcessor
Component contains four ports:
- The Purchasing port, which contains a provided Interface called Purchasing.
- The Invoicing port that contains one provided Interface called
InvoiceProcessing and one required Interface called Invoicing.
- The Scheduling port, which contains a required Interface called Scheduling.
- The Shipping port that contains one provided Interface called
ScheduleProcessing and one required Interface called Shipping.
The UML processPurchaseOrder Activity is an owned behavior of the OrderProcessor
Component, which is the activity that provides all necessary implementation
details for the Component.
Figure 1 shows a UML Activity that is an owned behavior of the OrderProcessor (a
UML Component). The OrderProcessor component is shown in Figure 2.
Figure 1. processPurchaseOrder,
a UML Activity
Figure 2. OrderProcessor, a UML
Component
This is the property value setting of the specification:
Purchasing::processPurchaseOrder(customerInfo:Customer,
purchaseOrder:PurchaseOrder):Invoice
|
The Activity must have Activity parameters that correspond to parameters in the
Activity specification operation.The Activity shown previously in
Figure 1 contains three Activity Parameter nodes that
represent customerInfo:
-
Customer
-
purchaseOrder: PurchaseOrder
-
invoice: Invoice
Note:
It is mandatory that Activity parameters match the
signature of the operation's parameters.
The UML-to-BPEL transformation generates a BPEL Receive activity with two output
parameters, which code Listing 1 illustrates.
Listing 1. BPEL Receive activity in the process for processPurchaseOrder
<bpws:receive createInstance="yes" name="processPurchaseOrder"
operation="processPurchaseOrder" partnerLink="purchasingPurchasing"
portType="ns2:Purchasing">
<wpc:output>
<wpc:parameter name="customerInfo" variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="purchaseOrder" variable=
"processpurchaseorder_purchaseOrder"/>
</wpc:output>
</bpws:receive>
|
There are three activity partitions (Invoicing, Shipping, and Scheduling) in the
Receive activity that represent each port in the Component. They represent the
properties of each partition as they are set to their corresponding ports in the
Component. A control flow begins with an initialNode in the Receive activity, and
it is connected to a forkNode. Three controlFlows are starting from the forkNode,
and each one is connected to separate Action. This indicates that multiple
sequences of actions are going to run when the control reaches to the forkNode.
The UML-to-BPEL transformation generates a BPEL Flow activity and three BPEL
sequences in the flow.
A control flow starts from the initialNode, and it is connected to a forkNode.
Three controlFlows are starting from the forkNode, and each one is connected to an
Action. This indicates that multiple sequences of actions can execute
simultaneously when the control reaches to the forkNode. The UML-to-BPEL
transformation generates a BPEL Flow activity and three BPEL sequences in the
flow.
Let's examine the first outgoing control flow from the forkNode. The
flow is connected to an Action called initiatePriceCalculation (a Call Operation
action), and the UML operation for the action is set to this:
PurchaseOrderProcess::com::acme::credit:
:Invoicing::initiatePriceCalculationOperation(customerInfo
: Customer, purchaseOrder : PurchaseOrder) |
Hence, the Action contains three inputPins. The right-most inputPin is a
targetInputPin (the name of the pin is empty, because the action is part of an
activity partition). The first and second inputPins indicate that there are two
input parameters for the operation associated with the Action. The name of the pin
must represent a data object. That object could be the name of the UML Variable,
UML Property, or UML Parameter that must exist in the UML Activity or UML
Component. In this model, customerInfo and purchaseOrder are parameters in the
Activity. The UML-to-BPEL transformation generates a BPEL Invoke activity with two
input parameters, as Listing 2 shows.
Listing 2. BPEL Invoke activity in the process for initiatePriceCalculation
<bpws:invoke name="initiatePriceCalculation" operation="initiatePriceCalculation"
partnerLink="invoicingInvoicingPartner" portType="ns3:Invoicing">
<wpc:input>
<wpc:parameter name="customerInfo"
variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="purchaseOrder"
variable="processpurchaseorder_purchaseOrder"/>
</wpc:input>
</bpws:invoke>
|
The outgoing control flow from the initiatePriceCalculation action is connected
to the completePriceCalculation action (a Call Operation action) with this setting
for the UML operation for the Action:
PurchaseOrderProcess::com::acme::credit::Invoicing::completePriceCalculation
(shippingInfo : Manifest)
|
The Action contains two inputPins (the right-most inputPin is a targetInputPin,
but its name is empty because the action is part of an Activity partition). The
single inputPin indicates that there is one input parameter for the operation
associated with the action. The name of the pin must represent a data object,
which could be the name of the UML Variable, UML Property, or UML Parameter that
must exist in the UML Activity or UML Component. In this model, shippingInfo is a
UML property in the Component. You have probably noticed that there is another
incoming control from the requestShipping action, which indicates that the
completePriceCalculation action must be invoked before completing the action
called requestShipping.
The UML-to-BPEL transformation generates a BPEL Invoke activity with an input
parameter, a target BPEL link for the requestShipping action, and a link that will
be set as a source BPEL link in the Invoke activity for the requestShipping
action, which you can see in Listing 3.
Listing 3. BPEL Invoke activity in the process for completePriceCalculation
<bpws:invoke name="completePriceCalculation"
operation="completePriceCalculation" partnerLink="invoicingInvoicingPartner"
portType="ns3:Invoicing">
<wpc:input>
<wpc:parameter name="shippingInfo" variable="shippingInfo"/>
</wpc:input>
<bpws:targets>
<bpws:target linkName="processPurchaseOrderLink1"/>
</bpws:targets>
</bpws:invoke>
|
The outgoing control flow from the completePriceCalculation action is connected
to the processInvoice action (an Accept Call action). The triggers that come from
this action contain one CallEvent, with this setting for its associated operation:
PurchaseOrderProcess::org::ordermanagement::InvoiceProcessing::processInvoice
(invoice : Invoice)
|
The Action contains two outputPins (the right-most outputPin represents
returnInforation property of the action). The single outputPin indicates that
there is one input parameter for the operation associated with the action. The
name of the pin must represent a data object, which could be the name of the UML
Variable, UML Property, or UML Parameter that must exist in the UML Activity or
UML Component. In this example, Invoice is a parameter in the Activity. The
UML-to-BPEL transformation generates a BPEL Receive activity with an output
parameter.
Two other sequences of control flows from the forkNode are processed similarly.
At the end, a BPEL Reply activity is generated, because the
Activity::specification operation contains a return parameter. (In this example,
the Activity specification operation is
PurchaseOrderProcess::org::ordermanagement::Purchasing::processPurchaseOrder.) This is shown in Listing 4.
Listing 4. BPEL Reply activity in the process for processPurchaseOrder
<bpws:reply name="processPurchaseOrder" operation=
"processPurchaseOrder" partnerLink="purchasingPurchasing" portType=
"ns2:Purchasing">
<wpc:input>
<wpc:parameter name="result"
variable="processpurchaseorder_result"/>
</wpc:input>
</bpws:reply>
|
Listing 5 shows the full BPEL file that is generated by the UML-to-BPEL
transformation for the orderProcessor component.
Listing 5. Full list of generated BPEL processes
<?xml version="1.0" encoding="UTF-8"?>
<bpws:process xmlns:bpws="
http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:ns="http://org/ordermanagement/OrderProcessorArtifacts/"
xmlns:ns0="http://org/crm/"
xmlns:ns1="http://org/crm/domain/"
xmlns:ns2="http://org/ordermanagement/Purchasing/"
xmlns:ns3="http://com/acme/credit/Invoicing/"
xmlns:ns4="http://org/ordermanagement/InvoiceProcessing/"
xmlns:ns5="http://com/acme/shipping/Shipping/"
xmlns:ns6="http://org/ordermanagement/ScheduleProcessing/"
xmlns:ns7="http://com/acme/productions/Scheduling/"
xmlns:wpc="http://www.ibm.com/xmlns/prod/websphere/business-process/6.0.0/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" expressionLanguage="
http://www.ibm.com/xmlns/prod/websphere/business-process/expression-lang/java/6.0.0/"
name="OrderProcessor" suppressJoinFailure="yes" targetNamespace="
http://org/ordermanagement/OrderProcessor/"> <bpws:import importType="
http://schemas.xmlsoap.org/wsdl/"
location="OrderProcessorArtifacts.wsdl" namespace="
http://org/ordermanagement/OrderProcessorArtifacts/"/>
<bpws:import importType="
http://www.w3.org/2001/XMLSchema"
location="../../../PurchaseOrderProcess/org/crm/PurchaseOrder.xsd"
namespace="http://org/crm/"/>
<bpws:import importType="
http://www.w3.org/2001/XMLSchema"
location="../../../PurchaseOrderProcess/org/crm/Invoice.xsd"
namespace="http://org/crm/"/>
<bpws:import importType="
http://www.w3.org/2001/XMLSchema"
location="../../../PurchaseOrderProcess/org/crm/Manifest.xsd"
namespace="http://org/crm/"/>
<bpws:import importType="
http://www.w3.org/2001/XMLSchema" location="
../../../PurchaseOrderProcess/org/crm/domain/Customer.xsd"
namespace="http://org/crm/domain/"/>
<bpws:import importType="
http://www.w3.org/2001/XMLSchema"
location="../../../PurchaseOrderProcess/org/crm/Schedule.xsd"
namespace="http://org/crm/"/> <bpws:partnerLinks>
<bpws:partnerLink myRole="PurchasingRole"
name="purchasingPurchasing"
partnerLinkType="ns:PurchasingPLT"/>
<bpws:partnerLink name="
invoicingInvoicingPartner"
partnerLinkType="ns:InvoicingPLT"
partnerRole="InvoicingRole"/>
<bpws:partnerLink myRole="InvoiceProcessingRole"
name="invoicingInvoiceProcessing"
partnerLinkType="ns:InvoiceProcessingPLT"/>
<bpws:partnerLink name="schedulingSchedulingPartner"
partnerLinkType="ns:SchedulingPLT"
partnerRole="SchedulingRole"/>
<bpws:partnerLink name="shippingShippingPartner"
partnerLinkType="ns:ShippingPLT"
partnerRole="ShippingRole"/>
<bpws:partnerLink myRole="ScheduleProcessingRole"
name="shippingScheduleProcessing"
partnerLinkType="ns:ScheduleProcessingPLT"/>
</bpws:partnerLinks> <bpws:variables>
<bpws:variable name="id"
type="xsd:string"/>
<bpws:variable name="shippingInfo"
type="ns0:Manifest"/>
<bpws:variable name="schedule"
type="ns0:Schedule"/>
<bpws:variable name="
processpurchaseorder_customerInfo"
type="ns1:Customer"/>
<bpws:variable name="
processpurchaseorder_purchaseOrder"
type="ns0:PurchaseOrder"/>
<bpws:variable name="
processpurchaseorder_result"
type="ns0:Invoice"/> </bpws:variables>
<bpws:sequence name="Sequence">
<bpws:receive createInstance="yes"
name="processPurchaseOrder"
operation="processPurchaseOrder"
partnerLink="purchasingPurchasing"
portType="ns2:Purchasing"> <wpc:output>
<wpc:parameter name="customerInfo"
variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="purchaseOrder"
variable="processpurchaseorder_purchaseOrder"/>
</wpc:output> </bpws:receive>
<bpws:scope name="
processPurchaseOrder">
<bpws:flow name="
processPurchaseOrderFlow"> <bpws:links>
<bpws:link name="
processPurchaseOrderLink1"/> <bpws:link name="
processPurchaseOrderLink2"/> </bpws:links>
<bpws:sequence name="Sequence3">
<bpws:invoke name="
initiatePriceCalculation" operation="
initiatePriceCalculation" partnerLink="
invoicingInvoicingPartner"
portType="ns3:Invoicing"> <wpc:input>
<wpc:parameter name="customerInfo"
variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="purchaseOrder"
variable="processpurchaseorder_purchaseOrder"/>
</wpc:input> </bpws:invoke>
<bpws:invoke name="completePriceCalculation"
operation="completePriceCalculation"
partnerLink="invoicingInvoicingPartner"
portType="ns3:Invoicing"> <wpc:input>
<wpc:parameter name="shippingInfo"
variable="shippingInfo"/>
</wpc:input> <bpws:targets>
<bpws:target linkName="
processPurchaseOrderLink1"/>
</bpws:targets> </bpws:invoke>
<bpws:receive name="processInvoice"
operation="processInvoice"
partnerLink="invoicingInvoiceProcessing"
portType="ns4:InvoiceProcessing">
<wpc:output>
<wpc:parameter name="invoice"
variable="processpurchaseorder_result"/>
</wpc:output> </bpws:receive>
</bpws:sequence> <bpws:sequence name="Sequence4">
<bpws:assign name="Assign1">
<bpws:copy> <bpws:from
variable="processpurchaseorder_purchaseOrder">
<bpws:query queryLanguage="
http://www.w3.org/TR/1999/REC-xpath-19991116"><!
[CDATA[/oid]]></bpws:query>
</bpws:from> <bpws:to variable="
processpurchaseorder_customerInfo">
<bpws:query queryLanguage="
http://www.w3.org/TR/1999/REC-xpath-19991116"><!
[CDATA[/firstname]]></bpws:query>
</bpws:to></bpws:copy>
</bpws:assign><bpws:invoke name="requestShipping"
operation="requestShipping"
partnerLink="shippingShippingPartner"
portType="ns5:Shipping">
<wpc:input>
<wpc:parameter name="customerInfo"
variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="shippingInfo"
variable="shippingInfo"/>
</wpc:input><bpws:sources>
<bpws:source linkName="processPurchaseOrderLink1"/>
</bpws:sources> </bpws:invoke>
<bpws:receive name="processSchedule"
operation="processSchedule"
partnerLink="shippingScheduleProcessing"
portType="ns6:ScheduleProcessing">
<wpc:output>
<wpc:parameter name="schedule"
variable="schedule"/>
</wpc:output> <bpws:sources>
<bpws:source linkName="
processPurchaseOrderLink2"/>
</bpws:sources> </bpws:receive>
</bpws:sequence> <bpws:sequence name="Sequence5">
<bpws:invoke name="
requestProductionScheduling" operation="
requestProductionScheduling" partnerLink="
schedulingSchedulingPartner"
portType="ns7:Scheduling"> <wpc:input>
<wpc:parameter name="customerInfo"
variable="processpurchaseorder_customerInfo"/>
<wpc:parameter name="purchaseOrder"
variable="processpurchaseorder_purchaseOrder"/>
</wpc:input> </bpws:invoke>
<bpws:invoke name="sendShippingSchedule"
operation="sendShippingSchedule"
partnerLink="schedulingSchedulingPartner"
portType="ns7:Scheduling"> <wpc:input>
<wpc:parameter name="schedule"
variable="schedule"/>
</wpc:input> <bpws:targets>
<bpws:target linkName="
processPurchaseOrderLink2"/>
</bpws:targets>
</bpws:invoke>
</bpws:sequence>
</bpws:flow>
</bpws:scope>
<bpws:reply name="processPurchaseOrder"
operation="processPurchaseOrder"
partnerLink="purchasingPurchasing"
portType="ns2:Purchasing">
<wpc:input>
<wpc:parameter name="result"
variable="processpurchaseorder_result"/>
</wpc:input>
</bpws:reply>
</bpws:sequence>
</bpws:process>
|
 |
Interpretation of UML elements by UML-to-BPEL transformation
The UML-to-BPEL transformation uses specific information from a UML model to
generate BPEL artifacts. An incorrect or incomplete model can generate errors or
incorrect BPEL artifacts, or both. You will want to avoid this, of course. The
following tables should help you understand the expected outcomes that will derive
from various transformation activities.
Transformation of UML elements
Table 1 lists the UML elements that the transformation supports and the
corresponding BPEL construct or activity that the transformation creates.
Table 1. UML elements and BPEL results
| UML element | Transformation output |
|---|
| Component | The transformation creates a BPEL process with the same name as the
component if the component contains one or more activities. The component
provides the context for all of its owned behaviors and for the variables in
the corresponding BPEL process. If the component contains an empty
activity, the transformation creates an empty BPEL Scope activity for each
operation in the provided interfaces.
The namespace for the BPEL process and associated WSDL artifacts file
includes an element for the component and its containing packages.
|
|---|
| Component::ownedAttribute | If the type that is specified in the Type property of the owned attribute is
not a component with ports, the transformation creates a BPEL variable in the
corresponding BPEL process. |
|---|
| AcceptCallAction | A BPEL Receive activity is generated. The transformation examines the
list of triggers associated with the action to determine which operation is
associated with the CallEvent type, and to determine which operation maps to
the BPEL operation.
When the name of the pin is not empty and the
name must match a port name, the transformation generates the partner by
using the name of the output pin that is associated with the
ReturnInformation property of the action . Otherwise, the transformation
uses the ActivityPartition::represents property where the value of the
ActivityPartition::represents property must be either a port or a type of
port. The operation container must be a provided interface in one of the
ports through which it receives the call.
The number of output pins
in the action must match the number of [out] parameters of the operation.
The action must also contain an extra output pin that represents the Return
Information property of the action.
|
|---|
AcceptEventAction with no incoming
edges
AcceptEventAction with one or more incoming
edges
AcceptEventAction with a trigger whose event is a
SignalEvent | A BPEL flow is generated when there are one or more SignalEvents in the
AcceptEventAction::triggers. BPEL does not support multiple incoming
ControlFlows and multiple incoming object flows to the same InputPin on the
action.
A BPEL Receive activity is generated. The operation is derived from the
reception that signifies that the signal can be received.
Note:
An AcceptEventAction must be in an ActivityPartition that represents a
port or type of a port through which it receives the event. The provided
interface for the port must contain a reception for each signal. An
AcceptEventAction must have an OutputPin for each signal that is associated
with the SignalEvents in the AcceptEventAction::triggers. The pin type must
match the signal type.
|
|---|
AcceptEventAction with a trigger whose event
must be a TimeEvent.
Time expression is associated with the
TimeEvent::when property | A BPEL wait activity is generated. The For or Until attribute of the
BPEL wait activity is set based on the time expression.
To specify a value for the Until attribute, the expression must be in the
following format: year, month, date, hour, minute, second.
To specify a value for the For attribute, the expression must the in the
following format: number of years, months, days, hours, minutes, and
seconds.
Note: You cannot specify multiple time events.
|
|---|
| Activity that is an owned behavior of a component
and a method of an operation provided by that component | The transformation creates a BPEL Scope activity in the top-level flow of
the BPEL process for the component. |
|---|
| Activity::Specification | If the component contains only one activity, the transformation creates a
top-level BPEL Receive activity for the operation that is associated with the
specification. If the component contains multiple activities, the
transformation creates a BPEL Pick activity and onMessage event type for
each operation that is associated with each Activity::Specification.
If the specification operation contains an Out or Return parameter, the
transformation creates a BPEL Reply activity.
|
|---|
| Activity::ownedParameter:Parameter | The transformation creates a BPEL process variable in the BPEL process that
corresponds to the component. The variable names must be qualified with the
activity name to ensure that there is no collision with parameters of other
activities in the component.
Parameter names and operation types that are associated with the activity
specification must have activity parameters that match in both name and
type.
|
|---|
| Activity::ownedAttribute:Property | The transformation creates a BPEL variable in the top-level Scope element
for the activity in the process. |
|---|
| Activity::variable:Variable | The transformation creates a BPEL variable in the top-level scope for the
activity in the process. |
|---|
| ActivityFinalNode | The transformation creates a BPEL Terminate activity. |
|---|
| ActivityPartition::represents | The Represents property value must be a port or type of a port. The
transformation generates a BPEL partner link for each provided or required
interface in the port.
This enables the transformation to identify the correct BPEL partner for
the operation that is associated with actions in the partition.
|
|---|
| CallOperationAction | A BPEL Invoke activity is generated. When the name of the pin is not
empty and the name of the pin must match a port name, the transformation
generates the partner by using the name of the target input pin . Otherwise,
the transformation uses the ActivityPartition::represents property, and the
value of the ActivityPartition::represents property must be either a port or
the type of a port. The operation container must be a required interface in
one of the ports through which it invokes the operation.
The number
of input pins in the action must match the number of [in] parameters in the
operation. The action must also contain an extra input pin that represents
the target input pin of the action.
The number of output pins in the
action must match number of [out] parameters in the operation.
|
|---|
| InitialNode | The transformation uses this element to indicate the start of a BPEL
activity; it does not create any BPEL artifacts for this node. |
|---|
| OpaqueAction | The transformation creates a BPEL assign activity when the name of the
operation uses an expression such as lvalue:= rvalue, where the lvalue sets a
BPEL to variant and the rvalue sets a BPEL from variant. For multiple
assignments, you can use a semicolon (;) as a separator: aVar:=bVar ;
cVar:=dVar. The transformation creates a BPEL Java™ snippet when
the language property of the action is set to Java, and the value of the
body property that is associated with the action is placed in the snippet.
The transformation creates an empty BPEL human task when the language
property of the action is set to HTML or JSP (Java™Server Page).
|
|---|
| SendSignalAction | A BPEL Invoke activity is generated. The operation of the BPEL invoke
corresponds to the reception of the SendSignalAction::signal property. When
the name of the pin is not empty, the partner is generated by using the name
of the target input pin. Otherwise, the transformation uses the
ActivityPartition::represents property.
The operation container must
be a required interface in one of the ports through which it sends the
events. The target pin name must match the port name when the pin name is
not empty.
Or the value of the ActivityPartition::represents property
must be either a port or the type of a port.
|
|---|
Transformation of UML Activity edges
Table 2 lists the Activity edge types that the transformation supports and the
corresponding BPEL sequence and links that the transformation creates.
Table 2. UML Activity edge types and corresponding BPEL sequences and links
| UML activity edge | Transformation output |
|---|
| ControlFlow | The transformation creates a BPEL sequence and links for concurrency
control. |
|---|
| ObjectFlow | The transformation creates a BPEL sequence and links for concurrency
control. If necessary, the transformation generates variables based on the
object flow name. The generated name is applied if the name of the object
flow is empty.
|
|---|
Transformation of control or decision nodes
Table 3 lists the control and decision nodes that the transformation supports and the corresponding BPEL output that the transformation creates.
Table 3. UML control and decision nodes and BPEL output
| Control or decision node | Transformation output |
|---|
| DecisionNode | The transformation creates a BPEL Switch activity and a BPEL Case branch
for each outgoing flow from this node. A BPEL sequence is created in each BPEL
Case branch to accommodate the BPEL activity that is generated from the target
of each outgoing flow. Each guard of each outgoing flow sets the BPEL
condition for the BPEL Case branch. The transformation creates a BPEL
Otherwise branch for the outgoing flow when the guard value equals Else and
the language property is empty.
|
|---|
| ForkNode | The transformation generates code that specifies the start of a BPEL flow
activity: <flow name="ForkNode.name">
In a <flow> activity, the transformation creates a nested
BPEL Sequence activity for each flow that exits the fork node.
|
|---|
| JoinNode | The transformation generates code that specifies the end of a BPEL flow
activity: </flow> |
|---|
| MergeNode | The transformation creates BPEL links between the source nodes of each
incoming flow to the merge node and the target node of the outgoing flow of
the merge node. |
|---|
Transformation of object nodes
Table 4 lists the object nodes that the transformation supports and the
corresponding BPEL activity that the transformation generates.
Table 4. UML object nodes and corresponding
BPEL activity
| Control or Object node | Transformation output |
|---|
| ActivityParameterNode | The transformation does not create corresponding BPEL artifacts. The
transformation examines ActivityParameterNode object nodes to determine the
sequence order only if object flows are connected to the
ActivityParameterNode object node. The ActivityParameterNode object node
must have corresponding activity parameters.
|
|---|
| LoopNode | The transformation creates a BPEL While activity for each LoopNode in the
UML activity that is an owned behavior of a UML component. |
|---|
| LoopNode::decider | The transformation creates a BPEL condition for the BPEL while activity by
using the BPEL variable that is associated with the output pin. The
associated output pin must be of type UMLPrimitiveTypes::Boolean.
|
|---|
| UML elements inside LoopNode | In the BPEL while activity, the transformation creates appropriate BPEL
activities for UML elements that are supported by the UML-to-BPEL
transformation. |
|---|
| InputPin | The transformation examines InputPin elements when the owner of the input
pin is an instance of an AcceptCallAction, CallOperationAction, or
OpaqueAction action. The number of input pins must match the [in]
parameters of the operation that is associated with the action that owns the
input pin. An additional input pin must represent the
<<target>> input pin only when the action is an
instance of CallOperationAction.
If an input pin is not connected to
an activity by an object flow edge, the name of the pin must correspond to
an activity parameter, variable, or attribute in the activity or the
component that owns the activity.
|
|---|
| OutputPin | The transformation examines OutputPin elements when the owner of the output
pin is an instance of an AcceptCallAction, CallOperationAction, or
OpaqueAction action. When the action is an instance of CallOperationAction
or AcceptCallAction, the number of pins must match the [out] parameters of
the operation that is associated with the action that owns the output pin.
When the action is an instance of AcceptCallAction, an additional output
pin must represent the Return Information property for the action that owns
the pin . If the output pin is not connected to an activity by an
object flow edge, the pin must have a valid name that corresponds to an
activity parameter, variable, or attribute in the activity or the component
that owns the activity.
If the output pin does not have any incoming or outgoing object flow edges,
the transformation uses the corresponding BPEL variable to create a BPEL
output parameter for the corresponding operation that is associated with the
action that owns the pin.
|
|---|
Transformation of loop nodes
Table 5 lists loop node elements that the transformation supports, and the
corresponding BPEL activity that the transformation generates.
Table 5. UML loop node elements and BPEL
activity generated
| Loop node or loop node element | Transformation output |
|---|
| LoopNode | The transformation creates a BPEL while activity for each LoopNode in the
UML activity that is an owned behavior of a UML component. |
|---|
| LoopNode::decider | The transformation creates a BPEL condition for the BPEL While activity by
using the BPEL variable that is associated with the output pin. The
associated output pin must be of type UMLPrimitiveTypes::Boolean.
|
|---|
| UML elements inside LoopNode | In the BPEL While activity, the transformation creates appropriate BPEL
activities for UML elements that are supported by the UML-to-BPEL
transformation. |
|---|
Where to learn more
Now that you understand the basics of UML-to-BPEL transformation and some of the
details of how to model a BPEL Process implementation in UML, you might want to
read some of the related articles listed in Resources to find use case scenarios.
Resources Learn
Get products and technologies
Discuss
About the author  | |  | Murali Pattathe is an IBM Rational advisory software developer in the IBM Ottawa Lab, Ontario, Canada. He has more than 15 years of experience in designing and developing applications and tools for the software development industry. He was involved in developing many other transformations, as well as transformation frameworks. |
Rate this page
|  |