JBoss Community

Re: How can i get the human task id defined in bpmn files?

created by jay zhang in jBPM Development - View the full discussion

Thank you!

I solve the problem in this way:

//get session

                              StatefulKnowledgeSession sess = this.jbpm5helper.buildJbpmSession(0);

                              //get processInstance by processInstanceId

                              RuleFlowProcessInstance processInstance=(RuleFlowProcessInstance)sess.getProcessInstance(processInstanceId);

                              //get the id of node To be executed

                              List<NodeInstance> nodeList=(List<NodeInstance>)processInstance.getNodeInstances();

                              int currentNodeId=(int)nodeList.get(0).getNodeId();

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community