Clarity Service Management

Expand all | Collapse all

How to populate Attributes for CAService desk CMDB using Soap service?

  • 1.  How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 02:45 AM

    Hi Team,

    I' m able to create the CMDB using createAsset() method.

    StringHolder createAssetResult = new StringHolder();

    StringHolder newAssetHandle = new StringHolder();

    StringHolder newExtensionHandle = new StringHolder();

    StringHolder newExtensionName = new StringHolder();

    ArrayOfString attrVal1 = new ArrayOfString();

    attrVal1.setString(new String[] { "name", "Test ci",

    "class", "grc:1000157", "asset_count", "2", "description",

    "Test ci for iimss", "location", "East Us", "repair_org",

    "Infosys" });

    ArrayOfString attr1 = new ArrayOfString();

    attr1.setString(new String[0]);

    usd.createAsset(sid, attrVal1, attr1, createAssetResult, newAssetHandle, newExtensionHandle, newExtensionName);

    CI is created but not able to create location, Maintenance Organization  details. But I need to create the CI with these attributes.

    Can you please help me How to populate the attributes like location, processer type, Maintenance Organization  details while creating the CMDB in CAServiceDesk using Soap service?



  • 2.  Re: How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 03:57 AM

    Hi,

    location and organization are SREL type attributes, means that entire attribute is defined in another table and you need to specify key of that attribute, in most situations it will be persistent_id. So your array should be defined in this way:

    "location", "loc:<UUID>", "repair_org""org:<UUID>"

    Regards,

    cdtj



  • 3.  Re: How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 07:43 AM

    Hi Balakrishna,

     

    Running bop_sinfo -dq nr may also help you identify the value that should be used for records stored in other tables. This may also imply running the doSelect() method to get the values (handles) from the relevant tables before passing them on to the createAsset() method.

     

    Kind Regards,

    Brian



  • 4.  Re: How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 09:31 AM

    Hi cdtj,

    Thanks for the information.

    I'm new to this implementation. if possible can you please provide me code snippet for the same as I'm not able to create CMDB if I pass the attributes as shown below.

    attrVal1.setString(new String[] { "name", "Test ci",

    "class", "grc:1000157", "asset_lifecycle_status",

    "1000000", "asset_count", "2", "description",

    "Test ci for iimss", "location", "loc:U'B436DB0D09A93C44B05513F46A846C24'"});



  • 5.  Re: How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 10:13 AM

    persistent_id will be: loc:B436DB0D09A93C44B05513F46A846C24

     

    Regards,

    cdtj



  • 6.  Re: How to populate Attributes for CAService desk CMDB using Soap service?

    Posted 04-07-2017 10:30 AM

    When create asset/CI, not all attributes can be created in one call...for those extension attributes, you can't.

    What you could do is after createAsset(), you would have the asset/CI handle returned. With this handle, you can

    call getAssetExtensionInformation() to get the extension handle and name and from there, you can

    updateObject() to update extension attribute values to the newly created asset/CI

    For example, processor type(proc_type) is an extension attribute in har_worx extension.

    Hope these 2cents help when you try to add attribute values to asset/CI.