How to create a microflow to calculate an enumeration value for me?

0
Hello, I would like to create a list view of several entity attributes displayed (Entity is HARA) and the attribute that needs calculation is called ASIL (Enum: A,B,C, and D). I'm at the microflow part right now, and the ASIL determination depends on other enumeration attributes with the entity (saverity [s1,s2,s3], exposure [e1,e2,e3,e4], and controllability [c1,c2,c3]). For example, if the user goes through a new edit of HARA entity and in the overview page of HARA, they click a button that triggers the microflow to calculate the ASIL type, and assuming these are the user's values: 1- Controllability = c3 2- Saverity = s1 and, 3- Exposure = e3 Then, the ASIL value should show ASIL A. Any help? Thanks.
asked
1 answers
0

Hi Abdulkareem,

I'm not sure what determines the value of ASIL. But for your example you can write a if then else statement.

To write a statement with an enumeration you would use ModuleName.EnumerationName.EnumerationValue. Most of the time if you press ctrl space and type the name of the enumeration you can find it in the suggestion box.

Here is an example with an enumeration called "Enumeration"

 

Heres an example for your use case

Whatever entity that has the attributes of your enumerations would replace "$object"

if $object/controlability = Modulename.Controllability.c3 and $object/saverity = Modulename.Saverity.s1 and $object/exposure = Modulename.exposure.e3
       then Modulename.ASIL.A
else //more logic

 

Hope this helps!

 

Edit: Your microflow will have one parameter. The parameter would be an object of type Hara. Then you would use a change activity for Hara and change the attribute ASIL. For your expression when changing the attribute follow this strcuture

 

if //conditions for A
     then A
else if //conditions for B
     then B
else if //conditions for C
     then C
else empty

 

answered