berg8201 commented on issue #7274:
URL: https://github.com/apache/incubator-kie/issues/7274#issuecomment-6734872444

   Thanks for looking into this. Our reproducer uses the instance-level error 
retry, rather than the node-level retrigger endpoint.
   
   We call the embedded Data Index GraphQL mutation:
   
   mutation { ProcessInstanceRetry(id: "<child-instance-id>") }
   
   In the released 10.2.0 embedded stack, 
KogitoAddonRuntimeClient.retryProcessInstance calls 
pInstance.error().get().retrigger() directly within the process operation/UoW. 
The reproducer does not call POST .../nodeInstances/{nodeInstanceId}.
   
   From our reading of ProcessError.retrigger in AbstractProcessInstance, it 
first looks up the failed node by instance ID, then resolves a replacement 
through getByNodeDefinitionId and triggers it. The recorded failed WorkItem 
instance ID is no longer present after rollback. The persisted async wrapper 
has a different ID, so it is not picked up by the cancellation condition.
   
   Regarding your second question: yes, the old wrapper still holds its 
original jobId. After the manual process retry succeeds, we see the following:
   - The original async wrapper remains in the child’s node collection, still 
referencing the original job.
   - The original job remains ERROR, with retries=3 and executionCounter=0.
   - A new job with a different ID is EXECUTED, with retries=0 and 
executionCounter=1.
   - The service receives four calls returning HTTP 500, followed by one 
returning HTTP 200.
   - The child reaches its normal EndNode, but both child and parent remain 
ACTIVE.
   To clarify, we have confirmed that the original ERROR job is still persisted 
and referenced by the wrapper. We have not confirmed that it still has a live 
scheduled or in-flight timer. ASYNC_WAITING is null in both our before and 
after snapshots, so the remaining wrapper appears to be the completion blocker 
rather than that flag.
   
   We also tested rescheduling the original ERROR job using JobReschedule, 
without calling ProcessInstanceRetry. That completed both child and parent on 
the same unmodified 10.2.0 runtime. We tested it through GraphQL and through 
Console 10.2.0 using Jobs > Reschedule > Now > Apply.
   
   That seems to work for this reproducer because it resumes the original 
continuation. One caveat: if ProcessInstanceRetry has already executed the 
service successfully and left the process ACTIVE, rescheduling the old job 
executes the service again. We would therefore not use it as a general repair 
for already stuck instances.
   
   Your findings are consistent with what we observed. It would be helpful to 
cover the instance-level error retry path in the regression test as well. The 
attached ChildWorkflow also reproduces the problem when started directly, 
without a parent or Call Activity.


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