AnsweredAssumed Answered

How to determine Task Running Numbers with JCL

Question asked by James_D._7222 on Nov 30, 2016
Latest reply on Dec 6, 2016 by Wolfgang_Brueckler_1288
Hello,

Using MODIFY_TASK to make changes to a task in a currently-active workflow requires a running number (different than the RunID).  I can't seem to determine how to poll a work flow to resolve Running Number to a Task Name, or vice versa.

It's pretty easy to set everything in a workflow inactive for example:

:  SET &RETSTOP# = MODIFY_TASK(&$ACTIVATOR_RUNID#, STOP_MODIFY)
:  SET &RETMOD# = 0
:  SET &TASKNUMBER# = 1
:  WHILE &RETMOD# <> 0000000000020741
:    SET &RETMOD# = MODIFY_TASK(&$ACTIVATOR_RUNID#,,&TASKNUMBER#, ACTIVE, "NO")
:    SET &TASKNUMBER# = 1 + &TASKNUMBER#
:  ENDWHILE
:  SET &RETCOMMIT# = MODIFY_TASK(&$ACTIVATOR_RUNID#, COMMIT)
:  SET &RETGO# = MODIFY_TASK(&$ACTIVATOR_RUNID#, GO)

(0000000000020741 is the error code that MODIFY_TASK supplies when a given task number doesn't exist in a workflow to be modified.)

But that's not always what I want to do.    Does anyone know how to turn a Running Number into a Task Name or vice versa?  Ideally, a method that would work on a workflow that's not currently running, but a solution for running flows would solve my current issue.

Outcomes