Package org.drools.runtime.process

Examples of org.drools.runtime.process.WorkflowProcessInstance


    }

    public int getProcessState() {
        StatefulKnowledgeSession ksession = this.getKnowledgeSession();
        try {
            WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
            return process.getState();
        } finally {
            ksession.dispose();
        }
    }
View Full Code Here


    }

    public String getCurrentNodeName() {
        StatefulKnowledgeSession ksession = this.getKnowledgeSession();
        try{
            WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
            long nodeId = process.getNodeInstances().iterator().next().getNodeId();
            return ((WorkflowProcess) this.kbase.getProcess(this.processId)).getNode(nodeId).getName();
        } finally{
            ksession.dispose();
        }
    }
View Full Code Here

    }

    public Object getProcessVariable(String name) {
        StatefulKnowledgeSession ksession = this.getKnowledgeSession();
        try{
            WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
            return process.getVariable(name);
        } finally{
            ksession.dispose();
        }
    }
View Full Code Here

        }
    }

    public void setProcessVariable(String name, Object value) {
        StatefulKnowledgeSession ksession = this.getKnowledgeSession();
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        process.setVariable(name, value);
        ksession.dispose();
    }
View Full Code Here

    /**
     * Inserts the current process
     */
    @Override
    public void insertProcess() {
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        ksession.insert(process);
    }
View Full Code Here

        return ksession.fireAllRules();
    }

    @Override
    public int getProcessState() {
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        return process.getState();
    }
View Full Code Here

        return ((WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId)).getNodeInstances().size();
    }

    @Override
    public String getCurrentNodeName() {
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        long nodeId = process.getNodeInstances().iterator().next().getNodeId();
        return ((WorkflowProcess) this.kbase.getProcess(this.processId)).getNode(nodeId).getName();
    }
View Full Code Here

        ksession.getWorkItemManager().completeWorkItem(workItemId, outputParameters);
    }

    @Override
    public Object getProcessVariable(String name) {
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        return process.getVariable(name);
    }
View Full Code Here

        return process.getVariable(name);
    }

    @Override
    public void setProcessVariable(String name, Object value) {
        WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId);
        process.setVariable(name, value);
    }
View Full Code Here

    private Collection<Long> getSubFlows(ProcessInstance processInstance) {
        Collection<Long> result = new HashSet<Long>();
        if (processInstance == null) {
            return result;
        }
        WorkflowProcessInstance wp = (WorkflowProcessInstance) processInstance;
        for (NodeInstance n : wp.getNodeInstances()) {
            if (n instanceof SubProcessNodeInstance) {
                SubProcessNodeInstance spn = (SubProcessNodeInstance) n;
                result.add(spn.getProcessInstanceId());
            }
        }
View Full Code Here

TOP

Related Classes of org.drools.runtime.process.WorkflowProcessInstance

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.