Hi team,
Any ideas on how to cancel an API workflow that has been scheduled to run in the future?
appreciate your help.
regards
Hi team,
Any ideas on how to cancel an API workflow that has been scheduled to run in the future?
appreciate your help.
regards
You probably want to put a marker on the thing it is scheduled on, so that when it runs it bypasses the steps.
Yep, thatâs how Iâd do it.
thanks @NigelG
so just to be clear, when you say âput a marker on the thingâ, do you mean put a condition to the thing that has been passed to the scheduled workflow in the field highlighted in red at the bottom of the screenshot?
No, I mean put a field on the thing that your API is working on, and use that in the actions on the workflow.
For Instance, if you want to email later on someone at a schedule date, you can create a Thing called âEmailâ and attached it to the User : Userâs Email_scheduled_list
Then you definie as a condition at the endpoint level âWhen Userâs Email_scheduled_list contains Emailâ. So if you want to cancel the email, you would remove Email from Userâs Email_scheduled_list.
Hope it helps
thanks @nicolas.daprigny
that makes sense.
Hello there @NigelG and @Rogelio!
just wondering, beacuse Iâm working now in scheduling api workflows int he future, and the need to have something âautomaticâ that if I update the date, will delete the previous scheduled api workflow and create a new one
The thing is a POLICY (yes, insurance). And policies have expiration dates. Itâs common practice that when you renew the policy, just move further in the future the expiration date.
So, I have a group, that containâs the policy expiration date auto-binded. How could I do, if I pick a different expiration date and gets saved, to delete the previous API workflow and make a new one with the new date?
Ideas?
@martin2 did you figure out a way to do this? kill the previously scheduled api workflow when the expiration date changes in the db?
@trevor what youâll want to do is save the scheduled ID for whatever workflow youâre running, and save it to the object for use later. Part of your âupdate the dateâ workflow would involve cancelling the old workflow (using the saved workflow ID) and then scheduling a new one. I think this should answer your questionâŚ
Step by step, using an example app:
Does that answer your question?
That helped⌠Thank you very much!
thanks for the detailed explanation