Error on my if statement expression

0
I'm getting this error after placing an expression on my change object activity: Incompatible expression types: Boolean, (empty). Here's the last part of my expression and 'empty' is what's causing the error. My question is, how do I end my expression and eliminate this error? (some logic here) : else if $HARA/controllability = MyFirstModule.controllability.C3 and $HARA/exposure = MyFirstModule.exposure.E4 and $HARA/severity = MyFirstModule.saverity.S3 then $HARA/ASIL = MyFirstModule.aSIL.D else empty If empty is not the right ending for the expression, then what is? I'm using this expression to change an attribute on an entity of type Enumeration. Thanks.
asked
2 answers
1

A Boolean only has two values, true or false.

Empty is not a valid value. If you want to use more than 2 values then you'd should use a enum.

answered
1

If the attribute you are changing is a boolean, it can only be true or false. In your else statement, you are saying "else empty". For this, it should be either "else false" or "else true". 

Your question says you are changing an attribute that is of type enumeration, but the error message would only occur if you are changing an attribute of type boolean. I would double check your domain model to see if this attribute is the right data type. Also double check you are changing the right attribute.

answered