1 Reply Latest reply on Feb 25, 2014 9:17 AM by Andreas G.

    getTasksByVariousFields - claim Task does not work

    Andreas G. Novice

      Hello!

       

      In my process defintion my task is assigned to a user.

       

           <userTask id="UserTask_1" name="User Task 1">

            <incoming>tns:_1-_2</incoming>

            <outgoing>tns:SequenceFlow_1</outgoing>

            <potentialOwner>

              <resourceAssignmentExpression>

                <formalExpression>andi</formalExpression>

              </resourceAssignmentExpression>

            </potentialOwner>

          </userTask>

       

      I get the task by methode getTasksByVariousFields of TaskService - taskService.getTasksByVariousFields(null, null, processInstancIdList, null, null, null, null, false);

      If I try to claim the task I get an exception of type PermissionDeniedException. Error message: User '[UserImpl:'andi']' was unable to execution operation 'Claim' on task id 1 due to a no 'current status' match.

       

      The weird thing is, that if I get the task by methode getTasksAssignedAsPotentialOwner("andi", "en-UK") i can claim the task altough I get the same TaskSummary-Object. All attributes have the same values.

       

      What is the reason for that?

       

      Thanks for your help

      Andi