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

Possibly improved example for coordination proposal 4, finalize activity

From: Haugen Robert <Robert.Haugen@choreology.com>
Date: Tue, 23 Nov 2004 23:12:58 -0000
Message-ID: <221369570DEDF346AE42821041345E89603D20@imap.choreology.com>
To: <public-ws-chor@w3.org>
CreditDecider gets credit authorizations for two bidders, A and B, at
most one of which can be selected. CreditDecider performs a
CoordinatedCreditAuthorization choreography for each bidder, and then
finalizes each performed choreography depending on whether A, B or
neither was selected.

<choreography name="CreditDecider">
 
    <!-- only a snippet shown -->

    <parallel>
        <perform name="creditForA"
            choreographyName="CoordinatedCreditAuthorization" 
            choreographyInstance="creditForA">
            <!-- bind such that this does the business for A -->
        </perform>
        <perform name="creditForB"
            choreographyName="CoordinatedCreditAuthorization" 
            choreographyInstance="creditForB">
            <!-- bind such that this does the business for A -->
        </perform>
    </parallel>
        
    <!--  other stuff here -->
    
    <workunit name="chooseA"
        guard="cdl:getVariable('Chosen',,,'Broker')='A'"  
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="drawDown"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="replenish"/>
        </finalize>
    </workunit>            
            
    <workunit name="chooseB"
        guard="cdl:getVariable('Chosen',,,'Broker')='B'" 
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="drawDown"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="replenish"/>
        </finalize>
    </workunit>            
 
    <workunit name="chooseNeither"
        guard="cdl:getVariable('Chosen',,,'Broker')='0'" 
        <finalize>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForA"
                finalizerName="replenish"/>
            <finalizerReference 
                choreographyName="CoordinatedCreditAuthorization"
                choreographyInstanceId="creditForB"
                finalizerName="replenish"/>
        </finalize>
    </workunit>      
 
</choreography>


Choreology Anti virus scan completed
Received on Tuesday, 23 November 2004 23:13:31 GMT

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