We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

StartFlow in Global Workflow is running synchronously

Swathi Prasad
ServiceNow Employee
var wf =new global.Workflow();
var wfSysId = wf.getWorkflowFromName("myWorkflow");
var wfContextGr = wf.startFlow(
    wfSysId,
    null,
    "myWorkflow", {
            u_instance_name: instanceName
     }
);

 In the above code I get "wfContextGr" only once the workflow ends. Are workflows synchronous? Is there a way to get wfContextGr just after starting the workflow and not wait till the end of the flow?

0 REPLIES 0