Интернет магазин китайских планшетных компьютеров



Компьютеры - BPEL - Пример BPEL

12 июня 2011


Оглавление:
1. BPEL
2. Пример BPEL



Гипотетический пример. BPEL-последовательность mathProcess принимает переменную $numIn возводит её в квадрат и возвращает результат в переменной $numOut.

 <process name="mathProcess" targetNamespace="http://example.com/ws-bp/math"
 xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" 
 xmlns:math="http://manufacturing.org/wsdl/math">
    <partnerLinks>
        <partnerLink name="Math" partnerLinkType="math:exampleMath" myRole="mathService" />
    </partnerLinks>
    <variables>
        <variable name="numIn"  messageType="math:unsignedInt"/>
        <variable name="numOut"  messageType="math:unsignedInt"/>
        <variable name="num"  type="xsd:unsignedInt"/>
    </variables>
    <sequence>
        <receive partnerLink="Math" portType="math:mathPort" operation="secondDegree" variable="numIn" createInstance="yes"/>
        <assign name="LoopCounterIncrement">
          <copy>
             <from>$numIn.request</from>
             <to variable="num"/>
          </copy>
          <copy>
             <from>$num * $num</from>
             <to variable="numOut" part="response"/>
          </copy>
        </assign>
        <reply operation="secondDegree" partnerLink="Math" portType="math:mathPort" variable="numOut"/>
    </sequence>
 </process>


Просмотров: 1849


<<< Border Gateway Protocol
CARP >>>