Reputation: 59
I have a requirement where I need to invoke an activity in SWF after x minutes. For this I am planning to start a timer in SWF(for x minutes) and invoke the activity when timer fires. Can I get a pointer on how to start timer in SWF? Another requirement is I might some time have to cancel the timer as well, in cases where I needn't wait for complete duration. Is there anything for canceling a started timer in SWF? Can someone point me to the required APIs?
Thanks!
Upvotes: 1
Views: 1347
Reputation: 801
You cannot cancel a timer in SWF. However, I think you can configure your workflow worker to ignore the timer altogether if a certain condition is met. You can design the workflow such that it carries on its activities based on which of two promises gets fulfilled first, using the OrPromise:
One promise could be your timer, the other could be your condition to carry on. Let me know if this helps.
Upvotes: 1