Please enable JavaScript to view this site.

InterFormNG2 Manual

This advanced other workflow component, Error handler, sets which workflow to call if an error should occur during processing.

 

This is similar to the On error workflow on the workflow inputs. An alternative or addition is the general error report email option for the whole tenant.

 

The error handler workflow component selects which workflow to call in case of an error. It works for the workflow sub-tree starting with this component - until another error handler is found. An error handler overrules the optional On error workflow, that can be setup on the workflow input.

 

Here is an example of how to move files to an error folder, if an error occurred. You can also use an error handler in the main workflow in that.

 

The error handler has this parameter:

 

NG2WorkflowErrorHandler0001

 

On error workflow

Here you select (via a drop down list) the other workflow, that is to be called from now on, if an error should occur.

The other workflow must be created first, and the other workflow need to have the input type, From other workflow in order to be listed here.

 

 

Hints for usage

Here are a couple of hints of how you can make full use of error workflows:

 

Keep the initial payload for the error workflow

An error workflow can be triggered at any stage in the main workflow so the payload may have been changed from the original input file e.g. into a PDF or PCL payload. If you want to make it possible for the error workflow to be able to 'see' the original input file, then you should consider to add the component, Payload to named property in the main workflow before any error might occur and then in the error workflow use the component, Named property to payload to copy the original payload back into the payload in the error workflow.

 

 

Find out which workflow ran when the error occurred

You might want to know the name of the workflow that ran when the error occurred - in the error workflow. That information is not directly available, but you can setup your workflows to make this known. An important part of this is the predefined variable, interform.workflow.name. This variable always contains the name of the workflow, that is currently running. Unfortunately the value of this variable also changes to the name of the error workflow, then an error triggers it. So you need yourself to make sure to save the name of the original workflow before the error can occur. You can do that e.g. if you define your own variable and copy the value of interform.workflow.name into it in the main workflow. Then you can retrieve the name of the original workflow in the error workflow by using your own variable.

 

So here you could add this workflow component in the main workflow:

 

NG2ErrorHandler0002

 

And then refer to the variable, OriginalWorkflow in the error workflow.