Stopping a Workflow Process Instance with a Script

You can use the _StopInstance method in a script to stop a Workflow Process instance. For example, assume you must stop an instance of an interactive Workflow Process that the user paused or that is suspended on a wait step. In this situation, Siebel CRM cannot determine the Process Instance Id from the script. You must know the Process Instance Id in order to use the _StopInstance method.

To stop a Workflow Process instance with a script

  • Call the _StopInstance method on the Workflow Process Manager business service.

    The following example hard codes the Process Instance Id:

    var bs_WF = TheApplication().GetService("Workflow Process Manager");
    var ps_inputs = TheApplication().NewPropertySet();
    var ps_outputs = TheApplication().NewPropertySet();
    ps_inputs.SetProperty("ProcessInstanceId", "1-IIT");
    bs_WF.InvokeMethod("_StopInstance" , ps_inputs, ps_outputs);