Siebel Business Process Designer Administration Guide > Passing Parameters to and from Workflow and Data Manipulation within Workflows > Passing Parameters from a Business Service to a Workflow >

Example Scripts for Passing Parameters


The examples in this section show script that you can use to pass parameters.

Example 1: Invoking Workflow Programmatically and Constructing an Input Property Set

The following is a sample script which programmatically invokes the Workflow Process Manager business service and which constructs an input property set, psInputs, for the business service. This script defines strings that will be put into the input property set as properties.

var msgName = "Siebel Agent Authorization Retrieval";

var reqSubType = "CICS Services Request";

var reqType = "AgentAuthorizationReq";

var CICSServiceName = "Consumer Auto Agent Authorization Retrieval";

var processName = "Consumer Auto VBC VBC Template";

var reqFileName = "C:\\sea752\\XMLMessages\\AgentAuthorizationVBCReq-final.xml"

var resFileName = "C:\\sea752\\XMLMessages\\AgentAuthorizationVBCResponse-final.xml"

Example 2: Defining Property Sets for the Input Property Set

The following is a sample script that defines property sets, which will be put into the input property set as child property sets.

//Request PS

var psRequest = app.NewPropertySet();

var psAgentNumTag = app.NewPropertySet();

var psType = app.NewPropertySet();

var sAgentID;

Example 3: Constructing Property Sets

The following is a sample script that constructs property sets.

//Build property set hierarchy

sAgentID = app.LoginName();

psRequest.SetType("XMLHierarchy");

psAgentNumTag.SetType("DataAgentNumber");

psAgentNumTag.SetValue(sAgentID);

psRequest.AddChild(psAgentNumTag);

Example 4: Assembling Properties and Child Property Sets into the Input Property Set

The following is a sample script that assembles properties and child property sets into the input property set.

psInputs.AddChild(psRequest); //Pass in Property Set

psInputs.SetProperty("RequestURLTemplate", requestURLTemplate); //Pass in string

psInputs.SetProperty("RequestSubType", reqSubType);

psInputs.SetProperty("ReqType", reqType);

psInputs.SetProperty("MessageName", msgName);

psInputs.SetProperty("CICSServiceName", CICSServiceName);

psInputs.SetProperty("ProcessName", processName);

psInputs.SetProperty("Request File Name", reqFileName);

psInputs.SetProperty("Response File Name", resFileName);

Example 5: Invoking the Workflow Process Manager Business Service and Passing It the Input Property Set

The following is a sample script that invokes the Workflow Process Manager business service and passes it the input property set.

var svc = TheApplication(). GetService("Workflow Process Manager");

svc.InvokeMethod("RunProcess", psInputs, psOutputs); //Call the Workflow

var sErr = psOutputs.GetProperty("sErr"); //Check the Workflow status


 Siebel Business Process Designer Administration Guide 
 Published: 29 May 2003