There is no way to set a workflow status on end to a status different than completed. While the workflow completed its steps we don't have a way to say that the step results are unexpected and the workflow actually failed. From an API point of view there's no way to tell if a workflow REALLY did the work it supposed to do.
Implementation ideas
after a discussion with @fjtirado we have formed this suggestion:
The runtime will seek a metadata key errorMessage and if it is not empty then it will set the status of the instance to failed
The advantage is that we don't add new keywords or change the spec, or add custom actions or other workarounds, so this syntax is available ootb for every workflow developer out there.
Description
There is no way to set a workflow status on end to a status different than completed. While the workflow completed its steps we don't have a way to say that the step results are unexpected and the workflow actually failed. From an API point of view there's no way to tell if a workflow REALLY did the work it supposed to do.
Implementation ideas
after a discussion with @fjtirado we have formed this suggestion:
The runtime will seek a metadata key
errorMessage
and if it is not empty then it will set the status of the instance to failed The advantage is that we don't add new keywords or change the spec, or add custom actions or other workarounds, so this syntax is available ootb for every workflow developer out there.