input-output-hk / cicero

event-driven automation for Nomad
https://handbook.cicero.ci.iog.io
41 stars 11 forks source link

Compensating Actions #6

Closed blaggacao closed 2 years ago

blaggacao commented 2 years ago

For compensating actions, I suspect it will be required to allow to destructively overwrite or even unlink global state data points.

Monotonicity of the global state might not be the correct approach in order to implement truely recursive compensation actions.

The data-lake still has those facts recorded, even if they are rendered irrelevant for the workflow state.

dermetfan commented 2 years ago

Allowing arbitrary deletion and changes to the workflow state could create a very opaque state history where it is difficult to tell what, why, and when happened during the execution of one particular workflow instance.

An alternative solution could be to allow cloning an existing workflow instance like this:

  1. Press clone button
  2. Text field opens that contains workflow instance state (which is just a JSON anyway)
  3. Make desired changes to the state
  4. Press start button ⇒ New workflow instance with your edited state is started
dermetfan commented 2 years ago

This no longer applies as we have no state other than the facts anymore since the switch from workflows to standalone actions.