@Test void testIsProcessInErrorState() { Mockito.when(flowableFacade.hasDeadLetterJobs(PROCESS_ID)) .thenReturn(true); Assertions.assertEquals(State.ERROR, processHelper.computeProcessState(PROCESS_ID)); }
public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINISHED; }
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINISHED; } }
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINISHED; } @Inject  ProcessHelper(FlowableFacade flowableFacade, HistoricOperationEventService historicOperationEventService); }
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINISHED; } @Inject  ProcessHelper(FlowableFacade flowableFacade, HistoricOperationEventService historicOperationEventService); Operation.State computeProcessState(String processId); List<HistoricOperationEvent> getHistoricOperationEventByProcessId(String processId); }
ProcessHelper { public Operation.State computeProcessState(String processId) { if (isInAbortedState(processId)) { return State.ABORTED; } if (isInErrorState(processId)) { return State.ERROR; } if (isInReceiveTask(processId)) { return State.ACTION_REQUIRED; } if (isInRunningState(processId)) { return State.RUNNING; } return State.FINISHED; } @Inject  ProcessHelper(FlowableFacade flowableFacade, HistoricOperationEventService historicOperationEventService); Operation.State computeProcessState(String processId); List<HistoricOperationEvent> getHistoricOperationEventByProcessId(String processId);  }