camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.1k stars 1.55k forks source link

Expose `restartedProcessInstanceId` for historic process instances #4214

Closed yanavasileva closed 3 weeks ago

yanavasileva commented 6 months ago

Acceptance Criteria (Required on creation)

Hints

Links

Breakdown

### Pull Requests
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4420
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4593
punitdarira commented 4 months ago

I am working on this one

punitdarira commented 4 months ago

Hi Yana, Since we are setting the property of restartedProcessInstanceId through StartProcessInstancesCmd, I think we can go ahead by setting it in StartProcessInstanceAtActivitiesCmd too. This way even the instances created through /process-definition/{id}/restart will have the property set. I am guessing the restart flow will never go through StartProcessInstancesCmd at least in the community edition as there is a validation of not null instructions.

This reminds me we need to update the documentation of /process-definition/{id}/restart. It says the field of instructions and instanceId is optional but in the code it validates for not null.

yanavasileva commented 4 months ago

Hi @punitdarira,

Good catch, only StartProcessInstanceAtActivitiesCmd matters for the restart batch operation so I will adjust the description. Thank you!

This reminds me we need to update the documentation of /process-definition/{id}/restart. It says the field of instructions and instanceId is optional but in the code it validates for not null.

If it's not a big change, feel free to incorporate it to one of your contributions or raise a task for it.

Best, Yana

tasso94 commented 4 weeks ago

Hey @psavidis,

It would be great to complete what @punitdarira already started and get it into the 7.22.0 release.

Best, Tassilo

psavidis commented 3 weeks ago

@punitdarira fork is merged to master. Thank you for your kind contribution. Closing this ticket.