I have scheduler, which must delete “expired” process instances (active more than 2 months). In this case i need to use runtimeService (delete process instance method). But this delete method have 2 parameters: ProcessInstanceId, DeleteReason. So, can i somehow select processInstanceId by criteria: if the process exists for more than two months, get processInstanceId of this process
To help simplify your setup, have you looked at using a Non-Interrupting Event Sub Process that has a Timer of the 2 months and have that point to a Terminating End Event
To help simplify your setup, have you looked at using a Non-Interrupting Event Sub Process that has a Timer of the 2 months and have that point to a Terminating End Event
@StephenOTT When I try to create a query to get a list of processes by start time, an exception is thrown: historyService.createHistoricProcessInstanceQuery().active().orderByProcessInstanceStartTime().list();
Message: Invalid query: call asc() or desc() after using orderByXX(): direction is null
Maybe someone will find this usefull: active instances are not suspended. An unfinished instance may be active or suspended. A finished instance has an end time and is neither unsuspend nor active.