Package org.jbpm.workflow.core

Examples of org.jbpm.workflow.core.Constraint


                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
                        System.out.println( "Found constraint to node " + connection.getTo().getName() + ": " + s );
                        Constraint constraint = split.getConstraint( connection );
                        if ( constraint == null ) {
                            constraint = new ConstraintImpl();
                            split.setConstraint( connection,
                                                 constraint );
                        }
                        constraint.setConstraint( s );
                    }
                }
            }
            String newXml = XmlBPMNProcessDumper.INSTANCE.dump( process );
            System.out.println( newXml );
View Full Code Here


    public void setNode(Node node) {
        super.setNode(node);
        for (Connection connection: getStateNode().getOutgoingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE)) {
            String label = null;
            Constraint constraint = getStateNode().getConstraint(connection);
            if (constraint != null) {
                label = constraint.getName();
            }
            ((org.jbpm.workflow.core.Connection) connection).setMetaData("label", label);
        }
    }
View Full Code Here

    }
   
    private void updateConnectionLabel(ElementConnection connection) {
        ConnectionWrapper connectionWrapper = (ConnectionWrapper) connection;
        String label = null;
        Constraint constraint = getStateNode().getConstraint(
            connectionWrapper.getConnection());
        if (constraint != null) {
            label = constraint.getName();
        }
        connectionWrapper.getConnection().setMetaData("label", label);
        connectionWrapper.notifyListeners(ElementConnection.CHANGE_LABEL);
    }
View Full Code Here

   
    public void setNode(Node node) {
        super.setNode(node);
        for (Connection connection: getSplit().getDefaultOutgoingConnections()) {
            String label = null;
            Constraint constraint = getSplit().internalGetConstraint(
                new ConnectionRef(connection.getTo().getId(), connection.getToType()));
            if (constraint != null) {
                label = constraint.getName();
            }
            ((org.jbpm.workflow.core.Connection) connection).setMetaData("label", label);
        }
    }
View Full Code Here

    }
   
    private void updateConnectionLabel(ElementConnection connection) {
        ConnectionWrapper connectionWrapper = (ConnectionWrapper) connection;
        String label = null;
        Constraint constraint = getSplit().internalGetConstraint(
            new ConnectionRef(connectionWrapper.getConnection().getTo().getId(),
                connectionWrapper.getConnection().getToType()));
        if (constraint != null) {
            label = constraint.getName();
        }
        connectionWrapper.getConnection().setMetaData("label", label);
        connectionWrapper.notifyListeners(ElementConnection.CHANGE_LABEL);
    }
View Full Code Here

            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    Constraint constraint = split.getConstraint( connection );
                    if ( constraint != null ) {
                        System.out.println( "Found constraint to node " + connection.getTo().getName() + " [" + connection.getTo().getId() + "]: " + constraint.getConstraint() );
                        result.put( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ),
                                    new String[]{connection.getTo().getName(), constraint.getConstraint()} );
                    }
                }
            }
            return result;
View Full Code Here

                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
                        System.out.println( "Found constraint to node " + connection.getTo().getName() + ": " + s );
                        Constraint constraint = split.getConstraint( connection );
                        if ( constraint == null ) {
                            constraint = new ConstraintImpl();
                            split.setConstraint( connection,
                                                 constraint );
                        }
                        constraint.setConstraint( s );
                    }
                }
            }
            String newXml = XmlBPMNProcessDumper.INSTANCE.dump( process );
            System.out.println( newXml );
View Full Code Here

            SplitNode.ConnectionRef splitNodeConnectionRef = new SplitNode.ConnectionRef();
            splitNodeConnectionRef.setNodeId( connection.getNodeId() );
            splitNodeConnectionRef.setToType( connection.getToType() );

            Constraint constraint = splitNode.internalGetConstraint( connectionRef );
            SplitNode.Constraint splitNodeConstraint = splitTransferNode.getConstraints().get( splitNodeConnectionRef );

            updateConstraint( constraint,
                              splitNodeConstraint );
        }
View Full Code Here

            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    Constraint constraint = split.getConstraint( connection );
                    if ( constraint != null ) {
                        System.out.println( "Found constraint to node " + connection.getTo().getName() + " [" + connection.getTo().getId() + "]: " + constraint.getConstraint() );
                        result.put( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ),
                                    new String[]{connection.getTo().getName(), constraint.getConstraint()} );
                    }
                }
            }
            return result;
View Full Code Here

                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
                        System.out.println( "Found constraint to node " + connection.getTo().getName() + ": " + s );
                        Constraint constraint = split.getConstraint( connection );
                        if ( constraint == null ) {
                            constraint = new ConstraintImpl();
                            split.setConstraint( connection,
                                                 constraint );
                        }
                        constraint.setConstraint( s );
                    }
                }
            }
            String newXml = XmlBPMNProcessDumper.INSTANCE.dump( process );
            System.out.println( newXml );
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.core.Constraint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.