Hemulll
3 Argentium

EMS Smarts Model, Propagate enum attribute with instrumented attribute

Hello all.
Sorry for the subject of this thread is not quite clear.

So, i want to build next construction in Dynamic Model:

I have enum attribute

enum bat_state { UNKNOWN = 1, NORMAL, LOW };
readonly attribute bat_state BatteryStatus
"UPS battery Status"
= UNKNOWN
and i want to propagate this attribute from other instrumented attribute
the propagate constructions is
propagate attribute int prod Status
"Value of ups status oid"
<= AppProcInstrument, InstrumentedBy, BatteryStatus;

I have not found examples on documentation model_ref.pdf
Thanks
0 Kudos
4 Replies
Highlighted
Hemulll
3 Argentium

Re: EMS Smarts Model, Propagate enum attribute with instrumented attribute

A solution is :

propagate attribute int prod ups_Status
"Value of ups status oid"
<= AppProcInstrument, InstrumentedBy, Status;

enum ups_state { Unknown = 1, OnLine, OnBattery };

computed attribute ups_state xUps_Status
"UPS status value"
=ups_state(ups_Status);
0 Kudos
hhe
1 Copper

Re: EMS Smarts Model, Propagate enum attribute with instrumented attribute

Any idea on how to propagate string attribute ?

From what the documents says, it seems propagate only works for integer or boolean attributes.

Thanks!

0 Kudos
PaulORourke
3 Argentium

Re: EMS Smarts Model, Propagate enum attribute with instrumented attribute

Hi hhe@mactel,

Have you tried the following::

propagate attribute string str_Status

"String of status "

= AppProcInstrument, InstrumentedBy, Status;

Kind Regards,

Paul

0 Kudos
hhe
1 Copper

Re: EMS Smarts Model, Propagate enum attribute with instrumented attribute

Thanks Paul,

I actually got the answer from yahoo incharge group - thanks to the help from Chris and Alan.

The following 2 methods should work to propagate string value.

Option1:

AttributeB = unique(InstrumentationAName(InstrumentedBy)->AttributeAoftheInstrumentationAName) else "UNKNOWN";

Options2:

propagate attribute string max AttributeB <= InstrumentationAName,InstrumentedBy,AttributeA;

I will also try your solution then update here.

Cheers,

Hubery

0 Kudos