[jboss-user] [jBPM] - Re: Transaction Problems jBPM5

roxy1987 do-not-reply at jboss.com
Thu Feb 7 12:14:37 EST 2013


roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Transaction Problems jBPM5"

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

--------------------------------------------------------------
Thanks Guys. Really helpful answers.
I tried to use the HornetQTaskHandler instead of MinaTaskHandler. I guess the transactions are managed in the human task war as i didnot write any transaction in the code and yet it works and everything.
Just another question not regarding the transactions but the HornetQHandler. I started the process and the task goes in to the Created state and is not assigned to the user that I have specified in the process definition. Is it working correctly? If yes then how do I make sure that immediately when the process starts, the task is assigned to the user and is not in Created state but in Reserved state. 

And the same thing happens when I complete the task. If I start a process using MinaTaskHandler, it assigns the task to the user. I complete the task using HornetQ but it completes the task and the next task is not assigned. Next task stays in the Created state. I might be missing some piece of code here?

This is what I do to complete a task : 


public static void completeTask(long taskId, String userId) throws Exception
 {
  String name = "client 1"+UUID.randomUUID();
  TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
  BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
  ContentData contentData = null;
  client.connect(ipAddress, port);
  try
  {
   client.complete(taskId, userId, contentData, responseHandler);
   responseHandler.waitTillDone(5000);
  }
  catch(Exception e)
  {
   BpmExceptionHandler.handleException(e);
  }
  finally
  {
   if(client != null)
    client.disconnect();
  }
 }
 
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130207/24b09298/attachment.html 


More information about the jboss-user mailing list