iamratnesh

updated

9 years ago

I

iamratnesh

1 Message

0

1728

June 8th, 2017 05:00

Trying to put causeList into an event (Problem)

Hi All,

I am trying to put some SMARTS_ids (cause list of few events) into a Problem (nothing but an event).

a) First of all, i have doubt if i am creating SMARTS_id format properly:  (it is as below)

xxx= "ICIM_Notification::NOTIFICATION-"+className+"_"+sourceId+"_"+"Sp_"+fields.alarmname

b) I am using notif->CausedBy=xxx;

But neither problem is being creating nor the cause list display for it.

Can anybody help me to solve this problem.

Thanks in advance.

  • SeanPopham

    54 Posts

    1093

    0

    Posted July 10th, 2017 10:00

    Notification->Causes is  Reference List;  So assigning it as string format won’t work.

    Sample would be;

    // get instance of existing notification;

    icsNotificationFactoryObj = object(“ICS_NotificationFactory”, “ICS-NotificationFactory”);

    // get the problem;

    icsProblemNotif = icsNotificationFactoryObj->findNotification(“className”,”instanceName”,”eventName”);

    // get the problem’s existing causedBy List

    existingCausedByList = icsProblemNotif->CausedBy;

    // get the notification to be added;

    eventTobeadded = icsNotificationFactoryObj->findNotification(“className”, “instanceName”, “eventName”);

    // add it to the problem

    existingCausedByList += eventTobeadded;

    icsProblemNotif->CausedBy = existingCausedByList;


    When assigning to Causes you need to use += since it is a relationshipset. Also you be checking your object handles with the isNull method each time.


    Kind Regards,



    Sean

  • SeanPopham

    54 Posts

    1093

    0

    Posted June 27th, 2017 15:00

    Thank you for contacting Dell EMC Community Network.

    That is a great question and I'll need to research your question.

    I'll followup with you on Thursday with an update.

    Kind Regards,


    Sean

  • 1093

    0

    Posted June 27th, 2017 20:00

    Excuse me for being flippant, but this forum question looks to be cobbled together by a random generation of words, or is proffered by someone with no penchant for reason.

  • SeanPopham

    54 Posts

    1093

    0

    Posted July 7th, 2017 12:00

    I'm still researching your issue and will followup with you on Tuesday..

    Kind Regards,

    Sean