Siebel

Everything you want to know about Siebel !!!

Bundle Product Operations [Interface Perspective]

Product Model has become complex and updating Bundle Products requires it to be locked before updating and Release after upsert operation is complete.
The underlying BusComp Class on Bundle Products takes care of this requirement if updates are done via UI.

What would you do if you have a requirement to update Bundle Products coming from external sources in the background [Non UI Context Update].

Here is a simple solution which can be used:
For those of you who need background on the Data Model used for Product here is a snapshot….
Products are loaded into S_PROD_INT via “Internal Product – ISS Admin” BC. Once Products are released, they are available via “Internal Products” BC.
Bundle Product is a Hierarchical data having a Parent Product [referenced from Internal Product BC] and one or more Child Products [referenced from Internal Product BC but are loaded into "S_ISS_SUB_OBJ" table via "ISS Product Bundle Admin BusComp" BC].

Normally for 1:M relationships, the Parent’s ROW_ID is stored in the foreign key column of the Child Records.
For Products the case is a bit different. The Foreign key column “Object ID” doesn’t store the Parent Product’s ROW_ID. Instead it stores the “VOD Id” [VOD Id refers to the ROW_ID of the latest version record of a given product and is available in S_VOD table].

Having said that, lets get to the expectation of this post…

Locking a Bundle Product — This is a simple operation to achieve. There is a flag field on S_PROD_INT which serves as the Lock Flag. The field is “VOD Locked Flag”. This flag value has to be set on the Parent Product to Lock it. Before you Lock the Parent, you might check if its already locked. Here is a simple code that does that:

var boProdAdmin : BusObject = TheApplication().GetBusObject("Admin ISS Product Definition");
var bcProdAdmin : BusComp = boProdAdmin.GetBusComp("Internal Product - ISS Admin");
var bcProdBndl : BusComp = boProdAdmin.GetBusComp("ISS Product Bundle Admin BusComp");
var bcProdVer : BusComp = boProdAdmin.GetBusComp("ISS Product Versions BusComp");

//Lock the Product if not locked.
with(bcProdAdmin)
{
ActivateField("Name");
ActivateField("VOD Locked Flag");
ClearToQuery();
SetViewMode(AllView);
SetSearchSpec("Name",psParentProd.GetProperty("Name"));
ExecuteQuery(ForwardOnly);

if(FirstRecord())
{
if(GetFieldVlaue("VOD Locked Flag") == 'N' || GetFieldVlaue("VOD Locked Flag") == 0)
{
SetFieldValue("VOD Locked Flag", 1);
WriteRecord();
}
}
} //End of Lock Product

Note: You might add more fields onto the Query operation to uniquely identify the Parent Product.

Release a Bundle Product — Once the Bundle Product is updated with changes, you have to Release it. Without performing this operation the latest changes will not be reflected for end users to use to the latest Bundle Product.
There is a method called “Publish” on the “Internal Products – ISS Admin” BC which should be used to “Release” the Product.

There are various methodologies available to invoke the BC Method.

If you are trying to release the Bundle Product from a workflow or a Business Service, consider using the following BS and its methods:
Business Service                                               Method

SIA BC Utility Service                                            BCInvokeMethod
SIS OM PMT Service                                               Invoke BC Method

February 10, 2009 Posted by Narayan Patro | EAI | | No Comments Yet