The activities defined inside <flow/> can be performed concurrently. But when there are can be dependencies in-between those activities. <links/>, <sources/> and <targets/> are used to define synchronization dependencies in-between those activities.
Let's understand what's meant by <links/>, <sources/> and <targets/>.
In the <flow/>, we define <links/> as follows. These link names can be sources or targets of the activities inside <flow/>
eg -
<bpel:flowname="EndlessRunningFlowOfPain"><bpel:links><bpel:linkname="transition1"/></bpel:links><bpel:sequencename="Seq1"><bpel:sources><bpel:sourcelinkName="transition1"/></bpel:sources><bpel:empty/></bpel:sequence><bpel:ifname="IfDependOnSeq1"><bpel:targets><bpel:targetlinkName="transition1"/></bpel:targets> ....... </bpel:if></bpel:flow>
So using <sources/> and <targets/>, user can specify, IfDependOnSeq1 activity should be executed after Seq1.
i.e Source activity should be executed before Target activity
Note :As well there are other optional constructs to mimic conditional behavior for the
<source/> and <target/>. They are
<invoke...><sources><sourcelinkName="Link1"><transitionCondition> $tmpVar=1 </transitionCondition></source></sources> ... </invoke>
false, a joinFailure exception will be thrown
(Unless the target activity hasn't suppressJoinFailure=true).
<invoke...><targets><joinCondition> $Link1 and $Link2 </joinCondition><targetlinkName="Link1"/><targetlinkName="Link2"/></targets></invoke>

Refer - TestFlowLinks.zip
Here the sample tries to implement sequence of activities inside a <flow/>, where
there can be 3 execution paths based on the conditions defined in 2 and 5.
Some of the possible execution paths are
TransitionResolver's if condition is true and TransitionResolver2's if condition
is trueTransitionResolver's elseIf condition is true and TransitionResolver2's if
condition is trueTransitionResolver/s if condition is true and TransitionResolver2's if condition
is false