Exception Rule
What does it do?
The Exception Rule allows you to add custom exception code to the process, line or activity.
How is it used?
K2 provides exception management within a process. If required, exceptions can be incorporated within the process Start and Finish rules, or created for Line rules and Activities.

The exception icon can be found in the following locations:

Select the Exception Rule icon on the left. The Exception Rule is not a required feature. If no Exception Rules are configured, no exception management is performed and the process continues as per normal.
Field | Description | Sample Value |
---|---|---|
Enable exception rule | Enabling this option allows the process creator to add custom exception code to the process, line or activity | Click on the Check box, then click on the View Code button to load the exception code editing screen. Insert the required exception code within the process exception class (see below) |
Log exception to the server | Enabling this option adds the execution of an exception to the K2 Server log | Click on the Check Box |
Log exception to the error log | Enabling this option adds the execution of an exception to the error log | Click on the Check Box |
- Log exception to the server: The HostServerErrorLog can be found in the Bin of the K2HostServer.
- Log exception to the error log: The Error Log can be found in the following location in Workspace, Server>Workflow Server>Error Logs>All

Clicking on the ellipsis button will load the process exception class code file.
Insert the custom exception code within the file and save it.