}
public void internalTrigger(NodeInstance from, String type) {
super.internalTrigger(from, type);
// TODO: composite states trigger
StateNode stateNode = getStateNode();
Connection selected = null;
int priority = Integer.MAX_VALUE;
for (Connection connection: stateNode.getOutgoingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE)) {
Constraint constraint = stateNode.getConstraint(connection);
if (constraint != null && constraint.getPriority() < priority) {
String rule = "RuleFlowStateNode-" + getProcessInstance().getProcessId() + "-" +
getStateNode().getUniqueId() + "-" +
connection.getTo().getId() + "-" +
connection.getToType();