@JsonIgnore
  public void configIgnoreFailureMode(StepAction action, WorkflowSummary summary) {
    ignoreFailureMode =
        action.getAction() == Actions.StepInstanceAction.KILL
            && (action.isWorkflowAction()
                || !(action.getWorkflowId().equals(summary.getWorkflowId())
                    && action.getWorkflowInstanceId() == summary.getWorkflowInstanceId()
                    && action.getWorkflowRunId() == summary.getWorkflowRunId()
                    && action.getStepId().equals(getStepId())));
  }
@Test
  public void testShouldIgnoreFailureMode() throws Exception {
    StepRuntimeSummary summary =
        loadObject(
            "fixtures/execution/sample-step-runtime-summary-1.json", StepRuntimeSummary.class);
    assertFalse(summary.isIgnoreFailureMode());

    StepAction stepAction = mock(StepAction.class);
    WorkflowSummary workflowSummary = mock(WorkflowSummary.class);

    when(stepAction.getAction()).thenReturn(Actions.StepInstanceAction.KILL);
    when(stepAction.isWorkflowAction()).thenReturn(true);
    summary.configIgnoreFailureMode(stepAction, workflowSummary);
    assertTrue(summary.isIgnoreFailureMode());

    when(stepAction.getAction()).thenReturn(Actions.StepInstanceAction.KILL);
    when(stepAction.isWorkflowAction()).thenReturn(false);
    when(stepAction.getWorkflowId()).thenReturn("wf1");
    when(workflowSummary.getWorkflowId()).thenReturn("wf2");
    summary.configIgnoreFailureMode(stepAction, workflowSummary);
    assertTrue(summary.isIgnoreFailureMode());

    when(stepAction.getAction()).thenReturn(Actions.StepInstanceAction.KILL);
    when(stepAction.isWorkflowAction()).thenReturn(false);
    when(stepAction.getWorkflowId()).thenReturn("wf1");
    when(stepAction.getWorkflowInstanceId()).thenReturn(123L);
    when(stepAction.getWorkflowRunId()).thenReturn(2L);
    when(stepAction.getStepId()).thenReturn("foo");
    when(workflowSummary.getWorkflowId()).thenReturn("wf1");
    when(workflowSummary.getWorkflowInstanceId()).thenReturn(123L);
    when(workflowSummary.getWorkflowRunId()).thenReturn(2L);
    summary.configIgnoreFailureMode(stepAction, workflowSummary);
    assertFalse(summary.isIgnoreFailureMode());

    when(stepAction.getAction()).thenReturn(Actions.StepInstanceAction.STOP);
    summary.configIgnoreFailureMode(stepAction, workflowSummary);
    assertFalse(summary.isIgnoreFailureMode());

    when(stepAction.getAction()).thenReturn(Actions.StepInstanceAction.SKIP);
    summary.configIgnoreFailureMode(stepAction, workflowSummary);
    assertFalse(summary.isIgnoreFailureMode());
  }