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

Warning in "BAMTaskEventListener" if task is skipped from task event listener

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.9.0.GA
    • 7.7.1.GA
    • Kie-Server
    • Release Notes
    • CR1
    • -
    • Workaround Exists
    • Hide

      Skip the task using REST API or java client.

      Show
      Skip the task using REST API or java client.
    • Hide

      1) Create a sample process with Human task.

      2) Add customTaskEventlistener with code to skip tasks in "afterTaskAddedEvent" to the project.

      @Override
       public void afterTaskAddedEvent(TaskEvent event) {
      
       if (event.getTask().getTaskData().getActualOwner() != null) {
       String owner = event.getTask().getTaskData().getActualOwner().toString();
      }
      
       
      
      RuntimeEngine runtimeEngine = this.runtimeManager.getRuntimeEngine(ProcessInstanceIdContext.get(Long.valueOf(event.getTask().getTaskData().getProcessInstanceId())));
      
       TaskService taskService = runtimeEngine.getTaskService();
       
       taskService.skip(event.getTask().getId().longValue(), owner);
      
      
      
      }
      

      3) Deploy the project and create a new process instance.

      4) Will get below warning in the logs. Although task is skipped successfully.

      2020-07-17 05:33:28,898 WARN [org.jbpm.services.task.lifecycle.listeners.BAMTaskEventListener] (default task-60) Unable find bam task entry for task id 1 'task', skipping bam task update
      

       

      Show
      1) Create a sample process with Human task. 2) Add customTaskEventlistener with code to skip tasks in "afterTaskAddedEvent" to the project. @Override public void afterTaskAddedEvent(TaskEvent event) { if (event.getTask().getTaskData().getActualOwner() != null ) { String owner = event.getTask().getTaskData().getActualOwner().toString(); }   RuntimeEngine runtimeEngine = this .runtimeManager.getRuntimeEngine(ProcessInstanceIdContext.get( Long .valueOf(event.getTask().getTaskData().getProcessInstanceId()))); TaskService taskService = runtimeEngine.getTaskService(); taskService.skip(event.getTask().getId().longValue(), owner); } 3) Deploy the project and create a new process instance. 4) Will get below warning in the logs. Although task is skipped successfully. 2020-07-17 05:33:28,898 WARN [org.jbpm.services.task.lifecycle.listeners.BAMTaskEventListener] (default task-60) Unable find bam task entry for task id 1 'task', skipping bam task update  
    • 2020 Week 34-36 (from Aug 17)

      Observing below warning if task is skipped from task vent listener.

      ~~~
      2020-07-17 05:33:28,898 WARN [org.jbpm.services.task.lifecycle.listeners.BAMTaskEventListener] (default task-60) Unable find bam task entry for task id 1 'task', skipping bam task update
      ~~~

      It looks like the issue only happens if skip tasks from the task event listeners.

      Case 1 -: When the task is skipped using java client then Warning doesn't appear
      ---------

      userTaskClient.skipTask(containerId, 1l, USER);

      Case 2 -: When the task is skipped using REST API then also Warning doesn't appear
      --------

      http://localhost:8080/kie-server/services/rest/server/containers/task-poc_1.0.3/tasks/1/states/skipped

      Case 3 -: But warning appears when the task is attempted using task service implementation on "afterTaskAddedEvent" although the task is getting skipped successfully.
      ---------

      taskService.skip(event.getTask().getId().longValue(), owner);

       

      Although the task is getting skipped, why is throwing Warning while skipping.

              elguardian@gmail.com Enrique González Martínez (Inactive)
              rhn-support-sudnair Sudhish Nair
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: