Topic
No replies
Narasimhaaswathnarayana
1 Post
ACCEPTED ANSWER

Pinned topic Adding MultiAssetLocci's in Offering using jython script

‏2013-10-17T12:18:45Z |

This is regarding the Offerings in SCCD 7.5.1.

I have created a offering, in that offering i am selecting Mutiple CI's. Once the offering is submitted an SR will be created.

What i need is the selected CI's in Offering must be stored in Multiassetlocci table in the SR using a jython script.

Actually i have achieved this functionality by overriding the execute method in SelectMoreCIsBean class.

        DataBean Offeringdatabean = app.getDataBean("ApplicationCIMapping_MC");
        MboSet pmsccrpecvset = (MboSet) Offeringdatabean.getMboSet();
        Mbo pmsccrpecvsetmbo = (Mbo)pmsccrpecvset.getMbo();
        System.out.println(pmsccrpecvsetmbo.getString("TICKETID"));
        MboSetRemote srremotemboset = pmsccrpecvsetmbo.getMboSet("SR");
        Mbo srmbo = (Mbo)srremotemboset.getMbo(0);
        
        if(srmbo.isBasedOn("TICKET") && srmbo != null)
        {
            TicketRemote Catalogticket = (TicketRemote)srmbo;
            Catalogticket.copyCIsToMultiAsset(mboset);
                assetsDataBean = app.getDataBean("main_mc_multiassetlocci_table");
                assetsDataBean.fireStructureChangedEvent();
                assetsDataBean.refreshTable();
        }

  But i need to achieve samething using Jython script. Can someone please let me know is it achievable using automation scripting.