camunda-bpm-platform icon indicating copy to clipboard operation
camunda-bpm-platform copied to clipboard

Populate `processInstanceId` for execution jobs when `invocationsPerBatchJob=1`

Open yanavasileva opened this issue 11 months ago • 1 comments

Acceptance Criteria (Required on creation)

  • [ ] Populate process instance id (and process definition id where possible) for jobs
    • In case invocationsPerBatchJob=1 (jobConfiguration.getIds() != null && jobConfiguration.getIds().size() == 1)
      • Set the processInstanceId to the job.
      • Set the processDefinitionId to the job Edit: if the information is already available in the batch's configuration, at the moment only for restart batches. (That way the job logs will be visible in the Historic Process Definition page, Job log view.)
      • Code: org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler.createJobEntities(BatchEntity, T, String, List<String>, int)
  • [ ] Clean up the process instance population that is already done for some type of batches in org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler.postProcessJob(T, JobEntity, T)

Hints

  • Keep in mind that this implementation needs to be adopted by the users implementing custom batches

Links

  • depended on
    • https://github.com/camunda/camunda-bpm-platform/issues/4198
    • https://github.com/camunda/camunda-bpm-platform/issues/4200
    • https://github.com/camunda/camunda-bpm-platform/issues/4201
    • https://github.com/camunda/camunda-bpm-platform/issues/4209
    • https://github.com/camunda/camunda-bpm-platform/issues/4216
    • https://github.com/camunda/camunda-bpm-platform/issues/4215

Breakdown

### Pull Requests
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4334

yanavasileva avatar Mar 22 '24 12:03 yanavasileva