JBoss Community

JPA Persistence and issues

created by Marco Piraccini in jBPM - View the full discussion

Hi guys,

 

Since I switched to the JPA Persistence, I have some weird issues:

 

1) When i get a ProcessInstance, it seems that the InternalKnowledgeRuntime is always null! That produces some NPE at runtime, for instance in:

at org.jbpm.workflow.instance.node.WorkItemNodeInstance.getWorkItem(WorkItemNodeInstance.java:65) when I execute: workItemNodeInstance.getWorkItem()

 

All I do is:

        StatefulKnowledgeSession session =

        JPAKnowledgeService.

                newStatefulKnowledgeSession(knowledgeBase,

                        getKnowledgeSessionConfiguration(),

                            getEnvironment());

 

        WorkflowProcessInstance processInstance = (WorkflowProcessInstance) session

                .startProcess(processId, params);

       

        processInstance.getKnowledgeRuntime().toString() // NPE!!!!!!!!!!!!!!

 

2) The  ProcessInstance.getState() returns "STATE_ACTIVE" even when the process is (correctly) ended. All seems ok (the ProcessEventListener method are fired, etc)...but if I use the ProcessInstance getState() method to test the state, that returns always STATE_ACTIVE.

 

I'm using JBPM 5.1 final.

 

Marco.

Reply to this message by going to Community

Start a new discussion in jBPM at Community