Raise intermediate event error

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples >

Raise intermediate event error

Overview

You can interrupt an AUTOMATIC activity when an error is encountered, and manage the error following whatever path you consider. To interrupt an activity you must attach an error event in the activity, and convert the activity to an automatic one.

 

raise_error_1

To raise the error just use following function, this will interrupt the current activity and deviate the normal path towards the error path. This function will add an error log file in the project folder.

 

CHelper.RaiseErrorIntermediateEvent(String message) ;

 

The following attributes are needed:

message: A tag to identify the error in the log file.

 

 

Example:

 

Consider the following process, where an error is raised if the request boolean is false.

 

raise_error_2

 

Set the function into an "On Exit" expression in the activity you want to interrupt.

 

raise_error_3

 

 

raise_error_4

 

Then, the path of the process will follow the error's path.

 

raise_error_6

 

When the error is raised, a log file will be created within the project folder, showing the error details.

 

raise_error_5

 

note_pin

Consider the following:

External interfaces must be compensated adequately when these interfaces have been implemented within a Process, to perform modifications on data external to Bizagi through Web Services or component library. Activities that perform reversal for multiple cases must be avoided because the Activity does not know which Activities were completed successfully and which ones must be reversed.