One way i would do is get the run ID and pass it to the plan you are submitting
:PSET &PID# = SYS_ACT_PARENT_NR()
:SET &CHECK# = ACTIVATE_UC_OBJECT(&WATCH_JOB#,,,,,PASS_VALUES)
and in the plan where you want ot cancel/terminate you put the below command which will cancel the run ID
:SET &STATUS# = CANCEL_UC_OBJECT(&PID#, "ENDED_OK")
There might be other ways, this is how i have used in my process
Original Message:
Sent: Nov 30, 2022 01:59 PM
From: Luna Dunham
Subject: AWI -- Cancel created workflow
My current setup looks like this:
where Watch_Job is a workflow that will run after a given time. I am stumped as to how I can communicate with the workflow to cancel it after a condition is met. I have tried ":SET &ACTOBJ# = ACTIVATE_UC_OBJECT(&WATCH_JOB#,,"DD.MM.YY:01.12.00") " to set the start time after a specific point, and I have tried to get the runId through various ways, however, none match the runId shown in the executions list.
My question is, is there a better way to activate the workflow while also being able to cancel it down the line? Is there something else that I could do?
Thanks.