Magic Model Analyst can evaluate any expression that contains enumeration literal by name directly, e.g., colour == "Green", but not colour.getName() == Green.
The following figure demonstrates how you can read Enumeration literal value by name directly through the property Change Expression colour=="Green" and setting the guard condition colour=="Red" instead of colour.getName()=="Green", and colour.getName()=="Red" accordingly in the Specification window of the Transition<>.
Reading Enumeration literal value by name directly (without .getName()).
Backward compatibility with earlier version models using getName() is supported through an error message in the Simulation console pane. The Script engine will throw one error message, and then stop for Enumeration literal value. If getName() exists in many places, you will have to run the simulation many times and manually fix it one by one.