[jboss-user] [jBPM] - JPA Persistence and issues

Marco Piraccini do-not-reply at jboss.com
Thu Jul 7 11:19:56 EDT 2011


Marco Piraccini [http://community.jboss.org/people/mpiraccini] created the discussion

"JPA Persistence and issues"

To view the discussion, visit: http://community.jboss.org/message/613967#613967

--------------------------------------------------------------
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
[http://community.jboss.org/message/613967#613967]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110707/d3665584/attachment-0001.html 


More information about the jboss-user mailing list