WorkflowModelManager - getNextByTransitionId(String haRecordSysId)

Retrieves the history activity that executed just after to the one identified by the sys_id provided in the argument. This function retreives the cached history record associated with the provided wf_history.sys_id and then calls getNextByTransition. The return values are based on which transitions came before the haRecord submitted and not necessarily the activities that executed just prior to the haRecord in time. To get the activity that executed prior to this activity in time, use getNextByExecutedOrder.

This function retreives the cached history record associated with the provided wf_history.sys_id and then calls getNextByTransition. The return values are based on which transitions came before the haRecord submitted and not necessarily the activities that executed just prior to the haRecord in time. To get the activity that executed prior to this activity in time, use getNextByExecutedOrder.

Table 1. Parameters
Name Type Description
haRecordSysId String sys_id of the activity history (table wf_history).
Table 2. Returns
TypeDescription
Object ArrayArray of ActivityHistoryRecord JavaScript objects.

var model = new WorkflowModelManager('7b3e01573b130000dada82c09ccf3dcf');
      model.getExecutedHistory();
      model.playBack();
      
      var current = model.getActivityHistoryRecordById('d6681d573b130000dada82c09ccf3d10');
      current.debugDump();
      var results = model.getNextByTransitionId(current.sys_id);
      gs.print('COMPLETED NEXT' + results.length );
      for( var i = 0; i < results.length; i++){
          results[i].debugDump();
      }