Netflix / conductor

Conductor is a microservices orchestration engine.
Apache License 2.0
12.82k stars 2.34k forks source link

How to compensate task failures #212

Closed marcolenzo closed 7 years ago

marcolenzo commented 7 years ago

This is more of a support request than an issue.

I was wondering what is the proper way of compensating task failures.

Let's assume that I have a provisioning flows which involves two steps in series. However if the second step in the flow fails, I need to revert whatever I did in the first step. How am I supposed to do that?

From what I am understanding I cannot use a DECISION task. The only option at hand seems to use Events and EventHandlers. Can someone guide me in the right direction?

v1r3n commented 7 years ago

@marcolenzo there are two ways you can do this.

marcolenzo commented 7 years ago

@v1r3n thank you for the prompt support!

marcolenzo commented 7 years ago

@v1r3n I am re-opening the issue because I have some additional questions after I had chance to try out your suggestions.

1- It does not seem possible to specify the version of the failureWorkflow. I noticed that the failureWorkflow shares the input of the original workflow, thus the version as well. Is it intentional? 2- Is there a way to access the output of the original workflow?

v1r3n commented 7 years ago
  1. This is a known limitation that failure workflow does not allow specifying the version. We are adding that in the coming releases. (no ETA as yet)
  2. Failure workflow should get the output of main workflow that failed as input. Again, not in the current release, but we will add in the coming releases.