Skip to main content

Posts

Showing posts with the label workflow

ServiceNow Workflows: Give a workflow a nudge from business rule

 ServiceNow Workflows: Give a workflow a nudge from business rule This is an example of how to "nudge" a workflow to ensure a wait for condition is re-evaluated (e.g. scripted wait for with a GlideRecord) as an alternative to broadcast event to workflow where you want to steer clear of events // Give the workflow a nudge to re-evaluate its Wait for condition var req = new GlideRecord ( 'task' ); if ( req . get ( current . parent )) { var wf = new global . Workflow (). getRunningFlows ( req ); while ( wf . next ()) { new global . Workflow (). broadcastEvent ( wf . sys_id , 'update' ); } }

ServiceNow Generate Catalog Tasks in Pending State

 ServiceNow Generate Catalog Tasks in Pending State (classic workflow) this can be achieved by using an Generate activities block, in this screenshot example the 2nd task will remain pending until the first task is closed

ServiceNow Where Is Workflow Max Activity Count Defined?

 ServiceNow Where Is Workflow Max Activity Count Defined? under workflow properties> activities

ServiceNow 3-strike rule on RITM (auto-close Service Request in awaiting customer)

ServiceNow 3-strike rule on RITM (auto-close Service Request in awaiting customer) (ordinarily for incident Flow Designer might be used) alas, on New York version this is not possible, and below is a business rule + scheduled job option to avoid having to update all the RITM workflows (though a second workflow to attach to the RITM could be an alternative option) in this particular solution, the customer carried out work at the RITM level as catalog tasks were not yet being used by the fulfilment teams Code assumes a custom field  u_closure_code  is used on the RITM table 3-strike rule for RITMs Contents How it works Build New fields Business rules Event registry ACLs Scheduled job Notification How to test Scheduled job script   How it works   ·        When an RITM is placed in state= on hold and on hold reason= awaiting caller , a business rule will populate a new field:     This field will not be edit...