Updated example for 6.2.3

Hi,

There were a number of other problems with the example, so I have updated and included below.

The problems included, purchase order variable was defined as silent, but used as a receive variable. The faultName was missing from the fault exchange. The missing 'uriType' and 'intType' informationType definitions, and the consumerRef token definition.

Regards
Gary




<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.w3.org/2005/08/ws-chor/cdl"
     xmlns:cdl="http://www.w3.org/2005/08/ws-chor/cdl"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:rns="http://www.example.com/ConsumerRetailerChoreographyIFsample"
     xmlns:tns="http://www.example.com/ConsumerRetailerChoreographysample"
     targetNamespace="http://www.example.com/ConsumerRetailerChoreographysample"
     name="ConsumerRetailerChoreography"
     version="1.0">

  <informationType name="purchaseOrderType" type="tns:PurchaseOrderMsg"/>
  <informationType name="purchaseOrderAckType" type="tns:PurchaseOrderAckMsg"/>
  <informationType name="badPOAckType"  type="xsd:qname" />
  <informationType name="uriType"  type="xsd:string" />
  <informationType name="intType"  type="xsd:integer" />

  <token name="purchaseOrderID" informationType="tns:intType"/>
  <token name="retailerRef" informationType="tns:uriType"/>
  <token name="consumerRef" informationType="tns:uriType"/>
  <tokenLocator tokenName="tns:purchaseOrderID"
                informationType="tns:purchaseOrderType" query="/PO/orderId"/>
  <tokenLocator tokenName="tns:purchaseOrderID"
                informationType="tns:purchaseOrderAckType" query="/PO/orderId"/>
  <roleType name="Consumer">
    <behavior name="consumerForRetailer" interface="rns:ConsumerRetailerPT"/>
    <behavior name="consumerForWarehouse" interface="rns:ConsumerWarehousePT"/>
  </roleType>
  <roleType name="Retailer">
    <behavior name="retailerForConsumer" interface="rns:RetailerConsumerPT"/>
  </roleType>
  <relationshipType name="ConsumerRetailerRelationship">
    <roleType typeRef="tns:Consumer" behavior="consumerForRetailer"/>
    <roleType typeRef="tns:Retailer" behavior="retailerForConsumer"/>
  </relationshipType>
  <channelType name="ConsumerChannel">
    <roleType typeRef="tns:Consumer"/>
    <reference>
      <token name="tns:consumerRef"/>
    </reference>
    <identity>
      <token name="tns:purchaseOrderID"/>
    </identity>
  </channelType>
  <channelType name="RetailerChannel">
    <passing channel="ConsumerChannel" action="request" />
    <roleType typeRef="tns:Retailer" behavior="retailerForConsumer"/>
    <reference>
      <token name="tns:retailerRef"/>
    </reference>
    <identity>
      <token name="tns:purchaseOrderID"/>
    </identity>
  </channelType>

  <choreography name="ConsumerRetailerChoreography" root="true">
    <relationship type="tns:ConsumerRetailerRelationship"/>
    <variableDefinitions>
      <variable name="purchaseOrder" informationType="tns:purchaseOrderType" 
                silent="false" />
      <variable name="purchaseOrderAck" 
                informationType="tns:purchaseOrderAckType" />
      <variable name="retailer-channel" channelType="tns:RetailerChannel"/>
      <variable name="consumer-channel" channelType="tns:ConsumerChannel"/>
      <variable name="badPurchaseOrderAck"   
                informationType="tns:badPOAckType" />
    </variableDefinitions>

    <interaction name="createPO"
                 channelVariable="tns:retailer-channel" 
                 operation="handlePurchaseOrder" >
      <participate relationshipType="tns:ConsumerRetailerRelationship" 
                   fromRoleTypeRef="tns:Consumer" toRoleTypeRef="tns:Retailer"/>
      <exchange name="request" 
                informationType="tns:purchaseOrderType" action="request">
        <send variable="cdl:getVariable('tns:purchaseOrder','','')" />
        <receive variable="cdl:getVariable('tns:purchaseOrder','','')"
                 recordReference="record-the-channel-info" />
      </exchange>
      <exchange name="response"
                informationType="purchaseOrderAckType" action="respond">
        <send variable="cdl:getVariable('tns:purchaseOrderAck','','')" />
        <receive variable="cdl:getVariable('tns:purchaseOrderAck','','')" />
      </exchange>
      <exchange name="badPurchaseOrderAckException" faultName="badPurchaseOrderAckException"
                informationType="badPOAckType" action="respond">
        <send variable="cdl:getVariable('tns:badPurchaseOrderAck','','')"
                causeException="badPOAck" />
        <receive variable="cdl:getVariable('tns:badPurchaseOrderAck','','')"
                causeException="badPOAck" />                 
      </exchange>
      <record name="record-the-channel-info" when="after">
        <source variable="cdl:getVariable('tns:purchaseOrder','', 
                                          '/PO/CustomerRef')"/>
        <target variable="cdl:getVariable('tns:consumer-channel','','')"/>
      </record>
    </interaction>
 </choreography>    
</package>

Received on Thursday, 1 September 2005 11:23:37 UTC