Name

global.AJAXSetProgressStatus

Description

Set child execution tracker state as fail

Script

var AJAXSetProgressStatus = Class.create();
AJAXSetProgressStatus.prototype = Object.extendsObject(AbstractAjaxProcessor, {
  
  setProgressStatus: function() {
      var executionID =  this.getParameter('sysparm_execution_id');
  	var gr = new GlideRecordSecure('sys_execution_tracker');
  	
  	gr.addQuery('parent', executionID);
  	gr.query();

  	while (gr.next()) {
  		if (gr.state == "0") {
  			gr.state = "3";
  			gr.update();
  		}
  	}

  },

  type: 'AJAXSetProgressStatus'
});

Sys ID

4312b3e30b13120004c1c71437673a6e

Offical Documentation

Official Docs: