WorkflowModelManager - getPreviousByExecutedOrder(Object haRecord)

Retrieves the history activity that executed just previous to the one provided in the argument. The previous status is based on the activity index reflecting the nearest prior activity in time and not necessarily the nearest prior activity with a valid transition to this activity. To get the nearest prior activity that transitioned to this haRecord passed in use getPreviousByTransition( haRecord). Note: In the process of assembling the execution order array, blanks are left in the array where history objects have been deleted. This ensures that the index in the array and the activity_index of the object remain in sync. For that reason, all objects coming out of the execution order array should be tested for nil() and not assumed to be the previous record based on activity_index or array index value.

The previous status is based on the activity index reflecting the nearest prior activity in time and not necessarily the nearest prior activity with a valid transition to this activity. To get the nearest prior activity that transitioned to this haRecord passed in use getPreviousByTransition( haRecord).
Note: In the process of assembling the execution order array, blanks are left in the array where history objects have been deleted. This ensures that the index in the array and the activity_index of the object remain in sync. For that reason, all objects coming out of the execution order array should be tested for nil() and not assumed to be the previous record based on activity_index or array index value.
Table 1. Parameters
Name Type Description
haRecord Object ActivityHistoryRecord JavaScript object
Table 2. Returns
TypeDescription
ObjectThe ActivityHistoryRecord JavaScript object requested.