JBoss Community

Why is my kruntime null?

created by Darryl Youngblood in jBPM - View the full discussion

Hey guys,

 

I tried to adapt this example webexample http://community.jboss.org/people/bpmn2user/blog/2011/09/21/jbpm5-web-example to my use case where I execute the follwoing lines:

 

org.jbpm.workflow.instance.node.WorkItemNodeInstance currentNode = NodeFinder.findNodeInstance(MeyleTaskHandlerJPA.workItemdID, process);

 

org.drools.definition.process.Node nextNode = currentNode.getNode().getOutgoingConnections().values().iterator().next().iterator().next().getTo();

 

With help of the debugger I found out, that I get a NullPointer Exception when i call currentNode.getNode().

 

getNode() from class NodeInstanceImpl returns:

 

return ((org.jbpm.workflow.core.NodeContainer)

            this.nodeInstanceContainer.getNodeContainer()).internalGetNode( this.nodeId );

 

and here getNodeconteiner() from class WorkflowProcessInstanceImpl returns the return value of getWorkflowProcess() from same class which calls getProcess() from class ProcessInstanceImpl where the kruntime is null.

 

if (this.process == null) {

            this.process = kruntime.getKnowledgeBase().getProcess(processId);

        }

 

My question is: why is the kruntime null?

 

tyia

Reply to this message by going to Community

Start a new discussion in jBPM at Community