Sharing Profile Attributes with Remote Product Configurator
In the Business Service Remote Complex Object Instance Service, a new Property Set type RemoteCfgProfileAttrs has been created to share attributes in the application object manager with Remote Product Configurator.
Follow the steps to share profile attributes with remote product configurator:
-
Define the Profile Attributes in the Application Object Manager for the Remote Product Configurator.
This property set is applicable only for methods LoadInstance or SetInstance as the example below:
function Service_PreInvokeMethod (MethodName, Inputs, Outputs) { if (MethodName == "LoadInstance“ || MethodName == “SetInstance“) { var ProfileAttrPS = TheApplication().NewPropertySet(); ProfileAttrPS.SetType("RemoteCfgProfileAttrs"); //Add profile attributes to send to and retrieve from remote product configurator ProfileAttrPS.SetProperty("IPTV_P1","N"); ProfileAttrPS.SetProperty("IPTV_P2",""); ProfileAttrPS.SetProperty("Voice_P1",""); ProfileAttrPS.SetProperty("Voice_P2","Y"); Inputs.AddChild(ProfileAttrPS); } return (ContinueOperation); }
-
Update the Profile Attributes in the Remote Configurator script under the Product Definition > Script > Cfg_InstInitialize Event as the example below:
function Cfg_InstInitialize (RootProduct) { // Source code fetches the property set identified by PS Type = RemoteCfgProfileAttrs from AOM and updates in RPC profile attributes // Get the RPC profile attributes in variables var ProfAtt1 = TheApplication().GetProfileAttr("IPTV_P1"); var ProfAtt2 = TheApplication().GetProfileAttr("IPTV_P2"); // Update values in the remote configurator session TheApplication().SetProfileAttr("IPTV_P1", "RemoteCfg1_InstInitialize"); TheApplication().SetProfileAttr("IPTV_P2", "RemoteCfg2_InstInitialize"); //Print all values TheApplication().TraceOn(“/export/home/sblqa1/temp/RemoteCfgTrace_$p_$t.txt", "Allocation", "All"); TheApplication().Trace("Profile Attribute value passed from AOM IPTV_P1::: " + ProfAtt1 + "\r"); TheApplication().Trace("Profile Attribute value passed from AOM IPTV_P2::: " + ProfAtt2 + "\r"); TheApplication().Trace("Profile Attribute IPTV_P1::: " + TheApplication().GetProfileAttr("IPTV_P1") + "\r"); TheApplication().Trace("Profile Attribute IPTV_P2::: " + TheApplication().GetProfileAttr("IPTV_P2") + "\r"); TheApplication().TraceOff(); }
-
Retrieve the Profile Attribute values in Application Object Manager using a custom Business Service as the example below:
function TestProfileAttributes(Inputs) { TheApplication().Trace("Profile Attribute IPTV_P1::: " + TheApplication().GetProfileAttr("IPTV_P1") + "\r" ); TheApplication().Trace("Profile Attribute IPTV_P2::: " + TheApplication().GetProfileAttr("IPTV_P2") + "\r" ); TheApplication().Trace("Profile Attribute Voice_P1::: " + TheApplication().GetProfileAttr("Voice_P1") + "\n" ); TheApplication().Trace("Profile Attribute Voice_P2::: " + TheApplication().GetProfileAttr("Voice_P2") + "\n" ); }