@Override
 public StepExecutionStatus resumedItem(DtRunbookItem runbookItem) {
   StepExecutionStatus itemStatus =
       (StepExecutionStatus) execStatus.getItemStatus(runbookItem.getItemId());
   itemStatus.setComplete(false);
   itemStatus.setState(ExecState.RESUMED);
   store.update(itemStatus);
   return itemStatus;
 }
  @Override
  public StepExecutionStatus completedItem(DtRunbookItem runbookItem) {
    StepExecutionStatus itemStatus =
        (StepExecutionStatus) execStatus.getItemStatus(runbookItem.getItemId());
    itemStatus.setComplete(true);
    itemStatus.setEndTime(System.currentTimeMillis());
    System.out.println(
        '\n'
            + "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
    System.out.println("  Step : " + runbookItem.getId() + "  |  " + " COMPLETE");
    System.out.println(
        "-----------------------------------------------------------------------------------"
            + '\n');

    store.update(execStatus);
    return itemStatus;
  }
  @Override
  public void itemExecOnNodeDone(String itemId, String nodeId, int statusCode, String message) {
    synchronized (this) {
      if (statusCode != 0) {
        latestStepFailed = true;
      } else {
        if (!latestStepFailed) {
          latestStepFailed = false;
        }
      }

      if (emitOutput) {
        System.out.println(
            '\n'
                + ". - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . -");
        System.out.println(
            "  Node : "
                + nodeId
                + "  |  "
                + " "
                + (latestStepFailed ? "FAILED" : "SUCCESSFUL")
                + (latestStepFailed ? "  |  REASON : " + message : ""));
        System.out.println(
            ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."
                + '\n');

        Map<String, Map<String, String>> runBookOutputMap = runBookOutput.getOutputMap();
        Map<String, String> stepOutputMap = runBookOutputMap.get(itemId);
        String nodeOutput = stepOutputMap.get(nodeId);
        System.out.println(nodeOutput);
      }

      StepExecutionStatus itemStatus = (StepExecutionStatus) execStatus.getItemStatus(itemId);
      itemStatus.addNodeStatus(nodeId, statusCode, message);
      if (message != null) {
        NodeOutputChunk outputChunk = new NodeOutputChunk(nodeId, message, itemId);
        output(outputChunk);
      }
    }
  }