Siebel Field Service Guide > Business Service Methods Reference for Field Service > Scheduling >

Invoking the ABS and Optimization Engine Methods

The Appointment Booking System and Optimization Engine can be invoked through script by calling the predefined Server Requests business service and specifying the Appointment Booking Engine or Optimization Engine component. The methods must first be loaded and residing on the server before they can be called. Only the server request broker can determine the correct component that should be called for a given service region. See Siebel Business Process Framework: Workflow Guide for more information about using the Server Requests business service.

The following script is an example of how to call the ABS component with the GetAppointment method.

var SRMSvc, BSWrite, BSRead;

var srmInputs, apptBookInputs, srmOutputs, tempPropSet;

var childPropSet, activePropSet, apptPropSet;

var errCode;

// use Server Request to call the Booking Engine

SRMSvc = TheApplication().GetService("Server Requests");

srmInputs = TheApplication().NewPropertySet();

apptBookInputs = TheApplication().NewPropertySet();

srmOutputs = TheApplication().NewPropertySet();

tempPropSet = TheApplication().NewPropertySet();

srmInputs.SetProperty("Mode", "Sync");

srmInputs.SetProperty("Method", "GetAppointment");

srmInputs.SetProperty("Component", "ApptBook");

apptBookInputs.SetProperty("ActId", "1-93J9");

apptBookInputs.SetProperty("SvcRegnId", "1-1BGD");


SRMSvc.InvokeMethod("SubmitRequest", srmInputs, srmOutputs);

// write out the outputs for debugging

childPropSet = TheApplication().NewPropertySet();

activePropSet = TheApplication().NewPropertySet();

childPropSet = srmOutputs.GetChild(0);

errCode = childPropSet.GetProperty("ErrCode");

if (errCode == "0")


var apptCount = childPropSet.GetChildCount();

apptPropSet = TheApplication().NewPropertySet();

for (var i = 0; i < apptCount; i++)


activePropSet = childPropSet.GetChild(i);



// write out the inputs for debugging

apptPropSet.SetProperty("number of appointments", apptCount);







activePropSet = null;

tempPropSet = null;

childPropSet = null;

SRMSvc = null;

BSWrite = null;

BSRead = null;

srmInputs = null;

apptBookInputs = null;

srmOutputs = null;

Siebel Field Service Guide Copyright © 2007, Oracle. All rights reserved.