51 views

Description

The SLA percentage timer activity will not pause if started before an upgrade to London and if paused after the upgrade. This will cause notifications to be sent out even though the SLA is paused.

 

Steps to Reproduce

1 - In a Kingston or earlier instance create an SLA definition as follows:
  - Name: SLA pause issue
  - Short description: blank
  - Table: incident
  - Start condition: active is true
  - Pause condition: short description contains "pause"
  - Duration: 10 days
  - Schedule source: no schedule

2 - Create a new incident so that the SLA set in step 1 gets attached.

3 - Check the sys_trigger table and verify the WFTimer record has been created for the 50% notification.

4 - Upgrade the instance to London.

5 - Open the incident created in step 2.

6 - Change the short description to contain "pause".

7 - Check the sys_trigger table and verify the WFTimer record still exists. It should have been deleted.

8 - Find in the instance logs the following message:

Default-thread-3 6D44E321E50023004E829313F5A4D4A4 txid=c16140f1e580 *** Script: WARNING, trigger record not found for: undefined

Workaround

This issue is due to a change in naming of the WFTimer records. The workaround until the fix will become available consists in editing the Workflow Activity - Timer definition as follows:

 

1) Change the onPause() method definition to:

   onPause: function() {
      this.debug('Timer paused: ' + this._now);
      var pauseDateTime = this._now;
      var timerStartTime = this._calcTimerStartTime(pauseDateTime);
      
      // save for resume
      this._saveTimeLeft(timerStartTime); // store time remaining, (in schedule, if we have one)
      
      // cancel this timer so the schedule (trigger) item is no longer valid
      var s = new Schedule();
      s.setDocument(activity);
      s.setLabel(this._getLabel());
      s.cancel();
      s = new Schedule();
      s.setDocument(activity);
      s.setLabel("WFTimer"+activity.sys_id);
      s.cancel();
      this._saveEndTime();  // blank the end time
   },

 

2) Change the onCancel() function definition to:

   onCancel: function() {
      var s = new Schedule();
      s.setDocument(activity);
      s.setLabel(this._getLabel());
      s.cancel();
      s = new Schedule();
      s.setDocument(activity);
      s.setLabel("WFTimer"+activity.sys_id);
      s.cancel();
      this.debug('Timer cancelled');
      activity.state = 'cancelled';
      activity.result = 'cancelled';
   },
 
 
3) Remove the generated record from the custom update set so that the upcoming official fix for this problem will be applied to the activity definition.


Related Problem: PRB1300163

Seen In

There is no data to report.

Intended Fix Version

London Patch 2
Madrid

Fixed In

London Patch 1 Hot Fix 2

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-12 01:29:26
Published:2018-09-12