WorkflowModelManager - getAllTransitionedIntoActivityId(String haRecordSysId)

Retrieves the history activities that executed and transitioned into the one represented by the sys_id in the argument. The next status is based on the wf_activity.sys_id associated with the activity represented in the haRecord existing as a TO in a transition associated with any ActivityHistoryRecords that executed in the workflow's history. (This differs from getPreviousByTransition, which returns only TO transitions that come before the haRecord in the execution sequence (by time).) The return value is a collection of ActivityHistoryRecords that identify the argument haRecord.wfaId as their TO activity.

The next status is based on the wf_activity.sys_id associated with the activity represented in the haRecord existing as a TO in a transition associated with any ActivityHistoryRecords that executed in the workflow's history. (This differs from getPreviousByTransition, which returns only TO transitions that come before the haRecord in the execution sequence (by time).) The return value is a collection of ActivityHistoryRecords that identify the argument haRecord.wfaId as their TO activity.

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

var model = new WorkflowModelManager('a143585c3b001000dada82c09ccf3d44');
      model.getExecutedHistory();
      var activity = model.begin;
      gs.print('activity: ' + activity.wfaName + ', transitions: ' + activity.transitions.length);
      while( activity != null){    
          gs.print('activity: ' + activity.wfaName + ', transitions: ' + activity.transitions.length);    
          var parents = model.getAllTransitionedIntoActivity(activity);
          for( var i = 0; i < parents.length; i++ ){
              gs.print(' ---------------  parent activity: ' + parents[i].wfaName );
            }
           activity = model.getNextByExecutedOrder( activity );
      }