RuntimeService.deleteProcessInstance loses deleteReason

Description

When providing a custom deleteReason to RuntimeService.deleteProcessInstance, this delete reason is lost after the ProcessInstance has been terminated (i.e., immediately) as the HistoricProcessInstance does not provide a corresponding field within its database schema.

The attached patch corrects this by adding a column for the delete reason (for all supported DBMSs including migrations from 5.8 to 5.9), modifying the result mapping and insert statements and extending the HistoricProcessInstance interface accordingly.

A JUnit test case is also included.

Environment

None

Assignee

Daniel Meyer (camunda)

Reporter

Thilo-Alexander Ginkel

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure