Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9506

Not able to add task reassignment through TaskEventListener.

XMLWordPrintable

    • False
    • False
    • NEW
    • NEW
    • 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
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: