Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1651

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.

54 Posts

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

54 Posts

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

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.

54 Posts

July 7th, 2017 12:00

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

Kind Regards,

Sean

No Events found!

Top