Package org.kie.api.definition.process

Examples of org.kie.api.definition.process.Node


                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
        Node node = nodeInstance.getNode();
        if (node == null) {
            return "";
        }
        String nodeId = "" + node.getId();
        NodeContainer nodeContainer = node.getNodeContainer();
        while (nodeContainer != null) {
            if (nodeContainer instanceof Node) {
                node = (Node) nodeContainer;
                nodeContainer = node.getNodeContainer();
                // TODO fix this filter out hidden compositeNode inside ForEach node
                if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
                    nodeId = node.getId() + ":" + nodeId;
                }
            } else {
                break;
            }
        }
View Full Code Here


                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
        Node node = nodeInstance.getNode();
        if (node == null) {
            return "";
        }
        String nodeId = "" + node.getId();
        NodeContainer nodeContainer = node.getNodeContainer();
        while (nodeContainer != null) {
            if (nodeContainer instanceof Node) {
                node = (Node) nodeContainer;
                nodeContainer = node.getNodeContainer();
                // TODO fix this filter out hidden compositeNode inside ForEach node
                if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
                    nodeId = node.getId() + ":" + nodeId;
                }
            } else {
                break;
            }
        }
View Full Code Here

      // not full properties for BPMN2 process, which is set to autocomplete = true
      return !getRuleFlowProcess().isAutoComplete();
    }
   
    protected void internalAddElement(ElementWrapper element) {
        Node node = ((NodeWrapper) element).getNode();
        long id = 0;
        for (Node n: getRuleFlowProcess().getNodes()) {
            if (n.getId() > id) {
                id = n.getId();
            }
View Full Code Here

            }
            long currentNodeId = getNodeId();
            // handle boundary events
            for (String boundaryEvent : context.getCurrentPath().getBoundaryEventIds()) {

                Node boundaryEventNode = null;
                for (Node node : getNode().getNodeContainer().getNodes()) {

                    if (node.getMetaData().get("UniqueId").equals(boundaryEvent) &&
                            node.getMetaData().get("AttachedTo").equals(getNode().getMetaData().get("UniqueId"))) {

                        boundaryEventNode = node;
                        break;
                    }
                }
                if (boundaryEventNode != null) {
                    NodeInstance next = ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(boundaryEventNode);
                    setNodeId(boundaryEventNode.getId());
                    this.trigger(next, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
                }
            }
            setNodeId(currentNodeId);
        }
View Full Code Here

    @Test
    public void testReadAllSimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-UserTaskWithSimulationMetaData.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

   
    @Test
    public void testReadProbabilitySimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
        Node node = nodeInstance.getNode();
        if (node == null) {
            return "";
        }
        Object uniqueIdObj = node.getMetaData().get("UniqueId");
        String nodeId;
        if( uniqueIdObj == null ) {
            nodeId = "" + node.getId();
        } else {
            nodeId = (String) uniqueIdObj;
        }
        NodeContainer nodeContainer = node.getNodeContainer();
        while (nodeContainer != null) {
            if (nodeContainer instanceof Node) {
                node = (Node) nodeContainer;
                nodeContainer = node.getNodeContainer();
                // TODO fix this filter out hidden compositeNode inside ForEach node
                if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
                    nodeId = node.getId() + ":" + nodeId;
                }
            } else {
                break;
            }
        }
View Full Code Here

    }
   
    @Test
    public void testLoadData() {
        SimulationDataProvider provider = new JBPMBAMSimulationDataProvider("jdbc/jbpm-ds", "com.sample.test");
        Node node = new NodeImpl() {

            @Override
            public long getId() {
                return 4;
            }
View Full Code Here

    @Test
    public void testReadAllSimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-UserTaskWithSimulationMetaData.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

   
    @Test
    public void testReadProbabilitySimulationProperties() {
        SimulationDataProvider provider = new BPMN2SimulationDataProvider(this.getClass().getResourceAsStream("/BPMN2-ExclusiveSplitWithSimulationProps.bpmn2"));
       
        Map<String, Object> data = provider.getSimulationDataForNode(new Node() {
           
            public List<Connection> getOutgoingConnections(String type) {
                return null;
            }
           
View Full Code Here

TOP

Related Classes of org.kie.api.definition.process.Node

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.