Share

Invoking Siebel Business Service Using eScript

In previous article we have explored what are Siebel Business Services and what are its components. In this article we will take one more step ahead. Lets find out how to invoke a Business Service.

Siebel Business Service can be invoked using

  • escript
  • Workflow
  • RunTimeEvents
  • From Client

Article # 2 : Invoking a business service using eScript:

To invoke a business service using eScript:

  • Get the instance of the business service 

  • Call any method of that business service using that instance. 

Below is the example, in which first we are getting a runtime instance of the Business Service and then invoking the Business Service Method.

  

Get runtime instance of the Business Service:

var bs_BusServiceInstance = theApplication().GetService(“<Business Service Name>”);

 

Calling Business Service Method:

        bs_BusServiceInstance.InvokeMethod(“<Business Service Method Name>”);

 

Example for reference:

var svc = TheApplication().getService(Business Svc);

var psInputs = TheApplication().NewPropertySet();

var psOutputs = TheApplication().NewPropertySet();

……..

svc.InvokeMethod (“Methods”, psInputs, psOutputs);

 

<<< Previous article in series                                                                                 Next article in series >>>

1 comment on “Invoking Siebel Business Service Using eScript”

  1. Ashish Kr. Bameta Ashish Kr. Bameta Reply

    Example code:

    Function WebApplet_PreCanInvokeMethod(MethodName, &CanInvoke)
    {
    if (MethodName == “btnUpdateStatus”)
    {
    CanInvoke = “TRUE”;
    return (CancelOperation);
    }
    }

    Function WebApplet_PreInvokeMethod(MethodName)
    {
    if (MethodName == “btnUpdateStatus”)
    {
    var oBS = TheApplication().GetService(“Workflow Process Manager”);
    var ipPS = TheApplication().NewPropertySet();
    var opPS = TheApplication().NewPropertySet();

    ipPS.SetProperty(“ProcessName”,”Test WF1″);
    ipPS.SetProperty(“RowId”,this.BusComp().GetFieldValue(“Id”));

    oBS.InvokeMethod(“RunProcess”,ipPS,opPS);
    this.BusComp(“RefreshBusComp”);
    return (CancelOperation);
    }
    }

Leave A Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!