How does one add a trigger to the "Properties-Constraints-Triggers" area of a state machine transition in Enterprise Architect? The quotes are how you get there manually within EA.
What I've Tried
Below, this actually results in the trigger being added to the state machine, but I need to link it to a specific transition. Variable stateMachine is of type EA.Element.
EA.Element trigger = (EA.Element)stateMachine.Elements.AddNew("trigger", "Trigger");
State is of type EA.Element. connector is of type EA.Connector (the specific StateFlow transition that I'm trying to add the trigger to). All of these appear to do absolutely nothing. In fact, Constraints seems to be an empty collection, even after I add the new items.
state.Constraints.AddNew("trigger", "Trigger");
connector.Constraints.AddNew("trigger", "Trigger");
state.StateTransitions.AddNew("trigger", "Trigger");
I've dug through the EA help with no luck as well. The search functionality isn't so good though, so it's possible I've missed something.
Interesting Information (May be on to something)
The MiscData for the Connector type seems to have the State Flow trigger information. According to a very reliable book (thank you Mr. Kilian), PDATA1 of MiscData seems to be the State Flow trigger's name. But how do I add a new trigger? MiscData is Read Only.