[jboss-user] [jBPM] - [jbpm5] how to restart a completed usertask

jeffery jeffery do-not-reply at jboss.com
Mon Oct 31 22:38:16 EDT 2011


jeffery jeffery [http://community.jboss.org/people/aronjiao] created the discussion

"[jbpm5] how to restart a completed usertask"

To view the discussion, visit: http://community.jboss.org/message/634358#634358

--------------------------------------------------------------
Hi,
I have a question about how to restart a completed usertask.
It means  when a usertask is completed,its status is 'completed' in database.
In my javacode,I got the completed usertask by taskid.

   BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();
   BlockingGetTaskResponseHandler response = new BlockingGetTaskResponseHandler();
   taskClient.getTask(8, response);
   Task task1 = response.getTask();


then I tried to start the task again.......

   BlockingTaskOperationResponseHandler taskOperationHandler = new BlockingTaskOperationResponseHandler();
   taskClient.start(task1.getId(), "john", taskOperationHandler);
   taskOperationHandler.waitTillDone(1000);

but exception occured:


org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'john']' was unable to execution operation 'Start' on task id 8 due to no 'current status' matchines
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at org.jbpm.task.service.responsehandlers.AbstractBaseResponseHandler.createSideException(AbstractBaseResponseHandler.java:74)
 at org.jbpm.task.service.responsehandlers.AbstractBlockingResponseHandler.waitTillDone(AbstractBlockingResponseHandler.java:48)
 at RollBaskTest.main(RollBaskTest.java:105)



because the status was not 'Reserved' so I counld not use the method start() to restart it.

is there anyway to change the completed usertask's status(from completed to reserved)

Looking forward for your guidance.
Thank you!

Jeffery
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[http://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/20111031/486b99a0/attachment.html 


More information about the jboss-user mailing list