ActivityHistoryRecord - Global

A data object that is a member of the WorkflowModelManager class; ActivityHistoryRecord methods facilitate interacting with the WorkflowModelManager object.

The ActivityHistoryRecord is basically a copy of the data from a GlideRecord on table wf_history. There are some helper methods defined for this class as well. There are no accessors or mutator to the simple data elements of this class.

ActivityHistoryRecord - addArrivedActivityToJoin(String Array activityIds)

Changes the arrivedState of already known ids to true.

As soon as this method changes the arrivedState of known ids to true, it tests to see if the join is satisfied. if it is, the model walk can continue; if not, it should continue to next appropriate transition. This is called during playback, as expected wf_activities flow to the join.

Table 1. Parameters
Name Type Description
activityIds String Array Array of wf_activity.sys_ids that are headed towards join.
Table 2. Returns
TypeDescription
void

ActivityHistoryRecord - addJoinFromActivityIds(String Array activityIds)

Seeds all the expected wf_activity sys_ids that are expected to pass through this join and sets their arriveState = false.

This state is flipped to true as each expected activity transitions to this instance of the Join. This method is called as part of building the cached model in memory, and is not called during playback.

Table 3. Parameters
Name Type Description
activityIds String Array Array of wf_activity.sys_ids that are headed towards join.
Table 4. Returns
Type Description
void

ActivityHistoryRecord - addTransition(Object InTransition)

As model is cached by _getExecutedTransitions(), this method adds transitions that have gone FROM this activity towards the .to activity.

Table 5. Parameters
Name Type Description
InTransition Object ExecutedTransition Javascript object to add to this activity.
Table 6. Returns
TypeDescription
void

ActivityHistoryRecord - debugDump( )

Prints debug information.

Table 7. Parameters
Name Type Description
none
Table 8. Returns
TypeDescription
void

ActivityHistoryRecord - doesJoinContainActivity( )

Tests the incoming wf_activity sys_id, presumed to be seeded in this history record. If it is, it is tested to see if it is an activity that would come through this join.

Table 9. Parameters
Name Type Description
None
Table 10. Returns
TypeDescription
BooleanTrue, if it is an activity that would come through this join.

ActivityHistoryRecord - getLogString( )

Gets the log string from the history record.

Table 11. Parameters
Name Type Description
None
Table 12. Returns
TypeDescription
StringThe log string.

ActivityHistoryRecord - getSatisfiedJoinActivities( )

Returns the sys_ids of the history records that transition to this Join activity that have already come through.

Table 13. Parameters
Name Type Description
None
Table 14. Returns
TypeDescription
String ArrayArray of sys_ids of the history records that transition to this Join activity.

ActivityHistoryRecord - getTransitionCount( )

Gets the transition count for this activity.

Table 15. Parameters
Name Type Description
None
Table 16. Returns
TypeDescription
NumberNumber of transitions from this activity.

ActivityHistoryRecord - getUnSatisfiedJoinActivities( )

Returns the sys_ids of the history records that transition to this Join activity that the join is still waiting for.

Table 17. Parameters
Name Type Description
None
Table 18. Returns
TypeDescription
String ArrayArray of sys_ids of the history records that transition to this Join activity.

ActivityHistoryRecord - isARollback( )

Determines if this activity is one of the Rollback activities.

Table 19. Parameters
Name Type Description
None
Table 20. Returns
TypeDescription
BooleanTrue, if activity is one of the Rollback activities.

ActivityHistoryRecord - isIdADestination(String ahrSys_id)

Determines if the sys_id passed in is a destination of any of the transitions associated with this instance of an ActivityHistoryRecord.

Table 21. Parameters
Name Type Description
ahrSys_id String Activity history sys_id from table wf_history.
Table 22. Returns
TypeDescription
BooleanTrue, if the sys_id passed in is a destination of any of the transitions.

ActivityHistoryRecord - isJoin( )

Determines if this activity is a join.

Table 23. Parameters
Name Type Description
None
Table 24. Returns
TypeDescription
BooleanTrue, if the activity is "Join".

ActivityHistoryRecord - isJoinWaitingForActivity(String Array activityIds)

Tests the incoming wf_activity sys_id, presumed to be seeded in this history record.

If it is, it is tested to see if it has already been through; if it has, then this join is not waiting on this activity and it should look further downstream for the one that is waiting. This test is is called in sequence as the model is walked, so it does presume in the instances of rollbacks and loops. If the sys_id is in here and the flag is true, this waiting Join is further up the sequence. This sort of check is required as the history records of Joins are removed from the history table, and so it is possible for a record to be in the transition table with no match in the corresponding history table, but is still an appropriate match for an earlier executed instance of the same Join.

Table 25. Parameters
Name Type Description
activityIds String Array Array of wf_activity.sys_ids that are headed towards join.
Table 26. Returns
TypeDescription
BooleanTrue, if the activity has already been through.

ActivityHistoryRecord - isRolledBack( )

Determines if this workflow was rolled back.

Table 27. Parameters
Name Type Description
None
Table 28. Returns
TypeDescription
BooleanTrue, if this workflow was rolled back.

ActivityHistoryRecord - isTurnstile( )

Determines if this activity is a turnstile.

Table 29. Parameters
Name Type Description
None
Table 30. Returns
TypeDescription
BooleanTrue, if this activity is a turnstile.

ActivityHistoryRecord - isJoinSatisfied( )

Examines the value of the arriveState. Called during playback when the transition to sys_id of a transition points to an activity that is a join.

Called during playback when the transition to sys_id of a transition points to an activity that is a join.

Table 31. Parameters
Name Type Description
None
Table 32. Returns
TypeDescription
BooleanTrue, if the join is satisfied.