Joins are where the process flow of two or more steps are merged into a single process flow.

A “rendezvous” (that is AND statement) is a point in the workflow where multiple steps converge into a single thread. At the point where the threads join, the flow stops until all parallel threads are complete. Then the next step is activated and a single thread of execution continues.
Examples of rendezvous activities are:

A “merge” is a point in the workflow where multiple processes converge into a single thread. At the point where the threads join, all active threads are synchronized. If just one path is taken, alternative branches re-converge without being synchronized. When synchronization completes, the next step is activated and a single thread of execution continues.
The primary concern when using this pattern is to decide when to synchronize and when to merge. This type of merge you use must have the capacity to determine if it can expect activation from some of its branches. With a merge, once a branch has been activated, it cannot be re-activated while the merge awaits the completion of other branches.
For example, after one or both of steps that contact the fire department and insurance company are complete (depending on whether they were executed at all), the submit report step is performed once.

A “merge and wait” is a point in the workflow where two or more alternate branches converge without synchronizing. Synonyms for simple merge include XOR-join, asynchronous join, and merge.
This pattern assumes that no alternative branches are ever executed in parallel. This type of process consists of multiple branches (as opposed to multiple threads) that transition into a single step. Only one of many branches is activated.
The archive claim step is enabled after the pay damage or contact customer steps are executed.
After a payment is received or the credit granted, the car is delivered to the customer.

A “multi-thread” is a point in a workflow where two or more branches re-converge without synchronization. If more than one branch is activated, possibly concurrently, the step following the merge is started for each activation of each incoming branch. The next step starts when any one incoming branch is completed and all other branches that reach the merge point start a new copy of the next step.
You might use a multi-thread join when two or more parallel branches share the same end step (no steps are replicated).
A “first-in-line” step waits for one of multiple branches to complete before starting a subsequent step. A “discriminator” waits for the remaining branches to complete but ignores them. Once all incoming branches are triggered, the discriminator resets itself so that it can be triggered again.
For example, to improve query response time, a complex search is sent to two databases. The first search that generates a result causes the workflow to proceed while the second result is ignored.
| Copyright © 2010 CA. All rights reserved. | Email CA Technologies about this topic |