To allow calling long running external tasks from inside a job task and not depend on polling external dependencies for a lot of time, the following 3 things would allow node-workflow's API clients have better control over the execution of a job:
1) Add a new 'waiting' state to jobs
1) Allow calling the 'cb' callback inside a job task like this: return cb('wait'). It will make the job stop/pause/halt its execution by setting the job state to 'waiting'
2) Allow resuming the job with something like /jobs/uuid/resume
Doing this will eliminate the need for a polling task on jobs that call external RPC actions.
To allow calling long running external tasks from inside a job task and not depend on polling external dependencies for a lot of time, the following 3 things would allow node-workflow's API clients have better control over the execution of a job:
1) Add a new 'waiting' state to jobs 1) Allow calling the 'cb' callback inside a job task like this: return cb('wait'). It will make the job stop/pause/halt its execution by setting the job state to 'waiting' 2) Allow resuming the job with something like /jobs/uuid/resume
Doing this will eliminate the need for a polling task on jobs that call external RPC actions.