Workflow not triggering scoped script

Chris45
ServiceNow Employee
ServiceNow Employee

workflow not triggering scoped script with empty scratchpad after checking out WF, and same error after publishing WF, though previous run works. it looks like scoped script(non Global) IaCloneRollbackWf is not recognized by the WF, error message is not quite helpful, how to troubleshoot such case? any backend log available

 

Run script activity: 

IaCloneRollbackWf.script.preflightCheck();
 

error message as below

org.mozilla.javascript.WrappedException: Wrapped TypeError: Cannot read property "script" from undefined (preflightCheck - advanced script; line 1) (<refname>; line 48)

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Chris45
ServiceNow Employee
ServiceNow Employee

NW, found cause with background script testing, script calls a global script without prefix, it'd be much easier if  WF error msg is clearer

View solution in original post

9 REPLIES 9

line number in error message is not helpful.  the only line in activity is to call scoped script

Chris45
ServiceNow Employee
ServiceNow Employee

Cannot read property "script" from undefined - means it treats IaCloneRollbackWf as undefined, but it's there and worked before

@Chris45 

so what's that? IaCloneRollbackWf 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

IaCloneRollbackWf  is script name

Chris45
ServiceNow Employee
ServiceNow Employee

NW, found cause with background script testing, script calls a global script without prefix, it'd be much easier if  WF error msg is clearer