1 Reply Latest reply on Mar 20, 2013 9:29 PM by Ouadi BELMOKHTAR

    No current status match exception.

    Dsire krish Newbie

      I need to get the tasks by status and then start them.

      But at some times while retrieveing the tasks im getting the started process id as well and thats in where im getting this exception.


      org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'admin']' was unable to execution operation 'Start' on task id 287271 due to a no 'current status' match

           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

       

      My mina task handler is running in jboss and the application uses its client to the task operations.

       

      Retrieveing tasks by status:

       

      BlockingTaskSummaryResponseHandler resHandler = new BlockingTaskSummaryResponseHandler();

                                              List<Status>statusls=new ArrayList<Status>();

                                              statusls.add(Status.Reserved);

                                              client.getTasksAssignedAsPotentialOwnerByStatus("admin",statusls,  "en-UK", resHandler);

       

      Starting the task:

       

           BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();

                          client.start(taskId, userId, responseHandler);

       

      Is there any thing to do with hibernate or what should i take care to eliminate this replication.?

        • 1. Re: No current status match exception.
          Ouadi BELMOKHTAR Newbie

          Hi Dsire krish

          Maybe its too late but i wanna share my solution for others

           

          I had the same issue but i solve the problem by modifing

           

          jbpm-human-task-core-5.4.0.Final.jar : org/jbpm/task/service/operations-dsl.mvel

           

          file

          You can change the operation requirements in this file

           

          Operation.Start

                  : [ new OperationCommand().{

                          status = [ Status.Ready ],

                          allowed = [ Allowed.PotentialOwner ],

                          setNewOwnerToUser = true,

                          newStatus = Status.InProgress

                      },

                      new OperationCommand().{

                          status = [ Status.Reserved ],

                          allowed = [ Allowed.Owner, Allowed.PotentialOwner ], 

                          newStatus = Status.InProgress

                      } ],    

           

          this solved my problem.