[X] Callbacks on each step: on-success, on-error, on-start, on-complete for status reporting.
[X] Bug fix - inject couldn't return nil.
[ ] We might go for multimethods like this article instead of:
Wrapper function for the callbacks - that way the callbacks value can be data that will be passed to the wrapper, very handy for re-frame as the callbacks can be events and the wrapper function dispatches the event
[X] Steps can access the previous step result as the second argument of the function. Also the on-success function receives the last step result as as second parameter. This allows to have a last step that returns a clean output instead of using the whole context as an output, or an arbitrary key in the context. David you might want to revert this?
[ ] :is-anomaly-error? attribute in the steps. The value is a function that would be called if the step returns an anomaly. If this function returns false, then the flow continues. This allows to break the circuit only with some anomalies.
In a nutshell, the main new features are:
on-success
,on-error
,on-start
,on-complete
for status reporting.:is-anomaly-error?
attribute in the steps. The value is a function that would be called if the step returns an anomaly. If this function returns false, then the flow continues. This allows to break the circuit only with some anomalies.