⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 purchase.bpel

📁 jbpm-bpel-1.1.Beta3 JBoss jBPM Starters Kit  是一个综合包
💻 BPEL
字号:
<?xml version="1.0" encoding="UTF-8"?>
<process name="purchaseOrderProcess"
  targetNamespace="http://acme.com/ws-bp/purchase"
  xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
  xmlns:lns="http://manufacturing.org/wsdl/purchase"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
      http://schemas.xmlsoap.org/ws/2003/03/business-process/">

  <partnerLinks>
    <partnerLink name="purchasing" partnerLinkType="lns:purchasingLT"
      myRole="purchaseService" />
    <partnerLink name="invoicing" partnerLinkType="lns:invoicingLT"
      myRole="invoiceRequester" partnerRole="invoiceService" />
    <partnerLink name="shipping" partnerLinkType="lns:shippingLT"
      myRole="shippingRequester" partnerRole="shippingService" />
    <partnerLink name="scheduling" partnerLinkType="lns:schedulingLT"
      partnerRole="schedulingService" />
  </partnerLinks>

  <variables>
    <variable name="PO" messageType="lns:POMessage" />
    <variable name="Invoice" messageType="lns:InvMessage" />
    <variable name="POFault" messageType="lns:orderFaultType" />
    <variable name="shippingRequest" messageType="lns:shippingRequestMessage" />
    <variable name="shippingInfo" messageType="lns:shippingInfoMessage" />
    <variable name="shippingSchedule" messageType="lns:scheduleMessage" />
  </variables>

  <faultHandlers>

    <catch faultName="lns:cannotCompleteOrder" faultVariable="POFault">

      <reply partnerLink="purchasing" portType="lns:purchaseOrderPT"
        operation="sendPurchaseOrder" variable="POFault"
        faultName="cannotCompleteOrder" />

    </catch>

  </faultHandlers>

  <sequence>

    <receive partnerLink="purchasing" portType="lns:purchaseOrderPT"
      operation="sendPurchaseOrder" variable="PO" createInstance="yes" />

    <flow>

      <links>
        <link name="ship-to-invoice" />
        <link name="ship-to-scheduling" />
      </links>

      <sequence>

        <assign>
          <copy>
            <from variable="PO" part="customerInfo" />
            <to variable="shippingRequest" part="customerInfo" />
          </copy>
        </assign>

        <invoke partnerLink="shipping" portType="lns:shippingPT"
          operation="requestShipping" inputVariable="shippingRequest"
          outputVariable="shippingInfo">
          <source linkName="ship-to-invoice" />
        </invoke>

        <receive partnerLink="shipping" portType="lns:shippingCallbackPT"
          operation="sendSchedule" variable="shippingSchedule">
          <source linkName="ship-to-scheduling" />
        </receive>

      </sequence>

      <sequence>

        <invoke partnerLink="invoicing" portType="lns:computePricePT"
          operation="initiatePriceCalculation" inputVariable="PO" />

        <invoke partnerLink="invoicing" portType="lns:computePricePT"
          operation="sendShippingPrice" inputVariable="shippingInfo">
          <target linkName="ship-to-invoice" />
        </invoke>

        <receive partnerLink="invoicing" portType="lns:invoiceCallbackPT"
          operation="sendInvoice" variable="Invoice" />

      </sequence>

      <sequence>

        <invoke partnerLink="scheduling" portType="lns:schedulingPT"
          operation="requestProductionScheduling" inputVariable="PO" />

        <invoke partnerLink="scheduling" portType="lns:schedulingPT"
          operation="sendShippingSchedule" inputVariable="shippingSchedule">
          <target linkName="ship-to-scheduling" />
        </invoke>

      </sequence>

    </flow>

    <reply partnerLink="purchasing" portType="lns:purchaseOrderPT"
      operation="sendPurchaseOrder" variable="Invoice" />

  </sequence>

</process>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -