Moving on from my previous problem, now I need to add Triggers to my transitions in State Machine diagram. How to acheive this using C#. The following creates a transition and its gaurd value but the trigger is not getting added.
EA.Connector trans = psosDiagramElement.Connectors.AddNew(tb1[i].Text, "StateFlow");
trans.ClientID = GetElementByName(txtSourceElement.Text);
trans.MetaType = "Transition";
trans.TransitionGuard = tb1[i].Text;
trans.SupplierID = GetElementByName(cmb1[i].SelectedItem.ToString());
trans.Direction = "Source -> Destination";
trans.Constraints.AddNew("A", "Signal");
trans.Update();
I don't think that there is a direct API call available to update the trigger.
Workaround for updating trigger is to hit a direct query using below call.
You need to update\add a value in t_xref with
Sample Insert query:
Insert into t_xref (Name,Type,Visibility,Behavior,Description,Client) values ('MOFProps','connector property','public','trigger','triggereaguid1,triggereaguid2','connectorid');