Siebel Finance Guide > Business Services for Siebel Financial Services > Invoking the Business Rule Processor >

Using eScript to Invoke the Business Rule Processor


The following is an illustration of how to invoke the BRP using eScript.

Example of Loading the BRP Business Service

This example provides a sample eScript that loads a BRP process definition.

var psIn = TheApplication().NewPropertySet();
var psOut = TheApplication().NewPropertySet();
var bs = TheApplication().GetService("FINS CAP Processor Service");

psIn.SetProperty ("System_ProcessName", "MyBRPProcessName");

bs.InvokeMethod("LoadProcess", psIn, psOut)

Example of Running the BRP Business Service:

This example provides a sample eScript that executes a BRP process definition. The script also shows how to pass an input argument (g_AssetId) to a BRP process.

function WebApplet_PreInvokeMethod (MethodName)
{
if (MethodName == "InvokeMyBRP")
{
var psinputs = TheApplication().NewPropertySet();
var psoutputs = TheApplication().NewPropertySet();
var oBusObj = TheApplication().ActiveBusObject();
var oBusComp = oBusObj.GetBusComp("FINS Group Policy");
var sAssetId = oBusComp.GetFieldValue("Id");

psinputs.SetProperty ("g_AssetId", sAssetId);
psinputs.SetProperty ("System_ProcessName", "MyBRPProcessName");

var obs = TheApplication().GetService("FINS CAP Processor Service");
obs.InvokeMethod ("RunProcess",psinputs, psoutputs);

return (CancelOperation);
}
return (ContinueOperation);
}

Siebel Finance Guide