Package org.apache.agila.model

Examples of org.apache.agila.model.NodeID


      tokenImpl.setInstanceID(id);
      assertEquals(id,tokenImpl.getInstanceID());
    }
   
    public void testSetCurrentNodeID(){
      tokenImpl.setCurrentNodeID(new NodeID(101));
      assertEquals(101,tokenImpl.getCurrentNodeID().getID());
    }
View Full Code Here


    }
   
    public void testTraverse(){
      TokenService tokenService = new TokenServiceImpl();
      InstanceID instanceId = new InstanceID(1);
      Token token = tokenService.newToken(instanceId, new NodeID(2), Token.PRE);
     
      Node child = createNode(50);
      connectionImpl.setChildNode(child);
           
      connectionImpl.traverse(token);
View Full Code Here

            public Connection[] doEnd(NodeContext ctx) {
                return null;
            }
        };
        n.setNodeId(new NodeID(nodeID));
        return n;
    }
View Full Code Here

            public Connection[] doEnd( NodeContext ctx ) {
                return null;
            }
        };

        rootNode.setNodeId(new NodeID(1));
        rootNode.setDisplayName("root");

        bProcess.setRoot( rootNode );

        // add the business process graph
View Full Code Here

    public void testRequiredVariables() {
        assertTrue( getRequiredVariables() == 1 );
    }

    public void testPropertiesSet() {
        Node node = businessProcess.getNode(new NodeID(3));
        assertTrue("Not found node!", node instanceof LeaveApplicationTask);

        LeaveApplicationTask task = (LeaveApplicationTask) node;
        assertEquals("foo property", "hello", task.getFoo());
        assertEquals("bar property", 123, task.getBar());
View Full Code Here

    public void addConnection(int startNodeID, int endNodeID, String name) {

        // System.out.println("addConnection() : startid = " + startNodeID
        //        + " endid = " + endNodeID + " name = " + name);

        Node startNode = (Node) nodeMap.get(new NodeID(startNodeID));
        Node endNode = (Node) nodeMap.get(new NodeID(endNodeID));

        ConnectionImpl c = new ConnectionImpl(name);

        c.setParentNode(startNode);
        c.setChildNode(endNode);
View Full Code Here

            retVal = new TokenImpl();
            retVal.setTokenID( new TokenID( result.getInt( "tokenid" ) ) );
            retVal.setInstanceID( new InstanceID(
                result.getInt( "instanceid" ) ) );
            retVal.setCurrentNodeID(new NodeID(result.getInt("nodeid")));
            retVal.setCurrentState( result.getInt( "state" ) );
            retVal.setActive( result.getBoolean( "active" ) );

            result.close();
            statement.close();
View Full Code Here

            this.instanceKey = new Integer(instanceId.getID());
        }
    }

    public NodeID getCurrentNodeID() {
        return currentNodeKey != null ? new NodeID(currentNodeKey.intValue()) : null;
    }
View Full Code Here


        // TODO may wish to also use the Thread context class loader
        Node n = (Node) Class.forName(classname).newInstance();

        n.setNodeId(new NodeID(Integer.parseInt(node.attribute("id").getValue())));

        if (node.attribute("type").getValue().equals("start")) {
            graph.setRoot(n);
        }
View Full Code Here

        BusinessProcess bp =  businessProcessService.getGraphByID(instance.getBusinessProcessID());

        InstanceID instanceID = instance.getInstanceID();
        Node root = bp.getRoot();
        NodeID nodeId = root.getNodeId();
        Token token = tokenService.newToken(instanceID, nodeId, Token.PRE);

        /*
         * and a message
         */
 
View Full Code Here

TOP

Related Classes of org.apache.agila.model.NodeID

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.