martinweiler commented on code in PR #3403:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3403#discussion_r1518312342


##########
quarkus/addons/jobs/common/rest-callback/src/main/java/org/kie/kogito/jobs/quarkus/common/CallbackJobsServiceResource.java:
##########
@@ -70,8 +73,8 @@ public Response triggerTimer(@PathParam(PROCESS_ID) String 
processId,
             return Response.status(Status.BAD_REQUEST).entity("Process id and 
Process instance id must be given").build();
         }
 
-        Process<?> process = processes.get().processById(processId);
-        if (process == null) {
+        Optional<Process<? extends Model>> process = 
processes.get().processByProcessInstanceId(processInstanceId);
+        if (process.isEmpty()) {

Review Comment:
   Two related test failures:
   ```
   [ERROR]   CallbackJobsServiceResourceTest.triggerTimerOK:137 
   expected: 200
    but was: 404
   [ERROR]   
CallbackJobsServiceResourceTest.triggerTimerProcessInstanceNotFound:126 
   expected: "Process instance with id PROCESS_INSTANCE_ID not found"
    but was: "Process with id PROCESS_ID not found"
   ```



-- 
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