Async steps body
Hi, How to implement async step body... the system crashes when i add await to step body....
Could you attach the problem code here?
Hi,
I have successfully tested this
class HelloWorld extends workflow_es.StepBody {
async run(context) {
console.log("Hello World");
await doSomethingAsync();
return workflow_es.ExecutionResult.next();
}
}
@danielgerlag between steps, is a step will waiting for the previous step finished with async?
yes it does, but if you call an async method or promise from within the step and don't await it, then it can't know about it
so, it can not await for async method
as you can see here:
https://github.com/danielgerlag/workflow-es/blob/master/core/src/services/workflow-executor.ts#L73
it does in fact await, but if you fail to await any nested async methods inside your step implementation, then it's your choice