Slide 1 - pluto.cse.fau.edu - Florida Atlantic University

Document Sample
Slide 1 - pluto.cse.fau.edu - Florida Atlantic University Powered By Docstoc
					Orchestration of Web Services
        -- a tutorial --

             John C. Sloan
    -- Florida Atlantic University --
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
    How web services can presently be developed
D                                                                            S
E                                                  2.                        Y
V             1. WSDL                             UDDI                       N
E             Compliant          Submit         Compliant                    D
L             Interface                          Registry                     I
O                                                                            C
P                                                                            A
                                                                 This tutorial
E                                                                            T
                                                                   This tutorial
                                                               addresses this
R                                   B                                        O
                          T                                       addressesRthis
                                                               step in the web
                                    U            Consult
                          E                                 step in the web
                          S         I             and services development
    4. LTL/CTL                      L                    services developmen
                                                               cycle
                          T                     Compose
     formulae                       D                            cycle
                          E
                          R         E
                                    R
                                               3. WS-BPEL
      Model       4. State                      Compliant
                                  Convert
      Check       Machine                      Orchestration




    4. Counter-      4. Model
                                            Deploy composition
     examples         Is valid
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
  along with in-house developed systems.
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
  along with in-house developed systems.
• Trade secrets: a desire by management to avoid disclosure of how their
  particular service is implemented by providing only a public interface.
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
  along with in-house developed systems.
• Trade secrets: a desire by management to avoid disclosure of how their
  particular service is implemented by providing only a public interface.
• Minimize embrittlement by not requiring interacting parties to know
  what must happen behind service endpoints.
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
  along with in-house developed systems.
• Trade secrets: a desire by management to avoid disclosure of how their
  particular service is implemented by providing only a public interface.
• Minimize embrittlement by not requiring interacting parties to know
  what must happen behind service endpoints.
• Data standardization: emerging use of structured self-describing data
  with common definitions.
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
   along with in-house developed systems.
• Trade secrets: a desire by management to avoid disclosure of how their
   particular service is implemented by providing only a public interface.
• Minimize embrittlement by not requiring interacting parties to know
  what must happen behind service endpoints.
• Data standardization: emerging use of structured self-describing data
  with common definitions.
• Independently upgradeable: ability for service providers to substitute
  or upgrade their services, typically during runtime, without knowledge
  of the orchestration artifact.
Drivers toward Orchestration:
• Reuse: Compose distributed applications out of existing ones
• Platform neutrality: no one platform (ie: DCOM, CORBA, .NET) will be
  universally adopted due to market forces (ie: acquisitions)
• Source heterogeneity: need to glue solutions from multiple vendors and
   along with in-house developed systems.
• Trade secrets: a desire by management to avoid disclosure of how their
   particular service is implemented by providing only a public interface.
• Minimize embrittlement by not requiring interacting parties to know
  what must happen behind service endpoints.
• Data standardization: emerging use of structured self-describing data
  with common definitions.
• Independently upgradeable: ability for service providers to substitute
  or upgrade their services, typically during runtime, without knowledge
  of the orchestration artifact.

As a first class object, an orchestration artifact coordinates activities
between individual services. It does nothing else. In this sense, it
functions as an ideal manager, while each service functions as an
ideal worker. -- Arbab IWIM model [072?]
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
                         W
                         S   Legacy
                         D
                         L   system




                 S
                 O
                     A
    WS-BPEL




                     P
W   activities
S
D
L     state
                         W
                         S   Legacy
                         D
                         L   system




                 S
                 O
                     A
    WS-BPEL




                     P
W   activities
S
D
L     state




                     P
                     A
                 O
                 S
                         W   In-house
                         S
                         D      web
                         L    service
                                                 W
                                                 S   Legacy
                                                 D
                                                 L   system




                                         S
                                         O
                                             A
                            WS-BPEL




                                             P
W                           activities
S
D
L                             state
                    S




                                             P
                    O




                                             A
                        A




                                         O
                        P




                                         S
    W                                            W   In-house
        3rd party
    S                                            S
    D      web                                   D      web
    L   service                                  L    service
    W                                            W
    S                                            S   Legacy
    D
         BPEL                                    D
    L                                            L   system




                                         S
                        P




                                         O
                        A




                                             A
                    O
                            WS-BPEL




                                             P
W                   S       activities
S
D
L                             state
                    S




                                             P
                    O




                                             A
                        A




                                         O
                        P




                                         S
    W                                            W   In-house
        3rd party
    S                                            S
    D      web                                   D      web
    L   service                                  L    service
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
Orchestration Concepts:
• Choreography: A peer-coupled form of interaction where each peer maintains state.
• Composite Application (web service composition): A collection of partner links that are
‘glued’ together by a workflow script, so as to define a process.
• Control flow: A dependency between two activities in which the locus of control passes
from one activity to one or more subsequent activities.
• Correlation Set: Conceptually similar to primary and secondary keys in relational
databases, except a match results in triggering an activity or instantiating a process.
Properties that make up a correlation set together uniquely identify a conversation.
• Data flow: A dependency between two activities involving the transfer of data from
sender to receiver required for the receiving activity to complete.
• Orchestration: a form of interaction in which both coordination and state maintenance is
a centrally located.
• Partner: A provider of a service, the activities of which are coordinated by a workflow
script, with its interface defined in WSDL.
• Partner Link Type: A type declaration in which all providers of that type will provide
equivalent services.
• Process instance (executing case): The execution of a set of related activities to carry
out an identifiable objective having distinct starting and ending times.
• Service: Software functionality offered solely through a well-defined network-accessible
interface typically defined in WSDL.
• Task (activity): An application-specific unit of work that may involve multiple services.
• Workflow schema: A workflow script or artifact used to syntactically represent both
control and data dependencies between tasks, and implementing an orchestration (ie:
WS-BPEL) or possibly a choreography (ie: WS-CDL).
Referential network for Orchestration concepts
               Composite application (web service composition)


                                                               Parner link type


       Correlation set                                             Partner


                         Workflow schema (“glue code” -- WS-BPEL artifact)

Process instance     Control flow      Data flow
(executing case)

                                             Orchestration    Choreography


              Task (activity)


                                                   Service
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
• A message is suitable if the values of its correlation sets match to those values
  expected by the correlation set of the receiving activity.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
• A message is suitable if the values of its correlation sets match to those values
  expected by the correlation set of the receiving activity.
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
• A message is suitable if the values of its correlation sets match to those values
  expected by the correlation set of the receiving activity.

     These observations suggest some self-adaptive runtime data structure:


    ConvId_1


                        ActId_1
   ConvId_2
                           ActId_3


              ActId_5                       ActId_4
BPEL example:
01   <process name=. purchaseOrderProcess . .. .. >
12   <partnerLinks >
13     <partnerLink name=. pOP. partnerLinkType =.pltOP . .. / > ..
21   </partnerLinks >
23   <variables >
24     <variable name=. vPO. messageType =.mtPO. / > ..
28   </variables >
30   <sequence >
31     <receive partnerLink =.pOP. operation=. placeOrder . variable=. vPO.. .. > ..
36     <flow >
41       <links > < link name=. xStI. / > < /links >
43       <sequence >
44         <assign > .. </assign >
50         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vAvl. .. >
55             <sources > < source linkName =.xStI. / > < /sources >
57         </invoke >
58       </sequence >
59       <sequence >
60         <invoke partnerLink =.pPay. inputVariable =.vPO. .. faultProne =.yes. >
64             <targets > < target linkName =.xStI. / > < /targets >
66         </invoke >
67         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vShI. ..
72         <receive partnerLink =.pPay. variable=. vNvc. .. / >
74       </sequence >
75     </flow >
76     <reply partnerLink =.pOP. operation=. placeOrder . variable=. vNvc. .. > ..
80   </sequence>
91   </process>
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
• A message is suitable if the values of its correlation sets match to those values
  expected by the correlation set of the receiving activity.

     These observations suggest some self-adaptive runtime data structure:

                                           … where ConvId uniquely identifies a
    ConvId_1                               conversation either as a conversation
                                           number (think “primary key”) or as
                                           attribute values with respect to a
                        ActId_1            correlation set (think “secondary key”).
   ConvId_2
                           ActId_3


              ActId_5                       ActId_4
Correlation sets:
• Conversations coordinated by a workflow script (ie: in WS-BPEL) proceed
  asynchronously. Communication between activities are via “drop-boxes”.
• Asynchrony requires tying responses to requests via some unique conversation
  number, or by values with respect to attributes in some correlation set.
• Asynchrony promotes loose coupling via channels with ports at each end.
• Message correlation ensures message delivery to the correct process instance.
• A message is suitable if the values of its correlation sets match to those values
  expected by the correlation set of the receiving activity.

     These observations suggest some self-adaptive runtime data structure:

                                           … where ConvId uniquely identifies a
    ConvId_1                               conversation either as a conversation
                                           number (think “primary key”) or as
                                           attribute values with respect to a
                        ActId_1            correlation set (think “secondary key”).
   ConvId_2
                           ActId_3
                                                                  .. Where ActId
                                                                  identifies an
              ActId_5                       ActId_4               activity within a
                                                                  workflow script.
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
Activities (Tasks):
• May either be basic, structured, or composite.
Activities (Tasks):
• May either be basic, structured, or composite.
• Basic activities are those built into WS-BPEL that provide the building blocks
  for a workflow. They perform state management, communication, and
  exception handling.
BPEL example:
01   <process name=. purchaseOrderProcess . .. .. >
12   <partnerLinks >
13     <partnerLink name=. pOP. partnerLinkType =.pltOP . .. / > ..
21   </partnerLinks >
23   <variables >
24     <variable name=. vPO. messageType =.mtPO. / > ..
28   </variables >
30   <sequence >
31     <receive partnerLink =.pOP. operation=. placeOrder . variable=. vPO.. .. > ..
36     <flow >
41       <links > < link name=. xStI. / > < /links >
43       <sequence >
44         <assign > .. </assign >
50         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vAvl. .. >
55             <sources > < source linkName =.xStI. / > < /sources >
57         </invoke >
58       </sequence >
59       <sequence >
60         <invoke partnerLink =.pPay. inputVariable =.vPO. .. faultProne =.yes. >
64             <targets > < target linkName =.xStI. / > < /targets >
66         </invoke >
67         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vShI. ..
72         <receive partnerLink =.pPay. variable=. vNvc. .. / >
74       </sequence >
75     </flow >
76     <reply partnerLink =.pOP. operation=. placeOrder . variable=. vNvc. .. > ..
80   </sequence>
91   </process>
Activities (Tasks):
• May either be basic, structured, or composite.
• Basic activities are those built into WS-BPEL that provide the building blocks
  for a workflow. They perform state management, communication, and
  exception handling.
• Structured activities represent and manage both control flows and data flows
  between both basic activities and other structured activities.
BPEL example:
01   <process name=. purchaseOrderProcess . .. .. >
12   <partnerLinks >
13     <partnerLink name=. pOP. partnerLinkType =.pltOP . .. / > ..
21   </partnerLinks >
23   <variables >
24     <variable name=. vPO. messageType =.mtPO. / > ..
28   </variables >
30   <sequence >
31     <receive partnerLink =.pOP. operation=. placeOrder . variable=. vPO.. .. > ..
36     <flow >
41       <links > < link name=. xStI. / > < /links >
43       <sequence >
44         <assign > .. </assign >
50         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vAvl. .. >
55             <sources > < source linkName =.xStI. / > < /sources >
57         </invoke >
58       </sequence >
59       <sequence >
60         <invoke partnerLink =.pPay. inputVariable =.vPO. .. faultProne =.yes. >
64             <targets > < target linkName =.xStI. / > < /targets >
66         </invoke >
67         <invoke partnerLink =.pWhs. inputVariable =.vPO. outputVariable =.vShI. ..
72         <receive partnerLink =.pPay. variable=. vNvc. .. / >
74       </sequence >
75     </flow >
76     <reply partnerLink =.pOP. operation=. placeOrder . variable=. vNvc. .. > ..
80   </sequence>
91   </process>
Activities (Tasks):
• May either be basic, structured, or composite.
• Basic activities are those built into WS-BPEL that provide the building blocks
  for a workflow. They perform state management, communication, and
  exception handling.
• Structured activities represent and manage both control flows and data flows
  between both basic activities and other structured activities.


         Confused?? Don’t worry .. the case study will clarify this.
Activities (Tasks):
• May either be basic, structured, or composite.
• Basic activities are those built into WS-BPEL that provide the building blocks
  for a workflow. They perform state management, communication, and
  exception handling.
• Structured activities represent and manage both control flows and data flows
  between both basic activities and other structured activities.


         Confused?? Don’t worry .. the case study will clarify this.

• Composite (or nested) activities are hierarchically composed inside one
  another, with each child having access to the scope of the parent.
Activities (Tasks):
• May either be basic, structured, or composite.
• Basic activities are those built into WS-BPEL that provide the building blocks
  for a workflow. They perform state management, communication, and
  exception handling.
• Structured activities represent and manage both control flows and data flows
  between both basic activities and other structured activities.


         Confused?? Don’t worry .. the case study will clarify this.

• Composite (or nested) activities are hierarchically composed inside one
  another, with each child having access to the scope of the parent.
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
<process name="purchaseOrderProcess"                                          This case study is for the
.  . . .                                                                       purchaseOrderProcess
. <sequence>
. . <receive partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. .      operation="placeOrder" variable="PO" createInstance="yes">              described in [087].
. . </receive>
. . <flow>
. . . <links> <link name="ship-to-invoice" /> </links>
. . . <sequence>
. . . . <assign>
                                                                              In case you cannot read it,
. . . . . <copy>
. . . . .         <from>$PO.customerInfo</from>
                                                                              let’s briefly zoom in to see
. . . . .
. . . . . </copy>
                  <to>$shippingRequest.customerInfo</to>
                                                                              what real life orchestration
. . . . </assign>
. . . . <invoke partnerLink="warehouse" portType="lns:warehousePT"            code in WS-BPEL actually
. . . . . operation="checkInventory"
. . . . . inputVariable="PO" outputVariable="availability">
. . . . . <sources>
                                                                                       looks like . .
. . . . . . <source linkName="ship-to-invoice" />
. . . . . </sources>
. . . . </invoke>
. . . </sequence>
. . . <sequence>
. . . . <invoke partnerLink="payment" portType="lns:paymentPT"
. . . . . operation="orderPayment" inputVariable="PO">
. . . . . <targets>
. . . . . . <target linkName="ship-to-invoice" />
. . . . . </targets>
. . . . </invoke>
. . . . <invoke partnerLink="warehouse" portType="lns:warehousePT"
. . . . . operation="shipOrder"
. . . . . inputVariable="PO" outputVariable="shippingInfo">
. . . . </invoke>
. . . . <receive partnerLink="payment" portType="lns:paymentCallbackPT"
. . . . . operation="sendInvoice" variable="Invoice" />
. . . </sequence>
. . </flow>
. . <reply partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>

. . <receive partnerLink="orderProcessing"          portType="lns:orderProcessingPT"
                                                                                       Let’s now highlight some
.
.
    .
    .
           operation="placeOrder" variable="PO" createInstance="yes">
        </receive>
                                                                                        verbs that each denote
.   .   <   flow>                                                                          either a basic or a
.   .   .    <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>                                                                   structured activity.
.   .   .    . <assign>
.   .   .    .   . <copy>
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
.   .   .    .   <   invoke     partnerLink="warehouse" portType="lns:warehousePT"
.   .   .    .   .    operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .    . <invoke partnerLink="payment"          portType="lns:paymentPT"
.   .   .    .   .    operation="orderPayment" inputVariable="PO">
.   .   .    .   . <   targets >
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.   .   .    .   <   invoke  partnerLink="warehouse" portType="lns:warehousePT"
.   .   .    .   . operation="shipOrder"
.   .   .    .   . inputVariable="PO" outputVariable="shippingInfo">
.   .   .    .   </invoke>
.   .   . . <        receive
                         partnerLink="payment" portType="lns:paymentCallbackPT"
.   .   . . . operation="sendInvoice" variable="Invoice" />
.   .   . </sequence>
.   .   </flow>
. . <       reply
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>

. . <receive partnerLink="orderProcessing"          portType="lns:orderProcessingPT"
.   .      operation="placeOrder" variable="PO" createInstance="yes">
.   .   </receive>
.   .   <   flow>
.   .   .    <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
.   .   .    . <assign>
.   .   .    .   . <copy>
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
.   .   .    .   <   invoke     partnerLink="warehouse" portType="lns:warehousePT"
.   .   .    .   .    operation="checkInventory"                                       Next, we denote the scope
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >                                                             of each activity . .
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .    . <invoke partnerLink="payment"          portType="lns:paymentPT"
.   .   .    .   .    operation="orderPayment" inputVariable="PO">
.   .   .    .   . <   targets >
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.   .   .    .   <   invoke  partnerLink="warehouse" portType="lns:warehousePT"
.   .   .    .   . operation="shipOrder"
.   .   .    .   . inputVariable="PO" outputVariable="shippingInfo">
.   .   .    .   </invoke>
.   .   . . <        receive
                         partnerLink="payment" portType="lns:paymentCallbackPT"
.   .   . . . operation="sendInvoice" variable="Invoice" />
.   .   . </sequence>
.   .   </flow>
. . <       reply
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>

                              c1
. . <receive partnerLink="orderProcessing"
.   .
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>                                                                Finally we label each
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1                                                   occurrence of each
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .
                       <from>$PO.customerInfo</from>
                       <to>$shippingRequest.customerInfo</to>
                                                                                             activity . .
.   .   .    .   . </copy>
.   .   .    .   </assign>
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.
.
    .
    .
        .
        .    .   .                 i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
                      operation="orderPayment" inputVariable="PO">
.   .   .    .   . <   targets >
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        . . <
        . . . operation="sendInvoice" variable="Invoice" />
        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"


.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>

                              c1
. . <receive partnerLink="orderProcessing"
.   .
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>                                                                Finally we label each
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1                                                   occurrence of each
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .
                       <from>$PO.customerInfo</from>
                       <to>$shippingRequest.customerInfo</to>
                                                                                             activity . .
.   .   .    .   . </copy>
.   .   .    .   </assign>
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.
.
    .
    .
        .
        .
             </sequence>
             <sequence>
                                                                                           Now let us
                                                                                         describe each
.
.
    .
    .
        .
        .    .   .                 i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
                      operation="orderPayment" inputVariable="PO">
                                                                                         activity within
.   .   .    .   . <   targets >
.
.
    .
    .
        .
        .
             .
             .
                 . . <target linkName="ship-to-invoice" />
                 . </targets>
                                                                                         the context of
.   .   .    .   </invoke>                                                              this case study,
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                         modeling it as
.   .   .    .   </invoke>                                                                   we go.
.
.
.
    .
    .
    .
        . . <
        . . . operation="sendInvoice" variable="Invoice" />
        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"


.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                         c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
.   .   .    . <assign>
                                   a1                                                The <receive> activity receives a
.
.
    .
    .
        .
        .
             .
             .
                 . <copy>
                 .     <from>$PO.customerInfo</from>                                 message from outside the
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.
.
    .
    .
        .
        .
             .
             .
                 . </copy>
                 </assign>
                                                                                     composition using a blocking
                                                                                     wait. The first message to match
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
                                                                                     on the <receive>’s correlation set
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
                                                                                     will, for C1, will spawn a new
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                                                             process instance named after the
.
.
    .
    .
        .
        .
             </sequence>
             <sequence>                                                              <operation= ..> attribute.
.
.
    .
    .
        .
        .    .   .                 i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
                      operation="orderPayment" inputVariable="PO">
                       targets
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 . <
                 . . <target linkName="ship-to-invoice" />
                 . </targets>
                               >
                                                                                                              c2
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        . . <
        . . . operation="sendInvoice" variable="Invoice" />
        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"


.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                         c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
.   .   .    . <assign>
                                   a1                                                The <receive> activity receives a
.
.
    .
    .
        .
        .
             .
             .
                 . <copy>
                 .     <from>$PO.customerInfo</from>                                 message from outside the
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.
.
    .
    .
        .
        .
             .
             .
                 . </copy>
                 </assign>
                                                                                     composition using a blocking
                                                                                     wait. The first message to match
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
                                                                                     on the <receive>’s correlation set
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
                                                                                     will, for C1, will spawn a new
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                                                             process instance named after the
.
.
    .
    .
        .
        .
             </sequence>
             <sequence>                                                              <operation..> attribute.
.
.
    .
    .
        .
        .    .   .                 i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
                      operation="orderPayment" inputVariable="PO">
                       targets
.
.
    .
    .
        .
        .
             .
             .
                 . <           >
                 . . <target linkName="ship-to-invoice" />                                                     c2
.
.
    .
    .
        .
        .
             .
             .
                 . </targets>
                 </invoke>                                                                     If it succeeds, its
.
.
    .
    .
        .
        .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                                                                                            ConvId gets threaded
.
.
    .
    .
        .
        .
             .
             .
                 . inputVariable="PO" outputVariable="shippingInfo">
                 </invoke>                                                                  into the list structure
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />
                                                                                              previously shown,
.
.
    .
    .
        . </sequence>
        </flow>
                                                                                            else a compensation
            reply                                                                           handler will withdraw
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>                                                                                       the request.
. </sequence>
</process>
Correlation sets:




    These observations suggest some self-adaptive runtime data structure:

                                       … where ConvId uniquely identifies a
   ConvId_1                            conversation either as a conversation
                                       number (think “primary key”) or as
                                       values with respect to a correlation
                       C1              set (think “secondary key”).
  ConvId_2
                        ActId_3
                                                             .. Where ActId
                                                             identifies an
             ActId_5                    ActId_4              activity within a
                                                             workflow script.
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                       c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.
.
    .
    .
        .
        .    .   .                 i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
                      operation="orderPayment" inputVariable="PO">
                       targets
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 . <
                 . . <target linkName="ship-to-invoice" />
                 . </targets>
                               >
                                                                                                            c2
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
.   .   .    .   </invoke>
                                                                                       Since the process had already
.
.
.
    .
    .
    .
        . . <

        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />
                                                                                       been spawned, C2 will simply
.   .   </flow>
            reply                                                                      wait for a message from its
. . <

. . </reply>
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
                                                                                       partnerLink.
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
                                                                          <assign> can either:
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                                                  • set one message to another,
.
.
    .
    .
        .
        .
             </sequence>
             <sequence>
                                                                          • set a portion thereof to another,
                                                                          • dynamically manipulate endpoint
.   .   .
                              i2
             . <invoke partnerLink="payment" portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             . . operation="orderPayment" inputVariable="PO">
             . . <targets>
                                                                            references to purportedly
.
.
    .
    .
        .
        .
             . . . <target linkName="ship-to-invoice" />
             . . </targets>
                                                                            equivalent services of the same
.   .   .    . </invoke>
                                                                            parnerLink type. (hard if not
.
.
.
    .
    .
    .
        .
        .
        .
                               i3
             . <invoke partnerLink="warehouse" portType="lns:warehousePT"
             . . operation="shipOrder"
             . . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                       c
                                                                            impossible to model check).2
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        . . <
        . . . operation="sendInvoice" variable="Invoice" />
        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"


.   .   </flow>
            reply
. . <
                             p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                          <invoke> requests the services
.   .   .    </sequence>
.   .   .    <sequence>                           of a partner as a one-way call
.   .   .
                              i2                  on some operation in the
             . <invoke partnerLink="payment" portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             . . operation="orderPayment" inputVariable="PO">
             . . <targets>                        partner’s portType.                              i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        . . <
        . . . operation="sendInvoice" variable="Invoice" />
        . </sequence>
                     receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"


.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                          <invoke> requests the services
.   .   .    </sequence>
.   .   .    <sequence>                           of a partner as a one-way call
.   .   .
                              i2                  on some operation in the
             . <invoke partnerLink="payment" portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             . . operation="orderPayment" inputVariable="PO">
             . . <targets>                        partner’s portType.                              i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
    .
    .
        .
        .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"                                                           c2
.
.
    .
    .
        .
        .
             .
             .   </invoke>      <invoke> may establish data flows (dotted
                 . inputVariable="PO" outputVariable="shippingInfo">


.
.
    .
    .                       c2 via <sources> and <targets>
        . . <receive partnerLink="payment" portType="lns:paymentCallbackPT"
                                line)
        . . . operation="sendInvoice" variable="Invoice" />
.
.
    .
    .
        . </sequence>
        </flow>                 specified within the scope of the <invoke>.
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
                                    Finally, <reply> responds to the message
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3 received in C1, ending the conversation.
                             partnerLink="warehouse" portType="lns:warehousePT"
                                    it
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
    .
    .
        .
        .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"                                                           c2
.
.
    .
    .
        .
        .
             .
             .   </invoke>                   Well, this about
                 . inputVariable="PO" outputVariable="shippingInfo">


.
.                           c2
    . . . <receive partnerLink="payment" portType="lns:paymentCallbackPT"
                                             does it for basic
    . . . . operation="sendInvoice" variable="Invoice" />
.
.
    . . </sequence>
    . </flow>                             activities. We next                                 p1
.
.
                                          consider structured
    . <reply partnerLink="orderProcessing" portType="lns:orderProcessingPT"
                    p1
    . . operation="placeOrder" variable="Invoice">
.
.
    . </reply>
    </sequence>
                                                   activities.
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                                c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                                           i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >
                                        <sequence> coordinates activities to occur
                                                                                                                 i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             . . </sources>
             . </invoke>                one after the other (wcp-1)
.   .   .    </sequence>
.   .   .    <sequence>        http://www.workflowpatterns.com/patterns/control/basic/wcp1_animation.php
.   .   .
                                   i2
             . <invoke partnerLink="payment" portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                                      i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                                      c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                                                 p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                            c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>


                                       Data flow dependencies are introduced by a1
.   .   .    <sequence>
.
.
    .
    .
        .
        .
             . <assign>
             .   .    <copy>
                                   a1 <link> elements specified in <sources>
                                       the
.   .   .    .   .       <from>$PO.customerInfo</from>
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .    </copy>
                                       and <targets> attributes of <invoke>.
                         <to>$shippingRequest.customerInfo</to>

.   .   .    .   </assign>
                                                                                       i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                             i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                  i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                  c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                             p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                             p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"   .. This forces the composition in this case
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>                 study to become purely sequential. (Can
.
.
    .
    .
        . .
        . .                      c2 you see it here?).
                 <receive partnerLink="payment" portType="lns:paymentCallbackPT"
                 . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
Without the data dependencies
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .
                       <from>$PO.customerInfo</from>
                       <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
we have here, <flow> specifies
.   .   .    .   </assign>
                                                                                        i1
                         i1
. . . . <invoke partnerLink="warehouse" portType="lns:warehousePT"
           composition.
a parallel operation="checkInventory"
. . . . .
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                                    c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                                          a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
Without the data dependencies
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .
                       <from>$PO.customerInfo</from>
                       <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
we have here, <flow> specifies
.   .   .    .   </assign>
                                                                                                               i1
                         i1
. . . . <invoke partnerLink="warehouse" portType="lns:warehousePT"
a parallel operation="checkInventory"
. . . . .
           composition.                                       .. comprised of an
. . . . . inputVariable="PO" outputVariable="availability">
. . . . . <sources>
                                                             AND-SPLIT (wcp-2)
                                                                                                                     i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>        http://www.workflowpatterns.com/patterns/control/basic/wcp2_animation.php
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                                          i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                                          c2
.   .   .    .   </invoke>   http://www.workflowpatterns.com/patterns/control/basic/wcp3_animation.php
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                                                     p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                          a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
Without the data dependencies
.
.
    .
    .
        .
        .
             .
             .
                 .
                 .
                       <from>$PO.customerInfo</from>
                       <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
we have here, <flow> specifies
.   .   .    .   </assign>
                                                                                           i1
                         i1
. . . . <invoke partnerLink="warehouse" portType="lns:warehousePT"
a parallel operation="checkInventory"
. . . . .
           composition.                                       .. comprised of an
. . . . . inputVariable="PO" outputVariable="availability">
. . . . . <sources>
                                                             AND-SPLIT (wcp-2)
                                                                                                 i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                      i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>                                   .. and an AND-JOIN (wcp-3)
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                      c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                                 p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                       c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                                 a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                                  i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1                                 .. Just add in an arc
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.
.
    .
    .
        .
        .
             .   .
             . . <
                      inputVariable="PO" outputVariable="availability">
                       sources
                             >
                                                                       and an initial marking,
                                                                       and we get a Petri net!
                                                                                                        i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                             i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                             c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                                        p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                                       c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                                 a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                                  i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1                                 .. Just add in an arc
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.
.
    .
    .
        .
        .
             .   .
             . . <
                      inputVariable="PO" outputVariable="availability">
                       sources
                             >
                                                                       and an initial marking,
                                                                       and we get a Petri net!
                                                                                                        i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >                                            Now let us play                  i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.
.
    .
    .
        .
        .
             .
             .
                 . </targets>
                 </invoke>
                                                                            a token game.
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                             c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                                        p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
              sequence>
.   .   .    <
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
<process name="purchaseOrderProcess"
. . . .

. <sequence>


    .
                              c1
. . <receive partnerLink="orderProcessing"
.
                                                    portType="lns:orderProcessingPT"
           operation="placeOrder" variable="PO" createInstance="yes">
                                                                                             c1
.   .   </receive>


P
.
.
    .
    .
        <
        .
            flow>
             <links> <link name="ship-to-invoice" /> </links>
.   .   .    <sequence>
                                                                                       a1
.
.
    .
    .
        .
        .
             . <assign>
             .   . <copy>
                                   a1
.   .   .    .   .     <from>$PO.customerInfo</from>
.   .   .    .   .     <to>$shippingRequest.customerInfo</to>
.   .   .    .   . </copy>
.   .   .    .   </assign>
                                                                                        i1
.
.
    .
    .
        .
        .
             .
             .
                 <
                 .
                     invoke
                                    i1
                                partnerLink="warehouse" portType="lns:warehousePT"
                      operation="checkInventory"
.   .   .    .   .    inputVariable="PO" outputVariable="availability">
.   .   .    . . <     sources
                             >


                                                                                              i2
.   .   .    . . . <source linkName="ship-to-invoice" />
.   .   .    . . </sources>
.   .   .    . </invoke>
.   .   .    </sequence>
.   .   .    <sequence>
.   .   .
                                   i2
             . <invoke partnerLink="payment"          portType="lns:paymentPT"
.
.
    .
    .
        .
        .
             .
             .
                 .
                 . <
                      operation="orderPayment" inputVariable="PO">
                       targets >
                                                                                                   i3
.   .   .    .   . . <target linkName="ship-to-invoice" />
.   .   .    .   . </targets>
.   .   .    .   </invoke>
.
.
.
    .
    .
    .
        .
        .
        .
             .
             .
             .
                 <   invoke
                                   i3
                             partnerLink="warehouse" portType="lns:warehousePT"
                 . operation="shipOrder"
                 . inputVariable="PO" outputVariable="shippingInfo">
                                                                                                   c2
.   .   .    .   </invoke>
.
.
    .
    .
        . . <        receive
                                    c2
                         partnerLink="payment" portType="lns:paymentCallbackPT"
        . . . operation="sendInvoice" variable="Invoice" />

                                                                                              p1
.   .   . </sequence>
.   .   </flow>
            reply
. . <
                            p1
              partnerLink="orderProcessing" portType="lns:orderProcessingPT"
. . . operation="placeOrder" variable="Invoice">
. . </reply>
. </sequence>
</process>
Contents:
• Context
• Motivation
• Challenges
• Concepts
• Correlation sets
• Activities
• Case study
• Summary
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
• Challenges: Wrapping legacy systems, in-house developed web
  services, 3rd party web services, and (eventually) hierarchically
  composing other orchestrations.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
• Challenges: Wrapping legacy systems, in-house developed web
  services, 3rd party web services, and (eventually) hierarchically
  composing other orchestrations.
• Concepts: We obtained concepts organized from simple to complex.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
• Challenges: Wrapping legacy systems, in-house developed web
  services, 3rd party web services, and (eventually) hierarchically
  composing other orchestrations.
• Concepts: We obtained concepts organized from simple to complex.
• Correlation sets: We focused on a key aspect of the runtime model
  for web services by addressing issues involving spawning process
  instances.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
• Challenges: Wrapping legacy systems, in-house developed web
  services, 3rd party web services, and (eventually) hierarchically
  composing other orchestrations.
• Concepts: We obtained concepts organized from simple to complex.
• Correlation sets: We focused on a key aspect of the runtime model
  for web services by addressing issues involving spawning process
  instances.
• Activities: We described basic, structured, and nested types of
  activities.
Summary:
• Context: We specify web service orchestration to glue together
  disparate services that operate over the Internet.
• Motivation: We want to add value to software systems by making
  them more publicly accessible.
• Challenges: Wrapping legacy systems, in-house developed web
  services, 3rd party web services, and (eventually) hierarchically
  composing other orchestrations.
• Concepts: We obtained concepts organized from simple to complex.
• Correlation sets: We focused on a key aspect of the runtime model
  for web services by addressing issues involving spawning process
  instances.
• Activities: We described basic, structured, and nested types of
  activities.
• Case study: We tied it all together with a case study involving
  constructing a model suitable for verification.
Questions?

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:7/15/2013
language:English
pages:79