W3C home > Mailing lists > Public > public-ws-chor@w3.org > November 2004

Corrected Coordinated Choreographies Proposal 4 - Finalize Activity

From: Haugen Robert <Robert.Haugen@choreology.com>
Date: Mon, 1 Nov 2004 19:59:43 -0000
Message-ID: <221369570DEDF346AE42821041345E8951BC68@imap.choreology.com>
To: <public-ws-chor@w3.org>
Coordinated Choreographies Spec Changes for Finalize
Plain text inline, pdf or word.doc sent on request.

Choreology Proposal 4: Finalize activity

In section 2.5 Activities, insert after list item beginning "A No
Action, which provides...":

*	A Finalize, which activates a particular finalizer in a
particular instance of an immediately enclosed inner choreography and
thus brings that choreography to a defined conclusion.

Add a new section as follows:

2.5.7   Finalize activity

The Finalize activity is used to activate a particular finalizer in a
particular instance of an immediately inner choreography which has
defined finalizers, and thus bring that choreography to a defined
conclusion.

The syntax for finalize is:
<finalize  name="ncname"?
      finalizerName="ncname"?
      choreography="ncname"
      choreographyInstance="xsd:string"?>
<-- extensibility element --> 
</finalize>


A Choreography MUST NOT have any finalize elements if it does not
encompass any immediate inner choreographies that have defined
finalizers.

A Choreography MUST have at least one finalize element for each
immediate inner choreography with finalizers that it encompasses.

A Choreography SHOULD have at least one finalize element for each
finalizer in an immediate inner choreography that it encompasses.

A Choreography MAY have more than one finalize element for a named
finalizer in an immediate inner choreography that it encompasses, as
long as those finalize elements are contained in different Work Units
with different guards.

The attribute name is used for specifying a distinct name for each
finalize element declared within a Choreography Package.

The attribute finalizerName indicates which finalizer is to be used to
finalize a choreography. If the target inner choreography has only one
finalizer, finalizerName is optional. If the inner choreography has more
than one finalizer, finalizerName is required.  Its value MUST
correspond exactly with the name attribute value of a finalizer in the
target choreography instance.  

The required attribute choreography indicates the target choreography
instance that this finalize refers to when taken with the value for
choreographyInstance.

The optional attribute choreographyInstance indicates the target
choreography instance that this finalize refers to when taken with the
value for choreography attribute.  The choreographyInstance attribute
MAY be omitted when only one instance of a choreography can be active
when the work unit guard governing this finalize is evaluated, otherwise
it MUST be present.

The conditions under which a finalize is chosen is governed by the guard
on the work unit construct that encloses it.  A work unit MUST contain
only one finalize for a particular choreography instance.  IT MAY
contain more than one finalize, so long as each relates to a different
choreography instance.

This means that finalize elements for the same choreography instance
MUST be in different work units, and these work units MUST have mutually
exclusive guards.

(Note: these conditions ensure that one and only one of the finalizers
in a choreography are chosen to finalize any choreography that has at
least one finalizer.)

Example:

[Note: this example does not show CDL for the creation of the
choreographyInstance values. That CDL awaits the unfinished Proposal 5,
Choreography Instances.] 

<choreography name="CreditDecider" root="true">

    <!-- only a snippet shown -->
    <sequence>
    
        <!--  other stuff here -->
        <parallel>
            <perform name="creditForA"
choreographyName="CoordinatedCreditAuthorization">
                <!-- bind such that this does the business for A -->
            </perform>
            <perform name="creditForB"
choreographyName="CoordinatedCreditAuthorization">
                <!-- bind such that this does the business for A -->
            </perform>
        </parallel>
        
        <!--  other stuff here -->
    
        <choice>
            <!--  events have occurred such that A is chosen -->
            <parallel>
                <finalize name="creditForA" finalizerName="drawDown"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForA"/>
                <finalize name="creditForB" finalizerName="replenish"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForB"/>
            </parallel>
            
            
            <!--  events have occurred such that B  is chosen  -->
            <parallel>
                <finalize name="creditForA" finalizerName="replenish"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForA"/>
                <finalize name="creditForB" finalizerName="drawDown"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForB"/>
            </parallel>

            <!--  events have occurred such that neither is chosen -->
            <parallel>
                <finalize name="creditForA" finalizerName="replenish"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForA"/>
                <finalize name="creditForB" finalizerName="replenish"
choreography="CoordinatedCreditAuthorization"
choreographyInstance="creditForB"/>
            </parallel>
        </choice>
      
    </sequence>

</choreography>


Choreology Anti virus scan completed
Received on Monday, 1 November 2004 20:00:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 01:01:10 GMT