DxSherpa - D

Simple Vs Default SLA condition Rules

Simple Vs Default SLA condition Rules

This blog is intended to showcase the behavior of SLA definition based on their SLA condition rules. It will be helpful to understand when an SLA should ‘attach’, ‘pause’, ‘complete’, ‘reattach’, or ‘cancel’ and what are all condition checks when determining which actions to process for an SLA.

SLA condition rules :

SLA condition rules combine with SLA definition to determine whether an SLA should attach/pause/complete/reattach/cancel or not.

There are two types of SLA Condition Rules available out-of-the-box.

  • Default
  • Simple

SLA condition rules working:

There is ‘Condition type’ field on SLA definition form which is referenced to the ‘SLA Condition Rules’ table. One can specify either ‘Default or Simple’ to use as per SLA definition basis.

Note: By default, the SLA engine looks up the ‘Default’ SLA condition rule using from system property ‘com.snc.sla.default_conditionclass’.

Simple Vs Default SLA condition Rules

The important thing to remember in this situation is whether the conditions have matched for multiple actions.

For example, the specified conditions have matched for complete and cancel actions of an SLA then SLA will be marked as ‘Completed’ as it is evaluated first due to the order of evaluation for actions performed by SLA engine.

The following table illustrates the order of evaluation for actions and condition checking based on the specified conditions and condition rule:

Actions / Evaluation Order SLA Condition Rules
Default Simple
Attach Start condition matches
AndStop condition does not matchAndCancel condition does not match
Start condition matches
Stop (Completed) Stop condition matches Stop condition matches
Reattach (Reset) Reset condition matches
AndStart  condition matches
Reset condition matches
Cancel Stop condition does not match

And

Start condition does not match

And

Based on the option selected in ‘When to cancel’ condition.

There are three choices available out-of-the-box.

Start conditions are not met Stop condition does not match

and

Start condition does not match

Cancel conditions are met If given, then cancel conditions match
Never Since no condition applies hence SLA cannot cancel.

 

Stop condition does not match

And

Start condition does not match

And

Pause condition does not match

NOTE: The options ‘Never’ and ‘Cancel conditions are met’ can’t be used with the Simple SLA Condition Rule.

By default, the option ‘Start conditions are not met’ selects in ‘When to cancel’ condition.

Pause Pause conditions match

Or

Resume condition does not match

Pause conditions match

NOTE: The options ‘Resume condition matches’ can’t be used with the Simple SLA Condition Rule.

By default, the option ‘Pause condition does not match’ selects in ‘When to resume’ condition.

Resume Pause condition does not match

Or

Resume condition matches

Pause conditions match

NOTE: The options ‘Resume condition matches’ can’t be used with the Simple SLA Condition Rule.

By default, the option ‘Pause condition does not match’ selects in ‘When to resume’ condition.

If out-of-the-box condition rules do not process SLA for anyone of the instance then custom condition class (Script Include) and SLA condition rule record can be created.

In order to test the behavior of condition rules, there are total four SLA definitions created:

  • Default does not fire.
  • Simple fires completed.
  • Default
  • Simple

The conditions are same for SLA definitions ‘Default does not fire’ and ‘Simple fires completed’.

The conditions are same for SLA definitions ‘Default’ and ‘Simple’ as well.

SLA Definition Conditions
Start Pause Stop
Default does not fire

And

Simple fires completed

 

Impact -> is -> 2-Medium

 

Incident state -> is -> On hold Incident state -> is not -> New

Assigned to -> is not empty

Default

And

Simple

 

Impact -> is -> 2-Medium

Description ->is not empty

State -> is one of -> New, In progress

Incident state -> is -> On hold Incident state -> is -> Resolved

Please look into SLA definitions for the reference as below:

Test 1:  Default does not fire VS Simple fires completed:

In this case, SLA based on Default condition type did not attach even though start condition matched. This is because if the record is assigned to someone while creating then after saving, the record state changes from ‘New’ to ‘In Progress’. This is out-of-the-box behavior of the system.

If condition type is ‘Default’ then only start condition should match. Stop and cancel condition should not match however in this case, stop condition also matched. Hence, no action is processed for Default based SLA definition (Default does not fire).

Simple Vs Default SLA condition Rules

In this case, SLA gets attached based on simple condition rule for 0 second. This is because start condition matched and marked as completed & stop conditions also matched at the same time.

Simple Vs Default SLA condition Rules

The specified conditions have matched for actions of SLA as ‘Complete’ for SLA definition which is based on simple condition rule and ‘Cancel’ for SLA definition which is based on Default condition rule.  Afterwards, SLA was marked as complete as it is evaluated with the order of evaluation for actions performed by SLA engine.

Test 2.1: Default vs Simple

In this case, both SLA’s (Default and Simple) are attached at the same time due to the condition and rule fulfilled by both the SLA definitions.

As mentioned in following captured screen, if record is assigned to someone while creating then after saving the record, state changes from ‘New’ to ‘In Progress’ due to out-of-the-box behavior of the system.

Simple Vs Default SLA condition Rules

Simple Vs Default SLA condition Rules

Simple Vs Default SLA condition Rules

Test 2.2: In this case, when state changes from ‘In Progress’ to ‘On hold’, the SLA get cancelled which is based on Default condition rule. Another SLA which was based on Simple condition rule is Paused.

Simple Vs Default SLA condition Rules

The simple condition type SLA will be on Pause stage until the record changes its state.

Simple Vs Default SLA condition Rules

Test 2.3: In this case, again when state changes from ‘On hold’ to ‘In progress’, the new SLA gets attached based on Default condition rule whereas another old SLA which was based on Simple condition rule will be marked as’ In Progress’ from Paused stage.

Simple Vs Default SLA condition Rules

Note: Here the start time is same as previously attached for simple condition rule SLA when Incident state was ‘In progress’ then changed to ‘On hold’ then again ‘In Progress’.

Simple Vs Default SLA condition Rules

As per above information, we have illustrated different behaviors of SLA definitions based on condition rules. One should specify the conditions carefully to avoid the unexpected behavior of SLA.

SLA Definition: Default does not fire:

Simple Vs Default SLA condition Rules

SLA Definition: Fires completed:

Simple Vs Default SLA condition Rules

SLA Definition: Default:

Simple Vs Default SLA condition Rules

SLA Definition: Simple:

Simple Vs Default SLA condition Rules

We are quite sure that this blog must have given a brief idea about Simple Vs Default SLA condition rules in ServiceNow.