Hello,
I would like to request additional Task-level failure handling capabilities, specifically around generating and distributing task execution logs when an error is encountered.
The core idea would be to provide a Task-level "Failure Settings" section that allows developers to configure what should happen when a task, or a portion of a task, encounters an error. Ideally, this could support one or both of the following approaches:
For the second approach, I imagine the Task-level "Failure Settings" could contain configured recipients, subject/body expressions, and an option to attach the completed task execution log as an HTML file. During the task, a "Record Failure" action could then be used anywhere within the action flow.
If that action could accept expressions, it would allow the developer to capture context such as the current report, current cycle value, applied filters, recipient list, error message, etc. If multiple "Record Failure" actions are triggered during a single task execution, it would be useful if those details were automatically appended together and included in the final failure email, for example:
Failure 1: <expression details>
Failure 2: <expression details>
...
Failure N: <expression details>
Importantly, triggering "Record Failure" would not necessarily need to stop or fail the task. It could be used conditionally to simply flag that an issue occurred. After the completion (or failure) of a task, Mail & Deploy could detect "in post" that a failure was recorded, generate the completed task log, and send the configured failure notification with the HTML log attached.
The use case for this is our iterative reporting process. A large portion of our automated reporting relies on a helper/supporting application that defines the recipient distribution list for a report, including both the recipients and the filters that should be applied for each recipient.
Because a single task may cycle through many recipients and filter combinations, I use an iterative Try-Catch process so that a failure during one cycle does not prevent the remaining reports from being generated. The Catch portion can notify developers about the specific report or cycle that failed, while allowing the task to continue.
The current limitation is that the detailed task execution log is only available afterward by locating that specific execution in the calendar and opening the log manually. Additionally, Workspace-level E-Mail Notifications are primarily useful when the entire task fails, whereas in this scenario the task may finish successfully even though one or more individual cycles encountered errors.
A "Generate Task Log" action or "Record Failure" mechanism would make it possible to retain the resilience of the Try-Catch process while still automatically providing developers with the full execution log and the exact context surrounding each failure.
Would it be possible to expose the task execution log as an HTML file during or after runtime?