I currently use the following scripts to start a workflow.. But its seems that the workflow executes asynchronously in another thread . How I can use script to execute a workflow synchronously which has the same effect when I use "Workflow Element" to call a workflow?
var workflowToExecute = System.getModule("com.vmware.library.workflow").getWorkflowById(workflowId); var objProperties = new Properties(); objProperties.put("paramter", parameterObject); var objWorkflowToken= workflowToExecute.execute(objProperties);