Choreography is used to define which Business Transaction follows which Business Transaction. The realisation of the choreography is done with the Transition class. A Binary Collaboration has several Transitions. And a Transition has a ``from'' Business State and a ``to'' Business State. The UML diagram for the Choreography in figure 8 shows the abstract Business State class. The classes inheriting from the Business State class are a Start class, a Completion class (Success and failure class), a Fork class, a Join Class and most important a Business Activity class. Obviously the Start state is the first state of a Business Collaboration and the Completion state (success or failure) the last state of a Business Collaboration. Between start and completion, we have the different Business Activities. The Fork and Join classes are used for ``if then else'' cases. Depending on the outcome of an activity the next state will be different and a different transition occurs. Each Transition has a condition guard and a condition expression.
|
The next XML code shows a Binary Collaboration with two Business Transaction Activities. The transition tag defines the transition between the ``from'' state and the ``to'' state. The Success and Failure tags the outcome of the Binary Collaboration. Within these tags the condition guards are placed.
<BinaryCollaboration name=''Product Fulfillment'' timeToPerform=''P5D''>
<Documentation>
timeToPerform = Period: 5 days from start of transaction
</Documentation>
<InitiatingRole name=''buyer''/>
<RespondingRole name=''seller''/>
<BusinessTransactionActivity name=''Create Order''
businessTransaction=''Create Order''
fromAuthorizedRole=''buyer''
toAuthorizedRole=''seller''/>
<BusinessTransactionActivity name=''Notify shipment''
businessTransaction=''Notify of advance shipment''
fromAuthorizedRole=''buyer''
toAuthorizedRole=''seller''/>
<Start toBusinessState=''Create Order''/>
<Transition
fromBusinessState=''Create Order''
toBusinessState=''Notify shipment''/>
<Success
fromBusinessState=''Notify shipment''
conditionGuard=''Success''/>
<Failure
fromBusinessState=''Notify shipment''
conditionGuard=''BusinessFailure''/>
</BinaryCollaboration>
The next XML code show a MultiParty Collaboration. The MultiParty Collaboration includes the business partner roles and defines what the performances are for those roles. Within the performances the Binary Collaborations are referenced including the role name within that Binary Collaboration for the role within the MultiParty Collaboration. Further are the transitions defined within the business partner roles with the Binary Collaboration, the ``from'' state and the ``to'' state, which are Binary Collaborations.
<MultiPartyCollaboration name=''DropShip''>
<BusinessPartnerRole name=''Customer''>
<Performs initiatingRole=
'//binaryCollaboration[@name=''Firm Order'']
/InitiatingRole[@name=''buyer'']'/>
</BusinessPartnerRole>
<BusinessPartnerRole name=''Retailer''>
<Performs respondingRole=
'//binaryCollaboration[@name=''Firm Order'']
/RespondingRole[@name=''seller'']'/>
<Performs initiatingRole=
'//binaryCollaboration[@name=''Product Fulfillment'']
/InitiatingRole[@name=''buyer'']'/>
<Transition
fromBinaryCollaboration''Firm Order''
fromBusinessState=
'//binaryCollaboration[@name=''Firm Order'']
/[@name=''Create Order'']'
toBusinessState=
'//binaryCollaboration[@name=''Product Fulfillment'']
/[@name=''Create Order'']'
</BusinessPartnerRole>
<BusinessPartnerRole name=''DropShip Vendor''>
<Performs respondingRole=
'//binaryCollaboration[@name=''Product Fulfillment'']
/RespondingRole[@name=''seller'']'/>
</BusinessPartnerRole>
</MultiPartyCollaboration>