Search This Blog

Feb 7, 2012

How to invoke a Siebel Business Service

Business Service (BS): Is a place where you write to code to implement business rules and process.
We can also write the code at Bus Comp and Applet level but that makes our code and business logic to be
           • Distributed
           • Difficult to manage
           • Cannot be reused
Siebel Business service has a slight more overhead than the code at Applet or Bus Comp level but it helps us to make our code
            • Centralized
            • Easier to manage
            • Can be reused
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
4.    Runtime Events

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


• eScript
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);


•    User Property
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”

No comments:

Siebel IP 2017 - Web Tool Development Steps

Siebel IP 2017 Development and Deployment Steps : 1. Click on the Workspace Icon in Siebel Web Tools application. 2. Create a New work s...