Failing a workflow #698
-
Is it possible to "Fail" a workflow based on a given condition? e.g. I could have an API that gives me a status. Based on the value of that status, I want to decide that if the status returned is "XYZ", for this particular workflow, the workflow should fail. I searched the specification, and couldn't see this was possible and think this would be a good feature to support. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can you give more info on your use case?
is this status a value that should come from the workflow execution, like a query for parts of workflow data?
So are you looking for some api that would allow you to trigger cancellation / compensation or termination of your workflow execution? Think best way would be to open some feature requests for these things and then see where the discussions go. Thanks. |
Beta Was this translation helpful? Give feedback.
-
@k-jay-c please see how the new DSL handles fault tolerance now: https://github.com/serverlessworkflow/specification/blob/main/dsl.md#fault-tolerance Answering your question, we have an example that raises an error if |
Beta Was this translation helpful? Give feedback.
@k-jay-c please see how the new DSL handles fault tolerance now: https://github.com/serverlessworkflow/specification/blob/main/dsl.md#fault-tolerance
Answering your question, we have an example that raises an error if
500
is returned:https://github.com/serverlessworkflow/specification/blob/main/examples/raise.yaml