Workflow - getRunningFlows(GlideRecord record)

Gets all the currently running workflow contexts for the input record.

The input record is any record on any table for which the caller wants the running workflow contexts.

Table 1. Parameters
Name Type Description
record GlideRecord GlideRecord of the record for which the caller wants a list of all running workflows.
Table 2. Returns
Type Description
GlideRecord GlideRecord on table wf_context and filtered for all executing workflow contexts.

//where current is a task record with a workflow context
      var wf = new Workflow().getRunningFlows(current);
      while(wf.next()) {     
          new Workflow().broadcastEvent(wf.sys_id, 'pause');
      }