When writing a custom step that creates a scheduled task, are you responsible for calling the "cancel()" method before/after you call "onSuccess/onFailure"
I'm getting an error:
completed: already completed CpsStepContext
after my timer has called the onSuccess method, so I assume i'm not doing things in the correct order.
Is there a good example of the proper methodology for this? The only example i can find is the WaitConditionStep - but that calls a body with callback, and so it sets up a net-new timer w/ new runnable instance; not a repeated call of the same Runnable.
Right now with this error i'm guessing i should do, these steps always in this order:
onSuccess/onFailure (depending on state)
task.cancel(true);
task = null;
return;
Am i wrong or missing something?
Thanks in advance!
-Bryan