Custom Business Rules


 

Custom Business Rules is a feature provided in SapphireIMS to automate actions when the state transition of a Service Desk record happens. Rules can be defined and triggered when the state change happens. Common uses of Custom Business Rules are checking or updating an asset record in CMDB based on a service desk record state change, performing updates or creating new service desk records based on values in the current record, invoking external API to fetch data or send data from a Service Desk record, generating a Form and attaching it to the record etc.

The actions are of two types and will always take place during the state movement.

The above-mentioned actions will be taken on submission of the service desk record. The project manager can create a rule and the selected class will be triggered for the selected roles. These actions are defined as Java classes. SapphireIMS is shipped with some pre-defined classes which correspond to commonly used automation. A dynamic invoker class is also provided which can invoke a user defined class.

Note.gifNote: Writing your own classes requires technical knowledge and it is advisable to contact SapphireIMS Support for any automation requirements beyond what is available.

An example of automation using Custom Business Rules is as follows. In a Service Request workflow defined for allocation of an asset to a user, one of the conditions to be checked before allocation is the availability of the asset. The workflow can be so defined such that after the record is submitted and before it moves to the next state which could be a 'Waiting for Approval' state, a pre-action could be called which checks the availability of the asset in CMDB and only allows the state to be moved if the asset is available else it could prompt that stock is not available.

 

Note: If ‘Enable on Update’ is checked, Pre/Post action updates occur when either Update button is clicked (Service desk record) or when the state changes as mentioned in ‘Consider Current State’

SD-Settings-CBRList.jpg

SD-Settings-CBRAdd.jpg

Serial  

No

Field Name

Description

      1

Name

Enter the custom business rule name.

      2

Description

Enter the description of the custom business rule.

      3

Service

Select the services for which the rule is applicable.

      4

Sub Category

Select the sub categories for which the rule is applicable.

      5

Consider Derived Fields

 

Derived Field1/2/3

Check this box to select the derived fields.

 

 

Select the derived fields for the custom business rule.

      6

Group

Select one or more groups to whom the mail needs to be sent.

      7

State

Select the states applicable for the rule. The pre/post action is triggered on movement to the states selected here.

       8

Enable on Update

Check to enable the action on updates to the record.

       9

Consider Current State

Select states on change of which, pre or post action updates have to take place

      10

Launching Order

Enter the order in which the action must be executed. If the order is 2, then the pre or post action is executed after the first pre or post action.

      11

Action Type

Select Pre or Post Action. Pre action means the business rule is executed before the state change and post action means the business rule is executed after the state change.

      12

Class Name

There are some pre-shipped classes provided which contain business rules. Select a class which contains the business rule. Class files are compiled Java code which contain the business logic. You can create your own class for creating custom rules.

The class files have a .class extension and are located in the following path

<SapphireIMS Install Path>\ SapphireIMS\WebManagement\standalone\deployments\SapphireIMS.war\WEB-INF\classes\sapphire\actions

      13

Property File Name

Select the property file name, which is a file that contains the configurable parameters used by the class. The property file has a .properties filename extension. Property files are located in the following path

<SapphireIMS Install Path>\ SapphireIMS\WebManagement\standalone\deployments\SapphireIMS.war\WEB-INF\classes\sapphire\actions