Here is the code for a script that when added to the beginning of a workflow, will dynamically apply breakpoints to all tasks. (I didn't write it... I got it from someone else in these forums.)
Put this in a script object;
!Get Parent RUNID
:PSET &WORKFLOW_RUNID# = GET_PARENT_NR(&$RUNID#)
:SET &HND# = PREP_PROCESS_VAR(DC.UTIL.SET.BREAKPOINTS.QUERY)
!STOP Workflow
:SET &RET# = MODIFY_TASK(&WORKFLOW_RUNID#, STOP_MODIFY)
!SET Breakpoints on every Task
:PROCESS &HND#
: SET &TASK_NAME# = GET_PROCESS_LINE(&HND#,2)
: SET &TASK_RUNID# = GET_PROCESS_LINE(&HND#,3)
: SET &TASK_TASKNUM# = GET_PROCESS_LINE(&HND#,4)
: SET &RET# = MODIFY_TASK(&WORKFLOW_RUNID#,,&TASK_TASKNUM#, BREAKPOINT, "YES")
: print "RET=&RET#. Setting breakpoint for &TASK_TASKNUM#:&TASK_RUNID#:&TASK_NAME#"
:ENDPROCESS
!COMMIT Changes & Start Workflow
:SET &RET# = MODIFY_TASK(&WORKFLOW_RUNID#, COMMIT)
:SET &RET# = MODIFY_TASK(&WORKFLOW_RUNID#, GO, FORCED)
The SQLI_SEQ variable DC.UTIL.SET.BREKAPOINTS.QUERY contains this SQL:
(and it must accept &WORKFLOW_RUNID# as a bound parameter)
select
ejpp_object as child_task_name,
ejpp_taskidnr as child_task_runid,
ejpp_lnr as tasknum
from ejpp
where EJPP_AH_IDNR = ?
and ejpp_taskidnr <> 0
order by ejpp_lnr