Workflow Soluiton

 View Only

Practical Uses - Exception Trigger Component 

Oct 08, 2008 11:06 AM

This component detects an exception in the workflow process and triggers a path to handle the exception. The Exception Trigger component has no input paths and only one output path. It has no input path because it is triggered by an exception.

Kinds of Exception Triggers

There are four different kinds of exception triggers. In the examples, examples are given for only the General Exception Trigger and Exception Trigger by Component.

Name Description
General Exception Trigger This component handles any exception that occurs in a model. Only one General Exception Trigger component may be used per model.
Exception Trigger by Component This component handles exceptions from only one component in a model. You can specify which component the Exception Trigger watches for exceptions.
Exception Trigger by Components This component handles exceptions from only a certain group of components in a model. You can specify which components the Exception Trigger watches for exceptions.
Exception Trigger by Execution Type This component handles exceptions only of a certain type. You can specify which kind of exception the trigger should handle. For example, you can set this component to handle "ValueNotFound" or "DivideByZero" exceptions.

Examples

  • General Exception Trigger

    A General Exception Trigger component is put in a model to catch any exceptions in that model.

  • Exception Trigger by Component

    An Exception Trigger by Component is connected to a form to handle any exceptions coming from the form.

General exception trigger

A time off request process contains two Dialog Workflow components - one that receives the request from an employee, and one that presents the request to a manager for approval.

A general exception trigger watches the entire model for exceptions, and routes the process to the end component if they occur.

Here's what the process looks like:

When the General Exception Trigger component detects an exception anywhere in the process, it routes the process immediately to the end. In other configurations, the component may route the process into an exception-handling process instead of routing to the end component.

Exception trigger by component

A process contains a Webform for users to submit questions and comments. The data from this form is then saved in a database for later use.

Two Exception Trigger by Components components are included in the process. One watches the form and handles exceptions in a certain way. The other watches the database component, and handles exceptions in a different way.

Here's what the process looks like:

The first trigger component routes exceptions from the "Questions/Comments" form into an error message. The second trigger component routes exceptions from the database storage directly into the end component.

Each trigger component is set to watch a specific component. This is set in the trigger component's editor (double-click on the component to open its editor).

Here's what the editor looks like from the first trigger component:

In this example, all the settings are set to default values except the target component. "Questions/Comments" is the target component.

Extra Notes

When using an Exception Trigger, you can inadvertently introduce a continuous loop into your process. The general Exception Trigger component is especially prone to this. For example, you have a general Exception Trigger component set to send an email to a network administrator in case of process failure. The Exception Trigger is invoked, but the email server is down, so the Send Email component fails and another exception is invoked. This creates a tight loop that drags the server down until you can abort the process.

To avoid introducing a continuous loop, you can use a Trigger Exception by Component component on the component that you believe could introduce a continuous loop, and redirect the workflow from there. Using the email example from above, set a Trigger Exception by Component component to watch the Send Email component. If the email fails, set the trigger to send the workflow to the end, or to another form of notification (such as an SMS message or text message). You can also circumvent the problem area in the process by using a GoToComponentByName component to redirect the workflow to another component in the process.

The GoToComponentByName component restarts the process on a specific component. The GoToComponentByName component uses the user-specified name (the name displayed on the component icon) of other components to know where to restart the process.

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
pdf file
Exception Trigger.pdf   190 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.