the fail component is designed in a way that it can abort the parent jobflow or graph with a user-specified error message and at the same time return some results through the dictionary. Having said that, you could use the Fail component for both purposes. Let me present you with an example:
- Adding a Status Code
- You would place Fail as a standalone component in the very last phase of your jobflow.
- You could assign a user-specified error message, “End as Aborted” for instance.
- This would help you distinguish between a jobflow that ended by this intentional user abort and a jobflow that finished with an actual error.
- Cancel future phases and end graph after current phase finishes
- Let’s say you have at least 2 different phases in your jobflow.
- If you placed the Fail component in between those 2 existing phases, you could intentionally prevent the higher phase from being executed.
Note: this could not be achieved by using the Success component as it does not function as a stopper and the graph/jobflow would simply continue to run.
Please also note that the aforementioned examples would answer just the basic questions. If they do not address your particular situation sufficiently, feel free to provide us with the graph in question so that we can get a better insight into the specific case. In similar situations, a minor redesign of a graph might do the trick.