Professional Documents
Culture Documents
Background:
Issues have been raised regarding the correct handling of errors in workflow sessions, connectors, and worklets.
This document clarifies the standards that should be followed in the development of new workflows for eventual
propagation to the Production environment. Additionally, workflows that are in the current Development and QA
environments should be reviewed to ensure that they meet the standards. This document is intended to be used in
most scenarios, but is not all inclusive of the error handling that may be done in a workflow.
The central issues surround connector, session and worklet error handling. For purposes of this document, and in
the attempt to minimize confusion, five scenarios are presented with the issue being raised and the standard that
should be followed when dealing with each. The scenarios are:
If the task within the workflow fails, the workflow will show a status of ‘Succeeded’ and the task will show a status
of ‘Failed’. The ‘Successful’ status by the workflow is misleading as it indicates that the workflow was successful
in executing, NOT THAT THE TASK WITHIN WAS SUCCESSFUL IN RUNNING! This presents a major
problem with a scheduling tool as the workflow’s status is returned as ‘Successful’, possibly causing the error to be
missed, especially if other error handling is not performed in the task (i.e. post-session e-mail notification, etc.).
If either or both tasks within the workflow fail, the workflow will show a status of ‘Succeeded’ and the task/s will
show a status of ‘Failed’. Again, the ‘Successful’ status by the workflow is misleading as it indicates that the
workflow was successful in executing, NOT THAT THE TASKS WITHIN WERE SUCCESSFUL IN RUNNING!
This presents a major problem with a scheduling tool as the workflow’s status is returned as ‘Successful’, possibly
causing the error to be missed, especially if other error handling is not performed in the tasks (i.e. post-session e-
mail notification, etc.).
2
Scenario 3: Workflow containing sequential session tasks
The below picture depicts a workflow containing sequential session tasks. Note that the sessions do not have any of
the properties checked under the ‘General’ tab for error handling, nor is there any error handling in the Connector
between the sequential session tasks.
If either or both tasks within the workflow fail, the workflow will show a status of ‘Succeeded’ and the task/s will
show a status of ‘Failed’. Additionally, if the first session task were to fail without the error handling in the
connector, the second session task would run, once the first session completed unsuccessfully. In this instance,
there are two problems: one, the workflow returns a status of ‘Succeeded’ while a session task within is
unsuccessful; and two, the second session task should not begin to run if the first of the sequential tasks fail. Again,
the ‘Successful’ status by the workflow is misleading as it indicates that the workflow was successful in executing.
This again presents a major problem with a scheduling tool as the workflow’s status is returned as ‘Successful’,
possibly causing the error to be missed, especially if other error handling is not performed in the tasks (i.e. post-
session e-mail notification, etc.).
3
2. Part one of the solution ensures that the workflow’s status is returned correctly. However, it does not
prevent the second of the sequential session tasks from running (if the first one failed in the sequence). In
order to prevent the second and subsequent tasks from running once the first has failed (in this example), an
expression needs to be added to the connector between the tasks which passes a status and only allows the
next session task to start if the previous succeeded. The expression can be entered by double-clicking on
the connector ($PrevTaskStatus = SUCCEEDED is shown below (left)). The picture to the right shows the
workflow with the expression in the connector between the sequential session tasks.
With this scenario, if any tasks fail within the worklet, the worklet will show a status of ‘Succeeded’ (as it is the
parent of the tasks within it). Moreover, if the worklets both succeed, the overall workflow (parent of the worklets)
will succeed (even though tasks within worklets have failed!). Additionally, even if all the session tasks within the
4
worklets have the box checked ‘Fail parent if this task fails’ and the worklets themselves do not have this box
checked, the overall workflow will still report a status of ‘Succeeded’ since the worklet did not force the parent to
fail.