Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3346

Not able to add task reassignment through TaskEventListener.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.10.0.GA
    • 7.9.0.GA
    • jBPM Core
    • False
    • False
    • CR1
    • ?
    • Undefined
    • ---
    • ---

      Not able to add task reassignment(reassignWhenNotStarted) through TaskEventListener but it fails with exception: 
       
       

      WARN  [org.jbpm.services.task.persistence.TaskTransactionInterceptor] (default task-8) Could not commit session: java.lang.UnsupportedOperationException
       at java.util.AbstractList.add(AbstractList.java:148)
       at java.util.AbstractList.add(AbstractList.java:108)
       at org.hibernate.collection.internal.PersistentBag.add(PersistentBag.java:411)
       at org.jbpm.kie.services.impl.admin.commands.ScheduleTaskDeadlineCommand.execute(ScheduleTaskDeadlineCommand.java:69)  

       
      TaskEventListener code:
       
       

      import org.jbpm.services.api.admin.UserTaskAdminService;
      import org.jbpm.services.api.service.ServiceRegistry;    
          public void afterTaskActivatedEvent(TaskEvent event) {
              // TODO Auto-generated method stub
      UserTaskAdminService adminTaskService = (UserTaskAdminService) ServiceRegistry.get().service(ServiceRegistry.USER_TASK_ADMIN_SERVICE);
      
      adminTaskService.reassignWhenNotStarted(event.getTask().getId(), "60s", TaskModelProvider.getFactory().newUser("user1"));
          }
      

       

              ftirados Francisco Javier Tirado Sarti
              rhn-support-abhumbe Abhijit Humbe
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: