It's easier to implement these things if you can write the code like:
await sendVerificationEmail();
await waitForUserToClick(); // This could take forever
await sendWelcomeEmail();
If you do the above in a "normal" program, said program could stay in memory forever (consuming RAM, server can't restart, etc). The workflow engine will take care of storing intermediate state so you can indeed write the above code.The other option is to implement a state machine via your database and some state column, but the code doesn't look as pretty as the above three lines.
Note that this particular tool seems to be more declarative than my example above (it uses JSON to do define the steps), so instead of using an `if` statement, you'd need to declare a "Decision".
Hope this helps!
Exactly!
In both these cases, before these types of systems existed, it were useful a dozens of ad-hoc scripts that handled it. Monitoring, testing, instrumentation and visibility were usually after-thoughts and often not worth the trouble.
Workflow Orchestration Engines solve these problems. Each of these workflow engines have a slightly different angle, slightly better at different use cases, and as usual it can be quite important to select the right tool for the job.
But if you have found one, it can be a real boost to the quality of your processes.