Daniel Hernáez [https://community.jboss.org/people/herna] created the discussion

"jBPM 5: how to remove or change a completed task?"

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

--------------------------------------------------------------
let's see if you can give me a hand. Thanks in advance.


I am developing a web application that manage invoices through a workflow with 
different states. I am using jBPM 5 for that purpose and the way I launch one 
specific invoice through workflow is next:


getTaskService().activate(taskId, userId);
getTaskService().claim(taskId, userId);
getTaskService().start(taskId, userId);
getTaskService().complete(taskId, userId, taskContentData);
My problem is the fourth instruction and regards with transactionality. I have 
a utility class that performs operations once the invoice is processing through 
its workflow, and if this class throws and exception, the jBPM invoice task 
remains as 'Completed' when it shouldn't.


My question is: how do I proceed in this situation? I want that 4 previous 
instructions go in only one transaction, or at least that task status doesn't 
change to 'Completed' if one exception arises, but this is controlled by jBPM 
and it doesn't seem easy. Should I try to change task status from 'Completed' 
to 'Created' again? Or make a new task with status 'Created'?
--------------------------------------------------------------

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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to