Exception Handling in Nintex

What will you do if your workflow flops in the middle of your BPM process?  The only possible way is to terminate the workflow.

In Nintex Workflows, there are some actions that Nintex provides, that have built in Error Handling capabilities such as Call Web Service, Execute SQL, Query BDC, Query Excel Services, Query LDAP, Query XML, etc.,

In these actions where if an error occurs, we can capture it and cleverly design our workflow so that the workflow doesn’t just fail.

For example, I am going to show a simple workflow that has a Query LDAP action. If the Query LDAP fails, then the workflow would throw and example and you would see the error in the workflow history. Again, you’d need to terminate the workflow, resolve the issue and start it the workflow again from the beginning.

Enable error handling:

To enable this we need a workflow variable of type Text (“ErrorMessage”). This is where the error will be stored when (if) it is caught.

Now, in Query LDAP action, we scroll down to the very bottom, and click on the “Error Handling” section to expand it.

For the first field “Capture Errors”, we set it “Yes”. This turns error handling on.

For the third field “Store error text in”, we set it to our text variable. If an error occurs, then the text variable will contain the error message that is caught.

What should we do with it (ErrorMessage variable)?

The first thing to do is use a Set a Condition action. Here we need to check if our text variable contains any data. If it doesn’t, the action completely successfully. If it contains data, then we need to perform some business logic to handle the error.

This is a simple example of how we can perform error handling and continue workflow processing.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.