@Test void testPostExecutionStep() { Mockito.when(context.getVariable(Variables.TASK_ID)) .thenReturn(TASK_GUID); FlowElement flowElement = Mockito.mock(SubProcess.class); Mockito.when(execution.getCurrentFlowElement()) .thenReturn(flowElement); processStepHelper.postExecuteStep(context, StepPhase.DONE); Mockito.verify(processLogsPersister) .persistLogs(CORRELATION_GUID, TASK_GUID); Mockito.verify(context) .setVariable(Variables.STEP_EXECUTION, StepPhase.DONE.toString()); }
protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); context.setVariable(Variables.STEP_EXECUTION, state.toString()); }
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); context.setVariable(Variables.STEP_EXECUTION, state.toString()); } }
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); context.setVariable(Variables.STEP_EXECUTION, state.toString()); }  }
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); context.setVariable(Variables.STEP_EXECUTION, state.toString()); }  void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOperationEvents); abstract ProgressMessageService getProgressMessageService(); abstract ProcessLogsPersister getProcessLogsPersister(); abstract StepLogger getStepLogger(); abstract ProcessEngineConfiguration getProcessEngineConfiguration(); abstract ProcessHelper getProcessHelper(); }
ProcessStepHelper { protected void postExecuteStep(ProcessContext context, StepPhase state) { logDebug(MessageFormat.format(Messages.STEP_FINISHED, context.getExecution() .getCurrentFlowElement() .getName())); getProcessLogsPersister().persistLogs(context.getVariable(Variables.CORRELATION_ID), context.getVariable(Variables.TASK_ID)); context.setVariable(Variables.STEP_EXECUTION, state.toString()); }  void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOperationEvents); abstract ProgressMessageService getProgressMessageService(); abstract ProcessLogsPersister getProcessLogsPersister(); abstract StepLogger getStepLogger(); abstract ProcessEngineConfiguration getProcessEngineConfiguration(); abstract ProcessHelper getProcessHelper();  }