pefernan opened a new issue, #7334:
URL: https://github.com/apache/incubator-kie/issues/7334

   ### Describe the bug
   
   `UserTaskInstanceJobExecutor` in `jobs-common-embedded` decides which jobs 
it handles like this:
   
   ```
   @Override
   public boolean accept(JobDetails jobDetails) {
       return JobDetailsHelper.extractJobDescription(jobDetails) instanceof 
UserTaskInstanceJobDescription userTaskInstanceJobDescription
               && 
userTasks.userTaskIds().contains(userTaskInstanceJobDescription.id());
   }```
   
   `userTasks.userTaskIds()` (_DefaultUserTasks_) returns `userTasks.keySet()`, 
the ids of the user task definitions.
   `userTaskInstanceJobDescription.id()` is the job id. It is a random UUID, 
set by generateId() in `DefaultUserTaskInstance.toJobDescriptio`n and by 
UUID.randomUUID() in the suspend lifecycle (`WsHumanTaskLifeCycle`).
   The two never match, so accept() returns false for every user task job and 
no executor handles them.
   
   The sibling executors don't have this problem. ProcessInstanceJobExecutor 
and ProcessJobExecutor compare processes.processIds() with the description's 
processId().
   
   **Actual behavior**
   
   With the embedded jobs add-on, jobs that target a user task instance are 
scheduled but never run:
   
   not-started and not-completed notification deadlines
   reassignments
   suspend-until timers
   The job stays SCHEDULED and the task is never notified or reassigned.
   
   **Expected behavior**
   
   The executor accepts jobs for user task instances and runs them, so 
deadlines, reassignments and suspend-until timers fire.
   
   **How to Reproduce?**
   
   This was found by code review and I haven't run it end to end yet.
   
   - Add the embedded jobs add-on (for example 
kogito-addons-quarkus-embedded-jobs) to a process project.
   - Deploy a process with a user task that has a not-started notification 
deadline, for example after 1 second.
   - Start the process and leave the task unclaimed.
   - List the jobs of the process instance. The deadline job stays SCHEDULED 
and never becomes EXECUTED.
   
   ### Expected behavior
   
   _No response_
   
   ### Actual behavior
   
   _No response_
   
   ### How to Reproduce?
   
   _No response_
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### GraalVM version (if different from Java)
   
   _No response_
   
   ### Kogito version or git rev (or at least Quarkus version if you are using 
Kogito via Quarkus platform BOM)
   
   _No response_
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to