Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel Field Service Guide > Business Service Methods Reference for Field Service > Scheduling > Invoking the ABS and Optimization Engine MethodsThe 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 the Siebel Business Process Designer Administration 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 srmInputs, apptBookInputs, srmOutputs, tempPropSet; var childPropSet, activePropSet, apptPropSet; // 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"); srmInputs.AddChild(apptBookInputs); 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"); var apptCount = childPropSet.GetChildCount(); apptPropSet = TheApplication().NewPropertySet(); for (var i = 0; i < apptCount; i++) activePropSet = childPropSet.GetChild(i); apptPropSet.AddChild(activePropSet); // write out the inputs for debugging apptPropSet.SetProperty("number of appointments", apptCount); apptPropSet.SetType("addedPropSet"); |
![]() |
![]() ![]() |
Siebel Field Service Guide |