Advertisement
Guest User

Untitled

a guest
Jun 25th, 2012
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.25 KB | None | 0 0
  1. <!-- forEachCompletion BPEL Process [Generated by the Eclipse BPEL Designer] -->
  2. <!-- Date: Mon Jun 25 10:30:45 CEST 2012 -->
  3. <bpel:process name="forEachCompletion"
  4.         targetNamespace="http://fec.org"
  5.         suppressJoinFailure="yes"
  6.         xmlns:tns="http://fec.org"
  7.         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  8.         >
  9.  
  10.     <!-- Import the client WSDL -->
  11.     <bpel:import location="forEachCompletionArtifacts.wsdl" namespace="http://fec.org"
  12.             importType="http://schemas.xmlsoap.org/wsdl/" />
  13.          
  14.     <!-- ================================================================= -->        
  15.     <!-- PARTNERLINKS                                                      -->
  16.     <!-- List of services participating in this BPEL process               -->
  17.     <!-- ================================================================= -->        
  18.     <bpel:partnerLinks>
  19.         <!-- The 'client' role represents the requester of this service. -->
  20.         <bpel:partnerLink name="client"
  21.                     partnerLinkType="tns:forEachCompletion"
  22.                     myRole="forEachCompletionProvider"
  23.                     />
  24.     </bpel:partnerLinks>
  25.  
  26.     <!-- ================================================================= -->        
  27.     <!-- VARIABLES                                                         -->
  28.     <!-- List of messages and XML documents used within this BPEL process  -->
  29.     <!-- ================================================================= -->        
  30.     <bpel:variables>
  31.         <!-- Reference to the message passed as input during initiation -->
  32.         <bpel:variable name="input"
  33.                  messageType="tns:forEachCompletionRequestMessage"/>
  34.                  
  35.         <!--
  36.          Reference to the message that will be returned to the requester
  37.          -->
  38.         <bpel:variable name="output"
  39.                  messageType="tns:forEachCompletionResponseMessage"/>
  40.     </bpel:variables>
  41.  
  42.     <!-- ================================================================= -->        
  43.     <!-- ORCHESTRATION LOGIC                                               -->
  44.     <!-- Set of activities coordinating the flow of messages across the    -->
  45.     <!-- services integrated within this business process                  -->
  46.     <!-- ================================================================= -->        
  47.     <bpel:sequence name="main">
  48.        
  49.         <!-- Receive input from requester.
  50.             Note: This maps to operation defined in forEachCompletion.wsdl
  51.             -->
  52.         <bpel:receive name="receiveInput" partnerLink="client"
  53.                 portType="tns:forEachCompletion"
  54.                 operation="process" variable="input"
  55.                 createInstance="yes"/>
  56.        
  57.         <!-- Generate reply to synchronous request -->
  58.         <bpel:assign validate="no" name="Assign">
  59.             <bpel:copy>
  60.                 <bpel:from><bpel:literal><tns:forEachCompletionResponse xmlns:tns="http://fec.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  61.   <tns:result>tns:result</tns:result>
  62. </tns:forEachCompletionResponse>
  63. </bpel:literal></bpel:from>
  64.                 <bpel:to variable="output" part="payload"></bpel:to>
  65.             </bpel:copy>
  66.             <bpel:copy>
  67.                 <bpel:from>
  68.                     <![CDATA[string("")]]>
  69.                 </bpel:from>
  70.                 <bpel:to part="payload" variable="output">
  71.                     <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
  72.                 </bpel:to>
  73.             </bpel:copy>
  74.         </bpel:assign>
  75.         <bpel:forEach parallel="no" counterName="Counter" name="ForEach">
  76.             <bpel:startCounterValue>
  77.                 <![CDATA[1]]>
  78.             </bpel:startCounterValue>
  79.             <bpel:finalCounterValue><![CDATA[4]]></bpel:finalCounterValue>
  80.             <bpel:completionCondition>
  81.                 <bpel:branches successfulBranchesOnly="no"><![CDATA[1]]></bpel:branches>
  82.             </bpel:completionCondition>
  83.             <bpel:scope>
  84.                 <bpel:sequence>
  85.                     <bpel:wait name="Wait">
  86.                         <bpel:for><![CDATA[concat('PT', $Counter, 'S')]]></bpel:for>
  87.                     </bpel:wait>
  88.                     <bpel:assign validate="no" name="Assign1">
  89.                         <bpel:copy>
  90.                             <bpel:from>
  91.                                
  92.                                 <![CDATA[concat($output.payload/tns:result, $Counter)]]>
  93.                             </bpel:from>
  94.                             <bpel:to part="payload" variable="output">
  95.                                 <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
  96.                             </bpel:to>
  97.                         </bpel:copy>
  98.                     </bpel:assign>
  99.                 </bpel:sequence>
  100.             </bpel:scope>
  101.         </bpel:forEach>
  102.         <bpel:reply name="replyOutput"
  103.               partnerLink="client"
  104.               portType="tns:forEachCompletion"
  105.               operation="process"
  106.               variable="output"
  107.               />
  108.     </bpel:sequence>
  109. </bpel:process>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement