Table Description
Join Instance: A count of the number of parallel branches remaining to be synchronized at an instance of a workflow join (synchronization point) in a Process Instance.

When a Process Instance reaches a Parallel (AND) Split, it creates multiple threads of execution that must be synchronized at a corresponding Parallel (AND) Join. The workflow engine creates a Join Instance row once it has determined the number of outbound transitions that can be followed out of the Parallel (AND) Split. This row contains a count of the number of threads that must terminate before the Join Instance is satisfied and the engine can execute the activity associated with the join.

As each inbound thread on the join completes, it decrements the waitCount (the number of remaining threads). When the waitCount reaches 0, the synchronization is complete and the engine executes the activity associated with the join.

Example

You define a workflow (Process Definition) to obtain vetting information about candidates for employment as teachers. The activities defined in your workflow are:

  • a Parallel (AND) split that executes the following two activities in parallel:
    • a police background check on the candidate; and
    • a references check with all referees listed on the candidate's resume. This activity is not executed if the candidate has had no previous employment (e.g. a recent graduate).
  • a Parallel (AND) join that synchronizes the completion of the previous parallel activities; and
  • an activity that adds the candidate's name to the list of candidates eligible for interview. This activity only executes if all previously executed checks passed.

John Smith's applies for a job as a teacher in a local school. An employee at the school board enters his application details into the system. This triggers the enactment of your workflow and creates a Process Instance.

The workflow engine executes the Process Instance. The first thing it encounters is the Parallel (AND) split. It checks the two parallel activities for pre-conditions. The first (police check) has no pre-condition, so it is added to the list of executable activities. The second (resume check) has a pre-condition which evaluates 'true' (as John has worked in another school before). The workflow engine creates two parallel threads for execution of the two activities. It also creates a Join Instance record with a wait count of 2, to denote that the join should synchronize two threads.

The 'police check' activity completes (John has no record) and the workflow engine decrements the wait count on the Parallel (AND) Join; which becomes 1. The 'resume check' activity completes (all references checked out OK) and the workflow engine decrements the wait count on the Parallel (AND) Join; which becomes 0. The workflow engine detects that the Join is satisfied and executes the activity that adds the candidate's name to the list of candidates eligible for interview.

Technical Notes

At runtime, any arbitrary number of paths can be taken out of a Parallel (AND) split, from the number of available paths to 0. The JoinInstance will reflect the number of paths taken, as long as it is greater than 0. If no paths are taken, the workflow engine detects that the Process Instance has stalled and creates a Failed Message for the attention of an administrator.

Relationship Diagram
Click the diagram to manipulate and zoom. Traverse the diagram using Click-and-Drag motions.
Attributes (5)
AttributeKeyNullableDescriptionDDL Type
joinInstanceIDYesNoUniquely identifies ID a runtime instance of a join in a workflow.SVR_INT64
processInstanceID NoThe primary key of the Process Instance in which the join instance was created.SVR_INT64
joinMetaID NoThe ID of a join in the Process Definition metadata (currently the ID of the activity to which the join is connected).SVR_INT64
waitCount NoThe number of threads that remain to be synchronized by this workflow join.SVR_INT8
lastWritten   SVR_DATETIME
Foreign Keys (1)
ChildParent
JoinInstance.processInstanceIDProcessInstance.processInstanceID
Indices (1)
Index NameAttributes
JoinInstanceIndex1joinMetaID, processInstanceID
Related Pages (0)