Download Video Tutorial of How to Enable logs for Siebel Dedicated Client | Next Tip »?

Recent Posts

Recent Comment


How To invoke a Siebel Business Service

By neel | January 25, 2008

In this post I will elaborate how we can invoke a business service in various ways. But first just an overview of what business service is.

Business Service (BS): Is a place where you write to code to implement business rules and process.

We can also write the code at BusComp and Applet level but that makes our code and business logic to be

Siebel Business service has a slight more overhead than the code at Applet or BusComp level but it helps us to make our code

 So general rule of thumb to select where to write the code is

If same business rules are applicable on more than one entity then we write a generalized code at BS level.

You can create business services in

Siebel Tools: Code change is SRF dependent.
Siebel Client: Code change is SRF independent.

You can read more on both kinds of business services in the following post.

We can invoke a business Service through

  1. Runtime Events
  2. eScript
  3. User Property

To call a business service through runtime events

Enter the following information in the Action Set that you are creating

Business Service: Business Service Name
Business Service Method: Method Name
Business Service Context: “Input Argument”, “Value”

And based on the Event that you choose this business service will be invoked

You can use the following Code to invoke a business service from escript

var svc = TheApplication().GetService(”BS Name”);
var Input = TheApplication().NewPropertySet();
var Output = TheApplication().NewPropertySet();
Input.SetProperty(”Type”,this.GetFieldValue(”Status”)); // Input Agruments
svc.InvokeMethod(”BSMethod”, Input, Output);

You can use named method property to invoke a business service from BC but this method is rarely used as it including complex conditions in the User property might not be possible. But it can come quite handy if you just want to invoke BS based on simple conditions

Name: Named Method 1
Value: “New Record”, “INVOKESVC”, “BS Name”, “BS Method”, “‘Input Agrument’”, “Value”, “‘Input Argument 2’”, “Value”

To see details of this user property read the following post


OkAvarageGoodVery GoodExcellent (No Ratings Yet)
Loading ... Loading ...

Related Posts

Categories: How - To |

12 Responses to “How To invoke a Siebel Business Service”

  1. Vasan MonsterID Icon Vasan Says:
    January 25th, 2008 at 6:10 am

    Hi

    You can also use the Workflow process to invoke a business service as per the usage.

  2. siva MonsterID Icon siva Says:
    January 27th, 2008 at 11:49 am

    Hi ple give me more information about Business services i need step by step with example… It’s U have possible ple do help….

    Thanks
    Siva

  3. neel MonsterID Icon neel Says:
    January 28th, 2008 at 5:25 am
    I am not sure what you mean by more information. If you can tell me what exactly you need, I might be able to help you out.
  4. neel MonsterID Icon neel Says:
    January 28th, 2008 at 5:25 am
    Hi Vasan,

    Thanks for pointing that out.. I missed that one.. will include it :)

  5. siva MonsterID Icon siva Says:
    February 1st, 2008 at 6:23 am

    Hi Neel can U tell What type of input and output arguments can take in Business services… in which input and out put arguments are avaliable..ple help me

  6. neel MonsterID Icon neel Says:
    February 1st, 2008 at 8:26 am
    you can only pass propertyset in business service.

    if you want to pass any other value then you have to set it as property.

    Will soon write a post explaining the process of calling BS from script

  7. Soj MonsterID Icon Soj Says:
    February 12th, 2008 at 5:06 am

    Believe we can even use RCR to invoke a Business service.

    However Neel,dint understood,what did you mean by enitiy mentioned in your thumb rule which seems to be an criteria to implement a business service. Plz elaborate on this.

    and if a person,would like to start off from the basic of scripts,what would you advice.

    Thanks in advance
    Soj

  8. rahul MonsterID Icon rahul Says:
    April 15th, 2008 at 2:07 am

    Hi,
    I have seen example of invoking a BS, but cant seem to find any example which gives step by step procedure to write a small BS, and then invoke it from eScript.

    i have a BS to sum two numbers, how do i access the two arguments inside the BS which are passed to it ?

  9. neel MonsterID Icon neel Says:
    April 15th, 2008 at 8:47 pm
    Have you gone through the following post..

    http://siebelunleashed.com/business-service-and-input-arguments/

    I believe this should put you on its way… I will still put a step by step post to invoke a business service through escript

  10. Ann MonsterID Icon Ann Says:
    May 13th, 2008 at 1:38 pm

    How to invoke a business service with a method which doesnt have any arguments(thru script)?

    for eg:

    var svc = TheApplication().GetService(”BS Name”);
    var Input = TheApplication().NewPropertySet();
    var Output = TheApplication().NewPropertySet();
    Input.SetProperty(”Type”,this.GetFieldValue(”Status”)); // Input Agruments
    svc.InvokeMethod(”BSMethod”, Input, Output);

    here we are passing input and out put args rt? what if if u dont have any arguments in the BS method?

  11. neel MonsterID Icon neel Says:
    May 14th, 2008 at 7:46 am
    you have to pass these propertyset.. this is the syntax to call to the BS in siebel but it doesn’t mean that you are passing input arguments.

    taking your example

    var svc = TheApplication().GetService(”BS Name”);
    var Input = TheApplication().NewPropertySet();
    var Output = TheApplication().NewPropertySet();
    //Input.SetProperty(”Type”,this.GetFieldValue(”Status”)); // Input Agruments
    svc.InvokeMethod(”BSMethod”, Input, Output);

    commenting the setproperty line will result in calling business service without any input arguments.

  12. Paul MonsterID Icon Paul Says:
    July 9th, 2008 at 12:27 pm

    Actually you do not need to pass a property set if you are using Script Assist in 8.0

    var svc = TheApplication().GetService(”BS Name”);
    var status = svc.(”Type”, this.GetFieldValue(”Status”));

    By typing svc. will give you a dropdown of all the functions available in the BusSrv you are calling.

Comments