I’m implementing a Job queue system for background data processing. I want to schedule a workflow to fire when the current one is completed, only if it isn’t already running in the background. Is there a way to check for this condition?
You can set the API workflow ID on a field when it is scheduled and make changes to the field to clear it at the end of the backend workflow. Check if the field is empty. You can also create a Log data type that has the Type (option set) of workflow that is running, and its status (scheduled, running, complete, error). Create log when scheduled, update log to running at start of workflow and complete at end of workflow. Make it error if any steps return an error.
I think both are great suggestions. Going to give them a try. Thank you .
Hey George, I’d need to ask you further details about how to implement this.
In my case, I need to trigger an event on the front end when an API workflow ends.
So, I schedule the API workflow and I can get its ID in the next action of the workflow but getting “result of step #” and get its ID.
But…what action should I use next in the workflow editor to detect the end of that API workflow?
something like “when condition [workflow with this specific ID has its status to “completed”] is true” → trigger the custom event on the front end…
But I can’t find something like this…so could you tell me specifically how to detect when an API workflow ends and achieve the result I need?
Thank you in advance!
Fabio