Discussion:
[jboss-user] [jBPM] - jBPM straying after user task completed
Laura delli Paoli
2013-02-19 11:23:20 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798315#798315

--------------------------------------------------------------
Hello everybody,


I'm facing a strange problem in a jBPM environment.
I have a jBPM process with a Human task, I'm always able to process the human task but, sometimes, the flow is not forwarding further.
Without any exception the flow stops there, other tasks following the user task is not getting executed.


How can I fix this problem?

Thanks
Laura
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798315#798315]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 15:09:48 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798363#798363

--------------------------------------------------------------
Looks like you have a problem with your UserGroupCallBack. The assignee of the task should be loaded by Call Back class and hence should be a valid jbpm user. If not then the task is not assigned and is not logged in the database.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798363#798363]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-19 17:31:09 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798388#798388

--------------------------------------------------------------
Hi,
Thansk for your answer.
HumanTask is always completed successfully.

The Service tasks following the human task sometimes (25%) doesn't start

Laura
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798388#798388]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 18:12:26 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798394#798394

--------------------------------------------------------------
Oh there is a service task after your human task. I thought your human tasks are not getting assigned and created. What are you using service task for?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798394#798394]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 18:13:29 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798395#798395

--------------------------------------------------------------
Just replace you service task with a script task that prints a statement. Just to check if there is something wrong with the process or with the way you implement the service task.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798395#798395]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-19 20:54:34 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798419#798419

--------------------------------------------------------------
Same behaviour,
1 process each 4 strayes :-(
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798419#798419]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 21:31:06 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798422#798422

--------------------------------------------------------------
So the statement is not printed? Will it be possible for you to attach your process definition?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798422#798422]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-20 11:23:58 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798552#798552

--------------------------------------------------------------
Here you are....
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798552#798552]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-20 14:35:20 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798596#798596

--------------------------------------------------------------
Since your process did not print the statement, so well I looked for problems in your human task. Only thing I could find is the comment parameter of the node which is empty. It cannot be left null. I dont know if it is the root cause but leaving it blank results in a weird behaviour.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798596#798596]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-20 14:54:16 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798605#798605

--------------------------------------------------------------
I don't think the behaviuor is due to the process definition, since it happens randomly.

By the way the human task appears as completed on the task table of the database.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798605#798605]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-21 22:43:20 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/798970#798970

--------------------------------------------------------------
Okay. I think I know what is wrong with your code. I believe you are not completing the workitem but completing the task.
Just add the code WorkItemManager.completeWorkItem(workItemId, <arguments if you have any other wise null>);
This will move your workflow forward.

Regards.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798970#798970]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-22 09:31:38 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/799034#799034

--------------------------------------------------------------
You mean that:

jBPMClient.complete(taskToRun, user, null, responseHandler);

is not enought???

Laura
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799034#799034]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-22 14:36:01 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/799099#799099

--------------------------------------------------------------
I believe so. I removed the workitem completion code and tried it just with TaskClient.complete(...), it just completed the task and did not signal the workflow. So yeah.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799099#799099]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-02-25 06:34:08 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/799284#799284

--------------------------------------------------------------
Hi,

Have you solved this issue?

Do you restart the JBPM server before completing a task?

I got a similar problem here:
https://community.jboss.org/thread/221686?tstart=0 https://community.jboss.org/thread/221686?tstart=0

but my setup is I am using JBPM Console Server and Human Task Service that comes with JBPM5.4 Final Full Installer, and I am not restarting the server before completing tasks.


Regards,
Thomas Setiabudi

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799284#799284]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-02-26 12:58:23 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/799608#799608

--------------------------------------------------------------
Hi Thomas
no, I have not solved my issue, and I don't restart my server before completing a task!
Now can't test roxy's suggestion, I'll try it as soon as possible.

bye
Laura
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799608#799608]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-05-30 14:40:38 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/820433#820433

--------------------------------------------------------------
Hi everybody!!
Today I was trying to face this issue again, but I'm confused about how to get the human task's WorkitemManager!

Can anyone help me??
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820433#820433]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shobhit Tyagi
2013-05-30 15:35:38 UTC
Permalink
Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/820443#820443

--------------------------------------------------------------
Are you asking how to get the workItem manager for the human task?

First we get the session and create a human task workItem handler and feed the session to it.
Next we use the session to get teh workitem manager.

objTaskHandler = new HornetQHTWorkItemHandler(objKSession);
   objTaskHandler.setIpAddress(strIpAddress);
   objTaskHandler.setPort(intPort);
   WorkItemManager objWiMgr = objKSession.getWorkItemManager();

Regards.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820443#820443]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-05-30 15:40:33 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/820445#820445

--------------------------------------------------------------
emh.... how to get the session???
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820445#820445]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shobhit Tyagi
2013-05-30 17:13:06 UTC
Permalink
Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/820461#820461

--------------------------------------------------------------
Well i create a new session.

JPAKnowledgeService.newStatefulKnowledgeSession(.......).

But if you wanna load a previous session,
you could use

JPAKnowledgeService.loadStatefulKnowledgeSession(........) (I dont remember the exact name of the method.. i think its the same.)

Regards.

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820461#820461]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-03 14:55:15 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821029#821029

--------------------------------------------------------------
I know I should load teh session using the sessionId, but I don't know how to get the session id....
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821029#821029]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shobhit Tyagi
2013-06-03 17:08:19 UTC
Permalink
Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821062#821062

--------------------------------------------------------------
Well I dont know if there is jBPM API for that, but what you can do is to have an external source to map the process instance id and the session id. May be in a file or a db table. Both process instance id and the session id you can get when you start the process.

Regards.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821062#821062]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-06-04 01:29:45 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821123#821123

--------------------------------------------------------------
Hi Laura delli Paoli,

If you use persistence, you can get the Session Id from the Task table, there is a field called processSessionId that stores the sessionId.


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821123#821123]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-06 11:07:17 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821670#821670

--------------------------------------------------------------
ok, yhanks :D

I write this lines to complete workItem (before completing task):

KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
knowledgeBuilder.add(ResourceFactory.newFileResource(processPath), ResourceType.BPMN2);
KnowledgeBase knowledgeBase = knowledgeBuilder.newKnowledgeBase();
StatefulKnowledgeSession ksession = JBPMHelper.loadStatefulKnowledgeSession(knowledgeBase, sessionId);
ksession.getWorkItemManager().completeWorkItem(workItemId, null);

13:04:01,349 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (Thread-66) HHH000299: Could not complete schema update: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown table 'sequences' in information_schema
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.Connection.execSQL(Connection.java:3277) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.Connection.execSQL(Connection.java:3206) [mysql-connector-java-5.0.8-bin.jar:]
  at com.mysql.jdbc.Statement.executeQuery(Statement.java:1232) [mysql-connector-java-5.0.8-bin.jar:]
  at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:340)
  at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:149) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:70) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:63) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:196) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]
  at org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:147) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]
  at eu.discoveryreply.applicationLayer.controller.Controller.completeWorkItem(Controller.java:145) [classes:]
  at eu.discoveryreply.applicationLayer.controller.Controller.grantProcess(Controller.java:117) [classes:]
  at eu.discoveryreply.applicationLayer.controller.Controller.run(Controller.java:67) [classes:]


13:04:01,883 WARN  [org.hibernate.ejb.internal.EntityManagerFactoryRegistry] (Thread-66) HHH000436: Entity manager factory name (org.jbpm.persistence.jpa) is already registered.  If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
13:04:01,884 INFO  [bitronix.tm.BitronixTransactionManager] (Thread-66) Bitronix Transaction Manager version 2.1.2
13:04:01,889 ERROR [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) Error while starting/stopping Controller.: bitronix.tm.utils.InitializationException: initialization failed, cannot safely start the transaction manager
  at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:79) [btm-2.1.2.jar:2.1.2]
  at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:62) [btm-2.1.2.jar:2.1.2]
  at org.jbpm.test.JBPMHelper.createEnvironment(JBPMHelper.java:131) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:149) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]
  at eu.discoveryreply.applicationLayer.controller.Controller.completeWorkItem(Controller.java:145) [classes:]
  at eu.discoveryreply.applicationLayer.controller.Controller.grantProcess(Controller.java:117) [classes:]
  at eu.discoveryreply.applicationLayer.controller.Controller.run(Controller.java:67) [classes:]
Caused by: java.nio.channels.OverlappingFileLockException
  at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) [rt.jar:1.7.0_19]
  at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) [rt.jar:1.7.0_19]
  at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) [rt.jar:1.7.0_19]
  at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:70) [btm-2.1.2.jar:2.1.2]
  at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:151) [btm-2.1.2.jar:2.1.2]
  at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:62) [btm-2.1.2.jar:2.1.2]
  ... 6 more


13:04:31,934 INFO  [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) Selected process: 123
13:04:31,958 INFO  [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) Task to Run: 121
13:04:31,959 INFO  [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) SessionId: 133
13:04:32,044 ERROR [stderr] (Thread-65) org.jbpm.task.service.PermissionDeniedException: User '[User:'john']' was unable to execution operation 'Start' on task id 121 due to a no 'current status' match
13:04:32,046 ERROR [stderr] (Thread-65) at org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:311)
13:04:32,050 ERROR [stderr] (Thread-65) at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:426)
13:04:32,054 ERROR [stderr] (Thread-65) at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:90)
13:04:32,055 ERROR [stderr] (Thread-65) at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43)
13:04:32,059 ERROR [stderr] (Thread-65) at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104)
13:04:32,060 ERROR [stderr] (Thread-65) at java.lang.Thread.run(Thread.java:722)
13:04:32,060 ERROR [org.jbpm.task.service.TaskServerHandler] (Thread-65) User '[User:'john']' was unable to execution operation 'Start' on task id 121 due to a no 'current status' match: org.jbpm.task.service.PermissionDeniedException: User '[User:'john']' was unable to execution operation 'Start' on task id 121 due to a no 'current status' match
  at org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:311) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:426) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:90) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
  at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_19]
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821670#821670]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-06-06 12:02:49 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821687#821687

--------------------------------------------------------------
Is this issues faced using the same sample initially provided by you?
It seems that you are using hornetq as a HT engine but it should not be a problem.
I  think the task is not getting claimed by user.   There are possible reasons for it.

One of them beging you somehow creating multiple entity manager.

Also refer link https://community.jboss.org/thread/197824 https://community.jboss.org/thread/197824
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821687#821687]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-06 12:24:26 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821692#821692

--------------------------------------------------------------
No I don't create any entity manager there. I only create an entity manager when launching the jBPM process.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821692#821692]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashish T
2013-06-06 12:42:59 UTC
Permalink
Ashish T [https://community.jboss.org/people/ashpcs] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821703#821703

--------------------------------------------------------------
We faced similar issue in our application. we were claiming the task and completing it immediately.  Here I believe by the time JBPM engine was notifying HT server about claiming the task we were issuing task complete  command to JBPM engine. That was our analysis as in real scenario user  should first  claim the task then work on it  and then complete the task.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821703#821703]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-06 12:50:45 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821708#821708

--------------------------------------------------------------
Im my application this problem happens only sometimes, what about your case??
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821708#821708]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-06 13:04:31 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821716#821716

--------------------------------------------------------------
I cannot claim the task before starting it, likely because my taks is already reserved to user john...

15:02:12,792 ERROR [stderr] (Thread-65) org.jbpm.task.service.PermissionDeniedException: User '[User:'john']' was unable to execution operation 'Claim' on task id 123 due to a no 'current status' match
15:02:12,793 ERROR [stderr] (Thread-65)           at org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:311)
15:02:12,793 ERROR [stderr] (Thread-65)           at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:426)
15:02:12,794 ERROR [stderr] (Thread-65)           at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:90)
15:02:12,795 ERROR [stderr] (Thread-65)           at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43)
15:02:12,795 ERROR [stderr] (Thread-65)           at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104)
15:02:12,796 ERROR [stderr] (Thread-65)           at java.lang.Thread.run(Thread.java:722)
15:02:12,796 ERROR [org.jbpm.task.service.TaskServerHandler] (Thread-65) User '[User:'john']' was unable to execution operation 'Claim' on task id 123 due to a no 'current status' match: org.jbpm.task.service.PermissionDeniedException: User '[User:'john']' was unable to execution operation 'Claim' on task id 123 due to a no 'current status' match
          at org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:311) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
          at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:426) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
          at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:90) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
          at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:43) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
          at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:104) [jbpm-human-task-hornetq-5.4.0.Final.jar:5.4.0.Final]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_19]


15:02:32,730 INFO  [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) ***@264d5d94 > task claimed
15:02:32,745 INFO  [eu.discoveryreply.applicationLayer.controller.Controller] (Thread-66) Task 123 is not "InProgress" yet! It is still in Status Reserved
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821716#821716]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Laura delli Paoli
2013-06-06 13:25:17 UTC
Permalink
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Re: jBPM straying after user task completed"

To view the discussion, visit: https://community.jboss.org/message/821728#821728

--------------------------------------------------------------
UPDATE:
On process blocks workitem entry is not deleted from workiteminfo table
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821728#821728]

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