private boolean isConnectionRepresentingLinkEvent(Connection connection) { boolean bValue = connection.getMetaData().get("linkNodeHidden") != null; return bValue; }
public Constraint getConstraint(final Connection connection) { if (connection == null) { throw new IllegalArgumentException("connection is null"); } ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); }
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); }
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public boolean isDefault(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); Constraint constraint = this.constraints.get(ref); String defaultConnection = (String) getMetaData().get("Default"); String connectionId = (String) connection.getMetaData().get("UniqueId"); if (constraint != null) { return constraint.isDefault(); } else if (constraint == null && connectionId.equals(defaultConnection)) { return true; } else { return false; } } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public void setConstraint(final Connection connection, final Constraint constraint) { if (connection == null) { throw new IllegalArgumentException("connection is null"); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint(new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); }
public void setConstraint(final Connection connection, final Constraint constraint) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); }
public void visitConnection(Connection connection, StringBuilder xmlDump, boolean includeMeta) { xmlDump.append(" <connection from=\"" + connection.getFrom().getId() + "\" "); if (!NodeImpl.CONNECTION_DEFAULT_TYPE.equals(connection.getFromType())) { xmlDump.append("fromType=\"" + connection.getFromType() + "\" "); } xmlDump.append("to=\"" + connection.getTo().getId() + "\" "); if (!NodeImpl.CONNECTION_DEFAULT_TYPE.equals(connection.getToType())) { xmlDump.append("toType=\"" + connection.getToType() + "\" "); } if (includeMeta) { String bendpoints = (String) connection.getMetaData().get("bendpoints"); if (bendpoints != null) { xmlDump.append("bendpoints=\"" + bendpoints + "\" "); } } xmlDump.append("/>" + EOL); }
public void setConstraint(final Connection connection, final Constraint constraint) { if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); } else { throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with type:" + getType() ); } }
public void removeConstraint(Connection connection) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); internalRemoveConstraint(ref); }
private boolean processConnectionInfo(ConnectionInfo connectionInfo, Node[] nodes) { for (Node node: nodes) { for (List<Connection> connections: node.getOutgoingConnections().values()) { for (Connection connection: connections) { String id = (String) connection.getMetaData().get("UniqueId"); if (id != null && id.equals(connectionInfo.getElementRef())) { ((ConnectionImpl) connection).setMetaData( "bendpoints", connectionInfo.getBendpoints()); return true; } } } if (node instanceof NodeContainer) { boolean found = processConnectionInfo(connectionInfo, ((NodeContainer) node).getNodes()); if (found) { return true; } } } return false; }
String bendpoints = (String) connection.getMetaData().get("bendpoints"); xmlDump.append( " <bpmndi:BPMNEdge bpmnElement=\"" +
if( connections != null && ! connections.isEmpty() ) { for( org.kie.api.definition.process.Connection connection : connections ) { Object hiddenObj = connection.getMetaData().get("hidden"); if( hiddenObj != null && ((Boolean) hiddenObj) ) { continue;
String bendpoints = (String) connection.getMetaData().get("bendpoints"); if (bendpoints != null) { xmlDump.append("g:bendpoints=\"" + bendpoints + "\" ");
protected void triggerNodeInstance(org.jbpm.workflow.instance.NodeInstance nodeInstance, String type, boolean fireEvents) { boolean hidden = false; if (getNode().getMetaData().get("hidden") != null) { hidden = true; } InternalKnowledgeRuntime kruntime = getProcessInstance().getKnowledgeRuntime(); if (!hidden && fireEvents) { ((InternalProcessRuntime) kruntime.getProcessRuntime()) .getProcessEventSupport().fireBeforeNodeLeft(this, kruntime); } // trigger next node nodeInstance.trigger(this, type); Collection<Connection> outgoing = getNode().getOutgoingConnections(type); for (Connection conn : outgoing) { if (conn.getTo().getId() == nodeInstance.getNodeId()) { this.metaData.put("OutgoingConnection", conn.getMetaData().get("UniqueId")); break; } } if (!hidden && fireEvents) { ((InternalProcessRuntime) kruntime.getProcessRuntime()) .getProcessEventSupport().fireAfterNodeLeft(this, kruntime); } }
for (Connection conn : incoming) { if (conn.getFrom().getId() == from.getNodeId()) { this.metaData.put("IncomingConnection", conn.getMetaData().get("UniqueId")); break;
Boolean isAssociation = (Boolean) connection.getMetaData().get("association"); if (isAssociation == null) { isAssociation = false;
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); }
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public void setConstraint(final Connection connection, final Constraint constraint) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); }