Check if workflow is scheduled?

Is there a way to check whether a workflow is scheduled?

For example, we have electronic payments that require verification. The verification is done recurrently until the payment is settled.

However, sometimes the workflows fail to schedule recurrently and we end up with a ghosted transaction. To resume this transaction verification I need to run the workflow on that transaction again.

I would like to have a way to check that workflow X is scheduled with data thing Y as parameter. If not then I would show a “verify” button to re-schedule the workflow.

So what’s needed is a way to inquire about scheduled workflows. Is there a way?

1 Like

When scheduling you can create a log of sorts with the workflow ID (returned from schedule), and parameters you sent to scheduled wf

And then delete that log when the workflow runs?

I see how that would work. I thought we should be able to get the real thing though instead of mimicking the scheduler.

I have a similar requirement and what I do seems to work fine for me.

When your user clicks “verify”, perform the following:

  1. Schedule your verification workflow
  2. Update the payment row’s new field (let’s call it verifyID) with the results of Step One. This will load the ID of the just-scheduled workflow.

When your verification workflow runs, do the following:

  1. Do your regular verifying stuff.
  2. If the verifying stuff worked, blank out the corresponding payment row’s verifyID. This would indicate that the payment row has been verified.
  3. IF the verifying stuff did NOT work, reschedule your verification workflow AND then update your payment row’s verifyID with the result of the rescheduling.

Since your new verifyID field is just a simple text field, you can even populate it with “verified” if your verifying stuff worked. That way, you can check all of your payments and the successful ones will show “verified” and unsuccessful ones (or ones that haven’t run yet) will show a string of numbers.

Hope this helps.

This topic was automatically closed after 70 days. New replies are no longer allowed.