-
1. Re: problem with JPAKnowledgeService and LocalTaskService
swiderski.maciej Nov 2, 2012 6:57 AM (in response to ted.pan)the code above shows only bootstrap could you provide details on how you start process and then complete task?
Note that both session and work item handler must be active when completing the task.
HTH
-
2. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 2, 2012 9:03 AM (in response to swiderski.maciej)Thanks Maciej,
please find the attached files for the main program and the process definition I used.
If I comment out the Line 94,
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
use
ksession = kbase.newStatefulKnowledgeSession();
the process works fine, but I do need the process instance persisted for future usage.
Ted
-
ApplicationStatus.bpmn.zip 2.0 KB
-
TestFSM.java.zip 3.5 KB
-
-
3. Re: problem with JPAKnowledgeService and LocalTaskService
swiderski.maciej Nov 2, 2012 11:29 AM (in response to ted.pan)Just tried with simplified verion of your main class andvery simple process (start -> human task -> end) and everything works as expected process is triggered and completes successfully. See attached zip file. So I believe there must be some misconfiguration...
HTH
-
test.zip 4.8 KB
-
-
4. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 2, 2012 11:46 AM (in response to swiderski.maciej)hi Maciej,
Thanks again.
My problem is that I can not complete the second human task.
I adjust the process file you attached to 3 human tasks.
the 3rd human task could never be reached. (in fact, I even added exit actions on second human task, the action is never be called, seems the second human task could not be completed).
Ted
-
HumanTask.bpmn.zip 1.2 KB
-
TestFSM1.java.zip 2.7 KB
-
-
5. Re: problem with JPAKnowledgeService and LocalTaskService
swiderski.maciej Nov 2, 2012 12:28 PM (in response to ted.pan)attached is a test with three user tasks all completes without any problem. If you're running with spring it could be problem there...
HTH
-
test2.zip 5.1 KB
-
-
6. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 2, 2012 12:33 PM (in response to swiderski.maciej)hi Maciej,
which version of jBPM and Drools you are using?
I run the test2, it fails as well. i'm using jbpm 5.4.0.CR1 and Drools 5.5.0.CR1
Ted
-
7. Re: problem with JPAKnowledgeService and LocalTaskService
swiderski.maciej Nov 2, 2012 12:46 PM (in response to ted.pan)I run on master. What you mean fail? what is the output when you run this test?
-
8. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 2, 2012 12:51 PM (in response to swiderski.maciej)hi Maciej,
I got the following output
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
181 test Reserved
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
182 test2 Reserved
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare
...........( there are endless WARNING: executing transaction with 0 enlisted resource Nov 2, 2012 12:32:35 PM bitronix.tm.twopc.Preparer prepare)
for the master, do you mean jBPM6.0 snapshot or jBPM5.4.0 snapshot?
Thanks
Ted
-
9. Re: problem with JPAKnowledgeService and LocalTaskService
swiderski.maciej Nov 2, 2012 1:21 PM (in response to ted.pan)master is 6.0: here is the output when running it:
log4j:WARN No appenders could be found for logger (bitronix.tm.resource.jdbc.PoolingDataSource). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Loading knowledge base. Registering Human Task.. 1 test Reserved 2 test2 Reserved 3 test3 Reserved Process is null Fri Nov 02 18:09:26 CET 2012 Process completed?
Will try to give it a try on 5.4.0 CR1 as soon as I can and let you know.
HTH
-
10. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 2, 2012 2:01 PM (in response to swiderski.maciej)hi Maciej,
I made a mistake when run the tests you provided. I didn't change the persistence.xml to point to the right database( the one created on-the-fly)
After I fixed this issue, I tried the test again with jbpm5.4.0.CR1 and jbpm6.0.0.SNAPSHOT( today's).
And I add script to the exit actions of each human task
I got the same result: ( the main process does stop. but no log for the third human task)
task #1
System.out.println("leaving human task 1");
task #2
System.out.println("leaving human task 2");
task #3
System.out.println("leaving human task 3");
from the following log, the "leaving human task 2" is not shown.
Nov 2, 2012 1:56:47 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Registering Human Task..
Nov 2, 2012 1:56:47 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:47 PM org.jbpm.task.identity.UserGroupCallbackManager setCallback
INFO: UserGroupCallback registered: org.jbpm.task.identity.DefaultUserGroupCallbackImpl
Nov 2, 2012 1:56:48 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:51 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:51 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
1 test Reserved
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
leaving human task 1
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:56:57 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
2 test2 Reserved
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Nov 2, 2012 1:57:00 PM bitronix.tm.twopc.Preparer prepare
WARNING: executing transaction with 0 enlisted resource
Process is WorkflowProcessInstance1 [processId=HumanTask,state=1]
Fri Nov 02 13:57:00 EDT 2012 Process completed?
So I think the problem may be with my configuration. I attach all the files I need, could you help me to figure it out?
Thanks
Ted
-
libs.txt.zip 861 bytes
-
JBPMorm-JPA2.xml 2.1 KB
-
persistence.xml 4.8 KB
-
TestFSM2.java.zip 3.6 KB
-
test.log.zip 510 bytes
-
HumanTask.bpmn.zip 1.6 KB
-
-
11. Re: problem with JPAKnowledgeService and LocalTaskService
ted.pan Nov 3, 2012 9:09 AM (in response to ted.pan)hi,
Just to keep this topic updated to prevent others wasting time, I would like to report my progress back here.
The problem is with the persistence.xml. When I change back to use JPA1, everything works fine.
I will do more investigation to see if the problem is with JPA2 or is with my JPA2's persistence.xml
Thanks
Ted
-
12. Re: problem with JPAKnowledgeService and LocalTaskService
jbize Nov 5, 2012 12:18 PM (in response to ted.pan)Hey Ted,
I think your JBPMorm-JPA2.xml looks ok, what does your Taskorm.xml look like? There have been issues there in the past, could your problem be related? (Just grasping.)
Oh, and I was just looking at the 5.2.0.Final source of the ProcessInstanceInfo entity, and it looks properly annotated for javax.persistence. Is the extra entity mapping in XML really required?
John
-
13. Re: problem with JPAKnowledgeService and LocalTaskService
sudhabalu Nov 6, 2013 5:30 AM (in response to jbize)Hi Ted,
Did you found solution for this problem? Am also facing same issue when using LocalTaskService and JPAKnowledgeService.