Jobs that run on Agents that integrate with Applications return a Application jobid as the 'ProcessID'
Sometimes this ID needs to be referenced in other Objects or Notifications.
?In the Post-Process Tab add the following script in an Include or straight into the Tab:
The Script references a SQLI Variable(PROCESS.ID). The statement in the variable would be:
The Script then inserts the value into a Static Variable(PID_NBR.VAR) with the Key being pid.<runid>. The Variable can be referenced by an object later on.
To clean out the entries in the Static Variable, put the following Script in a Script Object and schedule it to run weekly/monthly/etc:
:set &pid#=prep_process_var(PROCESS.ID)
:process &pid#
: set &pid_nbr#=get_process_line(&pid#,1)
: set &date#=get_process_line(&pid#,3)
: if &date# <> &$PHYS_DATE_DDMMYY#
: delete_var "PROCESS.ID", "&pid_nbr#"
: endif
:endprocess
:close_process &pid#