Kind of, but not natively from the workflow. A FunctionError() is fatal is it is today, but it might be worth an idea in the ideas portal to change that.
We updated all our functions to yield with a FunctionResult(results) when an exception is caught, rather than a FunctionError() as is default.
Then, we have a
results["was_successful"] = False at the top of the function code, and results["was_successful"] = True at the end of the code, if was_successful is False when received by the workflow, we know there was an error and can gracefully handle it. We can pass errors as well to results, etc, etc ... depends on the function use.
------------------------------
Jared Fagel
Cyber Security Analyst I
Public Utility
------------------------------
Original Message:
Sent: Tue May 25, 2021 05:02 AM
From: Robert Kemp
Subject: Error handling within Resilient Workflows
Hi all,
Is there a graceful way to handle Function errors within Resilient workflows? Currently my workflows seem to be terminating with a Failed state whenever a Function returns a FunctionError in its code, ideally I'd like to be able to handle that situation in the course of the workflow without it (relatively) silently aborting instead.
Thanks
------------------------------
Robert Kemp
------------------------------