Saturday 10 May 2014

How to call a Business Service

We can invoke a business Service through
1.       Runtime Events
2.       eScript
3.       User Property

·         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
·         Applet browser to BS server script 

var outputPS;   
var bsReject = theApplication().GetService("WHV Reverse Payment Record");
var inputPS = theApplication().NewPropertySet();
inputPS.SetProperty("ACBSeq", nACBSeq);
inputPS.SetProperty("PromoId", sPromoId);
inputPS.SetProperty("BillingNumber", nBillingDoc);
outputPS = bsReject.InvokeMethod("RejectPayment", inputPS); */

·         Applet Server to BS server script 

bs = oAppObj.GetService("WHV Get Product Price BS");
Input.SetProperty("AccPromoPriDate", this.BusComp().ParentBusComp().ParentBusComp().GetFieldValue("WHV Account Promotion Pricing Date"));
Input.SetProperty("AccntCOT", this.BusComp().ParentBusComp().ParentBusComp().GetFieldValue("WHV Account COT"));
Input.SetProperty("UserOrganizationId", oAppObj.GetProfileAttr("UserOrganizationId"));
Input.SetProperty("ProductId", this.BusComp().GetFieldValue("Product Id"));
bs.InvokeMethod("WHVProductPrice", 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”

Unlock Repository objects - Siebel

VIEW:-

UPDATE siebel.s_view bc SET bc.obj_locked_flg = 'N', bc.obj_locked_date = NULL, bc.obj_locked_by = null, bc.obj_locked_lang = null

WHERE bc.row_id = '1-A4LQ-DX3R';

commit;

TABLE:-

UPDATE siebel.s_table tab SET tab.obj_locked_flg = 'N', tab.obj_locked_date = null, tab.obj_locked_by = null, tab.obj_locked_lang = null

WHERE tab.name = 'CX_RD_MATRIX' and tab.row_id = '1NQ-5HY';

commit;

BUSCOMP:-

UPDATE siebel.s_buscomp bc SET bc.obj_locked_flg = 'N', bc.obj_locked_date = NULL, bc.obj_locked_by = null, bc.obj_locked_lang = null

WHERE bc.row_id = '1-A4LQ-DX3R';

commit;

BUSSERVICE:-

UPDATE siebel.s_service serv SET serv.obj_locked_flg = 'N', serv.obj_locked_date = NULL, serv.obj_locked_by = null, serv.obj_locked_lang = null

WHERE serv.row_id = '8B-DVG';

commit;

APPLET:-

UPDATE siebel.s_applet appl SET appl.obj_locked_flg = 'N', appl.obj_locked_date = NULL, appl.obj_locked_by = null, appl.obj_locked_lang = null

WHERE appl.row_id = '1-O3D-C3';

commit;

PROJECT:-

UPDATE siebel.s_project  AS proj SET proj.locked_flg = 'N', proj.locked_date = NULL

WHERE proj.name = 'IOM Order Management';

COMMIT