Package org.jbpm.workflow.core.node

Examples of org.jbpm.workflow.core.node.Split


   
    private static final long serialVersionUID = 510l;
    private transient IPropertyDescriptor[] descriptors;

    public SplitWrapper() {
        setNode(new Split());
        getSplit().setName("Split");
        setDescriptors();
    }
View Full Code Here


        }
    }
   
    private boolean processNodes(String name, Node currentNode, String testCode, Map<String, String> cases, Map<String, String> ongoingCases) {
      if (currentNode instanceof Split) {
        Split split = (Split) currentNode;
        switch (split.getType()) {
          case Split.TYPE_AND:
            boolean done = false;
            String startTestCode = testCode;
            int counter = 1;
            for (Connection c: split.getDefaultOutgoingConnections()) {
              if (processNodes(name + counter++, c.getTo(), startTestCode, cases, ongoingCases)) {
                done = true;
              }
            }
            if (!done) {
                String implicitCompleteTestCode = startTestCode;
              for (String ongoingCase: ongoingCases.values()) {
              implicitCompleteTestCode += ongoingCase.substring(startTestCode.length(), ongoingCase.length());
              }
              ongoingCases.clear();
              ongoingCases.put(name, implicitCompleteTestCode);
            }
            return done;
          case Split.TYPE_XOR:
          case Split.TYPE_OR:
            int i = 1;
            done = true;
            for (Connection c: split.getDefaultOutgoingConnections()) {
              String newTestCode = testCode +
                "        // please make sure that the following constraint is selected to node " + c.getTo().getName() + ":\n" +
              "        // " + split.getConstraint(c).getConstraint() + "\n";
              if (!processNodes(name + "Constraint" + i++, c.getTo(), newTestCode, cases, ongoingCases)) {
                done = false;
              }
            }
            return done;
          default:
            throw new IllegalArgumentException("Unknown split type " + split.getType());
        }
      } else if (currentNode instanceof EndNode) {
        EndNode endNode = (EndNode) currentNode;
        if (endNode.isTerminate()) {
          cases.put(name, testCode);
View Full Code Here

   
    private static final long serialVersionUID = 510l;
    private transient IPropertyDescriptor[] descriptors;

    public SplitWrapper() {
        setNode(new Split());
        getSplit().setName("Split");
        setDescriptors();
    }
View Full Code Here

        log.debug( "Processing " + process.getId() );
        result = new HashMap<String, String[]>();
        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()} );
                }
View Full Code Here

        } else {
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                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 );
                    }
                }
View Full Code Here

   
    private static final long serialVersionUID = 510l;
    private transient IPropertyDescriptor[] descriptors;

    public SplitWrapper() {
        setNode(new Split());
        getSplit().setName("Split");
        setDescriptors();
    }
View Full Code Here

            log.debug( "Processing " + process.getId() );
            result = new HashMap<String, String[]>();
            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()} );
                    }
View Full Code Here

            //Process XML
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                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 );
                    }
                }
View Full Code Here

            log.debug( "Processing " + process.getId() );
            result = new HashMap<String, String[]>();
            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()} );
                    }
View Full Code Here

            //Process XML
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                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 );
                    }
                }
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.core.node.Split

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.