Supporting error handling
You can implement error handling in custom workflow actions, in which errors can be captured during the execution of the workflow action and information about the errors stored in workflow variables for later reference.
When error handling is enabled on a custom workflow action, an error that occurs during the execution of the workflow action or its corresponding workflow activity does not stop execution of the workflow. Instead, two workflow variables can be populated by the workflow action when an error occurs:
-
Error occurrence
A Yes/No workflow variable that indicates whether an error occurred while executing the workflow action.
-
Error text
A Multiple lines of text workflow variable that contains the string representation of the error that occurred.
Subsequent workflow actions in the workflow can examine the contents of these workflow variables and, if appropriate, respond to the error information.
To implement error handling in a custom workflow action, you must apply additional Nintex Workflow 2013 export (.nwp) file functionality to the custom workflow activity, the custom workflow action adapter, and the configuration page:
-
Dependency properties and exception handling must be added to the custom workflow activity. For more information, see Implementing error handling in the workflow activity.
-
Configuration support must be added to the AddActivityToWorkflow, GetConfig, and GetDefaultConfig methods of the workflow adapter class derived from the GenericRenderingAction base class. For more information, see Implementing error handling in the workflow adapter.
-
The ErrorHandlingConfig control, from the Nintex.Workflow.ApplicationPages namespace, must be added to the configuration page, to allow users to configure error handling for the custom workflow action. For more information, see Interacting with error handling.
See Also
Concepts
Operations
Working with workflow activities