Siebel Business Process Designer Administration Guide > For Developers: Understanding How Workflow Processes Are Designed > Invoking Workflow Processes >

Example: Invoking a Workflow from a Script in Object Manager

The following is a sample script that invokes a workflow process called My Account Process. In this example, the process is invoked in the object manager.

// Example: Invoking a Workflow Process via scripting
function Invoke_Process()
var svc = TheApplication().GetService("Workflow Process Manager");
var Input = TheApplication().NewPropertySet();
var Output = TheApplication().NewPropertySet();
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Account");
var rowId = bc.GetFieldValue("Id");

Input.SetProperty("ProcessName", "My Account Process");
Input.SetProperty("Object Id", rowId);

svc.InvokeMethod("RunProcess", Input, Output);

Siebel Business Process Designer Administration Guide