What Happens When You Create Synchronization Between Activities Within a Flow Activity

The following example shows the .bpel file after design is complete for three flow activities with links for synchronizing activity execution.

  • Flow_1 shows a link between simple activities.

    Flow_1 includes a link named AtoB. The activity that is the target of the link, assign activity B, is only executed if the activity that is the source of the link, assign activity A, has completed.

  • Flow_2 shows a link between simple activity and composite activity.

    Flow_2 also includes the link named AtoB. The activity that is the target of the link, assign activity B, is only executed if the activity that is the source of the link, scope activity scope1, has completed.

  • Flow_3 shows a link between composite activities.

    Flow_3 also includes the link named AtoB. The activity that is the target of the link, sequence activity Sequence_1, is only executed if the activity that is the source of the link, scope activity scope2, has completed.

<!-- link between simple activities -->
<flow name=Flow_1>
      <links>
        <link name="AtoB"/>
      </links>
      <assign name="A">
        <sources>
          <source linkName="AtoB"/>
        </sources>
        <copy>
          <from>concat($output.payload, 'A')</from>
          <to>$output.payload</to>
        </copy>
      </assign>
      <assign name="B">
        <targets>
          <target linkName="AtoB"/>
        </targets>
        <copy>
          <from>concat($output.payload, 'B')</from>
          <to>$output.payload</to>
        </copy>
      </assign>
    </flow>

    <!-- link between simple activity and composite activity -->
    <flow name=Flow_2>
      <links>
        <link name="AtoB"/>
      </links>
      <scope name="scope1">
        <sources>
          <source linkName="AtoB"/>
        </sources>
        <assign name="A">
          <copy>
            <from>concat($output.payload, 'A')</from>
            <to>$output.payload</to>
          </copy>
        </assign>
      </scope>
      <assign name="B">
        <targets>
         <target linkName="AtoB"/>
        </targets>
        <copy>
          <from>concat($output.payload, 'B')</from>
          <to>$output.payload</to>
        </copy>
      </assign>
    </flow>

    <!-- link between composite activities -->
    <flow name=Flow_3>
      <links>
        <link name="AtoB"/>
      </links>
      <scope name="scope2">
        <sources>
          <source linkName="AtoB"/>
        </sources>
        <assign name="A">
          <copy>
            <from>concat($output.payload, 'A')</from>
            <to>$output.payload</to>
          </copy>
        </assign>
      </scope>
      <sequence name="Sequence_1>
        <targets>
          <target linkName="AtoB"/>
        </targets>
        <assign name="B">
          <copy>
            <from>concat($output.payload, 'B')</from>
            <to>$output.payload</to>
          </copy>
        </assign>
      </sequence>
    </flow>
  </sequence>