-
1. Re: Is it possible to get the StatefulKnowledgeSession/processInstance from solely its ID?
swiderski.maciej Aug 4, 2012 7:52 AM (in response to binglim)First question - do you use persistence for your processes? If so and they share same data store (data base) you should be able to signal process instance just using signalEvent method on the session as that should be capable of finding all process instances waiting for that event (defined by type). If you don't use persistence then you must have to get access to actual session instance that holds the process instance as it only lives in that session (memory).
Would be perfect to get a test case that reproduces that or at least more information about the exception (stack trace, etc).
HTH
-
2. Re: Is it possible to get the StatefulKnowledgeSession/processInstance from solely its ID?
binglim Aug 6, 2012 1:07 AM (in response to swiderski.maciej)Hi Maciej,
Thanks for your response.
I implemented persistence but I'm thinking that there might be configuration problems that's causing the error I have right now.
The exceptions I got are:
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:143)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
at com.sample.ProcessMain.main(ProcessMain.java:62)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129)
... 3 more
Caused by: java.lang.NullPointerException
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:168)
... 8 more
Regarding the database, is the databse implemented within JBPM? By using JPAKnowledgeService and EntityManager, does it has a specific database that stores the information I need?
I have attached the files in a zip folder in the original post, if you need any additional information.
Thanks a lot for offering your help and I look forward to hearing from you.
Best,
Bing