camunda-bpm-platform
camunda-bpm-platform copied to clipboard
Introduce `restartedByBatch(batchId)` filter criteria for historic process instance query
Acceptance Criteria (Required on creation)
- [ ] Extend the historic process instance query (
HistoricProcessInstanceQuery
) with#restartedByBatch(String batchId)
filter criteria- filter historic process instances that has an old process instance which is related to job log related to the restart batch
- [ ] Expose changes in REST API
- [ ] document in OpenAPI
Hints
- query idea:
SELECT from ACT_HI_PROCINST RES join ACT_HI_JOB_LOG JL where JL.batchId = param.batchId and RES.restarted_proc_inst_id =JL.PROCESS_INSTANCE_ID_
- there will be more than one job log use the “exists” structure - Code:
-
org.camunda.bpm.engine.history.HistoricProcessInstanceQuery
-
engine\src\main\resources\org\camunda\bpm\engine\impl\mapping\entity\HistoricProcessInstance.xml
-
org.camunda.bpm.engine.rest.dto.history.HistoricProcessInstanceQueryDto
-
- ❓ HPI supports OR queries, can/do we want the filter be supported for both
AND
andOR
queries? - Add to javadoc hint for: If there’s a performance issue, the user needs to clean up their history tables.
Links
Breakdown
### Pull Requests
I am working on this one