JBoss Community

Re: Human tasks : LocalTaskService JTA issue

created by Miloud Haimoune in jBPM - View the full discussion

After some debugging I found that this exception happened in this conditions:

 

when closing the process instance (reaching the End transition), the TaskServiceSession is called to skip the active human task

 

there is one human task but claimed by a user and the following exception happens.

 

org.jbpm.task.service.PermissionDeniedException: User '[User:'Administrator']' was unable to execution operation 'Skip' on task id 21 due to a no 'current status' match

 

the transaction is marked to rollback, status STATUS_MARKED_ROLLBACK because I'm using Jboss 5 transaction manager

 

this method is called after

 

private void doOperationInTransaction(final TransactedOperation operation) {

....

if (ut.getStatus() == javax.transaction.Status.STATUS_NO_TRANSACTION) {

.....

} else {

            em.joinTransaction();

 

trying to join a transaction in status  MARKED_ROLLBACK which explains the exception "No active JTA transaction on joinTransaction call"

 

after that I added the code to complete the task successfully. but the TaskServiceSession still excute the skip task, where there is no human tasks.

 

I dont have this probelm if I don't restart the ksession.

 

Thanks.

Reply to this message by going to Community

Start a new discussion in jBPM at Community