Abhitocode opened a new pull request, #2241: URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2241
After the recent changes incase of start timer and job scheduling related to issue [DBACLD-173029](https://jsw.ibm.com/browse/DBACLD-173029) (linked [PR](https://github.com/apache/incubator-kie-kogito-runtimes/pull/3890))the timer job is being scheduled and executed successfully. However, the process instance fails to start, and following error is observed the logs: 2025-05-21 15:15:52,959 ibm-pf4qvnm2 INFO [org.kie.kogito.jobs.service.job.DelegateJob:79] (vert.x-eventloop-thread-0) Job execution response processing has finished: JobExecutionResponse[message='job cannot be processed', code='401', timestamp=2025-05-21T15:15:52.919527400-03:00[America/Toronto], jobId='d5d9f788-fe54-44d3-a04a-039d96b5addd'] The job callback might be missing required information to properly invoke the process instance. --- What I found: execute method of EmbeddedJobExecutor method was executing with JobDetails with jobDescription(data/payload) of type processJobDescription. But there were no implementation to process jobDescription of type ProcessJobDescription. So it was giving 401, Job cannot be processed response. Solution: Added a separate condition to process jobDetails of type ProcessJobDescription like ProcessInstanceJobDescription. Doubt: As no process instance level information like process instance id/timer id is not available for ProcessJobDescription, not able to use TriggerJobCommand since we don't have processInstanceId and timerId. So directly called the signal method on the process object like, ``` Supplier<Boolean> execute = () -> executeInUnitOfWork(application.unitOfWorkManager(), () -> { process.send(SignalFactory.of("timerTriggered", processJobDescription.expirationTime())); return true; }); ``` Is that expected? I mean can something like this be done? After adding the above, got success response as in the below log ``` (executor-thread-1) Job execution success response received: JobExecutionResponse[message='job cannot be processed', code='401', timestamp=2025-07-15T00:05:59.323287100-04:00[America/Toronto], jobId='fb3fc4f3-5c33-4897-a5a2-0841ea094ebb'] 2025-07-15 00:05:59,376 ibm-pf4qvnm2 DEBUG [org.kie.kogito.jobs.embedded.JobInVMEventPublisher:80] (vert.x-eventloop-thread-0) publishJobStatusChange JobDetails[id='fb3fc4f3-5c33-4897-a5a2-0841ea094ebb', correlationId='fb3fc4f3-5c33-4897-a5a2-0841ea094ebb', status=SCHEDULED, lastUpdate=2025-07-15T04:05:59.363192Z[UTC], retries=0, executionCounter=12, scheduledId='6', recipient=RecipientInstance{recipient=InVMRecipient [data=InVMPayloadData [data=null]]}, trigger=org.kie.kogito.timer.impl.SimpleTimerTrigger@12a414ca, executionTimeout=null, executionTimeoutUnit=null, created=2025-07-15T02:27:50.955862Z[UTC]] ``` Still we can see few getting 401, job cannot be processed error response as execute method of EmbeddedJobExecutor method as executing with JobDetails with null payload/data/job details -- 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]
