trigger-invocation-expression-when-argument

Available in: SysML

This checks that when expression has a boolean result type.

Specification

If a TriggerInvocationExpression has kind = when, then it must have an argument that is a FeatureReferenceExpression whose referent is an Expression with a result that conforms to the type ScalarValues::Boolean.

Example

action {
    accept when 42; // error
}

Use a boolean expression instead:

action {
    accept when true; // ok
}