官术网_书友最值得收藏!

Understanding a parallel flow

To invoke services concurrently, we can use the <flow> construct. In the following example, the three <invoke> operations will perform concurrently:

<process ...>
  ...
  <sequence>
    <!-- Wait for the incoming request to start the process -->
    <receive ... />

    <!-- Invoke a set of related services, concurrently -->
 <flow>
      <invoke ... />
      <invoke ... />
      <invoke ... />
 </flow>
    ...
    <!-- Return the response -->
    <reply ... />
  </sequence>
</process>

We can also combine and nest the <sequence> and <flow> constructs that allow us to define several sequences that execute concurrently. In the following example, we have defined two sequences, one that consists of three invocations, and one with two invocations. Both sequences will execute concurrently:

<process ...>
  ...
 <sequence>
    <!-- Wait for the incoming request to start the process -->
    <receive ... />

    <!-- Invoke two sequences concurrently -->
 <flow>
      <!-- The three invokes below execute sequentially -->
 <sequence>
        <invoke ... />
        <invoke ... />
        <invoke ... />
 </sequence>
      <!-- The two invokes below execute sequentially -->
 <sequence>
        <invoke ... />
        <invoke ... />
 </sequence>
 </flow>
    ...
    <!-- Return the response -->
    <reply ... />
 </sequence>
</process>

We can use other activities as well within the <flow> activity to achieve parallel execution. With this, we have concluded our discussion on the parallel invocation.

Pop quiz – service invocation

Q1. Which activity is used to invoke services from BPEL processes?

  1. <receive>
  2. <invoke>
  3. <sequence>
  4. <flow>
  5. <process>
  6. <reply>

Q2. Which parameters do we need to specify for the <invoke> activity?

  1. endpointURL
  2. partnerLink
  3. operationName
  4. operation
  5. portType
  6. portTypeLink

Q3. In which file do we declare partner link types?

Q4. Which activity is used to execute service invocation and other BPEL activities in parallel?

  1. <receive>
  2. <invoke>
  3. <sequence>
  4. <flow>
  5. <process>
  6. <reply>
主站蜘蛛池模板: 葫芦岛市| 凤城市| 颍上县| 环江| 太谷县| 三都| 马龙县| 南宁市| 荔波县| 青神县| 桐梓县| 黄冈市| 庆安县| 乡城县| 天镇县| 深圳市| 特克斯县| 武平县| 华蓥市| 新田县| 杨浦区| 威海市| 河间市| 阳曲县| 深水埗区| 哈密市| 凭祥市| 远安县| 龙海市| 米泉市| 安龙县| 绥棱县| 沙雅县| 景德镇市| 会宁县| 上饶县| 红河县| 竹溪县| 田阳县| 镇雄县| 清镇市|