Raise intermediate event error

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Business Rules > Business Rules examples > Cases and activities >

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.

 

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. Thus, the data in the current activity will not be persisted in the database and the On Exit rules will not be executed.

 

raise_error_6

 

When the error is raised, a log file will be created.

 

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.


Last Updated 2/9/2022 3:20:38 PM