0 Replies Latest reply on Sep 12, 2012 9:17 AM by Alessandro Dionisi

    Assign task to groups at runtime

    Alessandro Dionisi Newbie

      Hi all,

      Anyone knows how to reassign a task to group when the task is in states Ready, Reserved or InProgress?

      In our scenario this can happen when a user has a reserved task but the business administrator at some point can change the assignment to a group.

      I tried with the following methods:

      • delegate: produces the following error: Error java.lang.RuntimeException: Command OperationRequest faild due to org.jbpm.task.Group cannot be cast to org.jbpm.task.User. Please contact task server administrator.
      • nominate and forward: produces: unexpected end of subtree [select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, actualOwner, createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) from org.jbpm.task.Task t left join t.taskData.createdBy as createdBy left join t.taskData.actualOwner as actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, org.jbpm.task.OrganizationalEntity potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in () ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null]

       

      Do you have some advices?

       

      P.S. I'm using JBPM 5.4.0-SNAPSHOT.