The CreatorCon Call for Content is officially open! Get started here.

dipak_thakor
ServiceNow Employee
ServiceNow Employee

Introduction

For Lifecycle Events evaluation interval there is a mechanism available to ensure timers within a workflow, are triggered automatically rather than wait for the evaluation interval to trigger.

 

For Activity sets to trigger there are a variety of methods based on different configuration within the ServiceNow Platform:

 

  • Immediately
  • By a date
  • Trigger script (advanced)
  • Conditions (fields from a table)
  • Combination or different trigger types
  • *Other activity sets

Note: For more information on activity set triggering, see Configure a lifecycle event activity set and Lifecycle Events workflows.

 

Understanding evaluation interval default wait time

A good architectural decision is to understand the modification of the evaluation interval default wait time and its impact on Life Cycle Events, modifying the evaluation interval, will trigger activity sets more immediately i.e.  make the activity set trigger condition evaluation faster or immediate so the activities can launch sooner, with the business case being you want them to be action quicker to increase productivity. Note when an activity set is triggered by other activity sets it must wait for all dependencies to resolve before triggering.

 

In the ServiceNow instance the 'Evaluation Interval' on activity sets is set to 4 hours by default. Having these parameters too low will result in the activities being cancelled. One must apply caution if trying to modify the evaluation interval to trigger activity sets more immediately, this is not recommended.

 

ServiceNow recommend way

ServiceNow recommend using a conditional business rule (Condition with Event BR (Demo) activity set) to more immediately trigger an activity set. The new feature was introduced in San Diego, it provides the ability to trigger the activity set once the trigger condition is met (no need to wait for the default 4 hours) - refer to KB1117350

 

Condition with Event BR (Demo) activity set
The Condition with Event BR (Demo) activity set  is included with demo data as an example of what you can use.
This is an optional solution, but you can create and use server-side code (business rule, event script, scheduled job, etc.) that triggers the check_activity_set_trigger event into the HR Activity Set Trigger Check workflow. Any activity set can be triggered using the check_activity_set_trigger event from the server side with the exception of activity sets that are triggered immediately or only by other activity sets.
Note: To access the Condition with Event BR (Demo) activity set, activate the Human Resources Scoped App: Lifecycle Events for Enterprise (com.sn_hr_lifecycle_ent) plugin. This is an optional method that can be used instead of the values in the Evaluation interval field.
  • The trigger type for the activity set must be set to Condition.
  • The Condition with Event BR (Demo) activity set triggers when the state of primary lifecycle event case moves to Work in progress.
  • The Email - Condition with Event BR (Demo) activity is included with the Condition with Event BR (Demo) activity set.
  • The Condition with Event BR (Demo) activity set contains the HR Activity Launcher workflow. It also contains the Condition with Event BR (Demo) business rule.
    • The Condition with Event BR (Demo) business rule runs after the state of an LE case changes to Work in Progress.
    • It then looks for the workflows that are running for the LE case until it finds the HR Activity Set Trigger Check workflow and broadcasts the check_activity_set_trigger event to that workflow.
  • You can modify the Condition with Event BR (Demo) activity set, Email - Condition with Event BR (Demo) activity, and Condition with Event BR (Demo) business rule to fit your requirements.