Issue
Issue:
- "Input argument to Workflow Script API is not a GlideRecord. Creating default current." Error Message displays in syslog table
- This error message usually occurs after an instance clone
More Detailed Error Message:
Input argument to Workflow Script API is not a GlideRecord. Creating default current.
com.glideapp.workflow.WorkflowScriptAPI.getGlideRecord(WorkflowScriptAPI.java:435)
com.glideapp.workflow.WorkflowScriptAPI.getGlideRecord(WorkflowScriptAPI.java:428)
com.glideapp.workflow.WorkflowScriptAPI.jsFunction_fireEvent(WorkflowScriptAPI.java:173)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Reason:
- After a clone (e.g. from Production to Development instance) all the sys_trigger WFTimer records that have been scheduled, will be transferred to the target instance
- Check to see if they've excluded all their workflow tables during the clone.
- https://<instance_name>.service-now.com/clone_data_exclude_list.do?sysparm_query=GOTOnameLIKEwf
- If the wf_context table is excluded during a clone, then when the sys_trigger WFTimer records get transferred, they will try and execute, however, there will not be a related wf_context record
- This then causes this error to display
Solution:
- This error can effectively be ignored if seen after a recent clone
- Once all the cloned WFTimers have finished their execution, the error will no longer occur
OR
- If an immediate solution is needed / this is impacting in some way, you can re-clone the instance.
- However, ensure that the Workflow tables are not in the 'clone_data_exclude' table before submitting the re-clone