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_1shows a link between simple activities.Flow_1includes a link namedAtoB. The activity that is the target of the link, assign activityB, is only executed if the activity that is the source of the link, assign activityA, has completed. -
Flow_2shows a link between simple activity and composite activity.Flow_2also includes the link namedAtoB. The activity that is the target of the link, assign activityB, is only executed if the activity that is the source of the link, scope activityscope1, has completed. -
Flow_3shows a link between composite activities.Flow_3also includes the link namedAtoB. The activity that is the target of the link, sequence activitySequence_1, is only executed if the activity that is the source of the link, scope activityscope2, 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>