@Override public StepExecutionStatus pausedItem(DtRunbookItem runbookItem) { StepExecutionStatus itemStatus = new StepExecutionStatus(runbookItem.getItemId()); itemStatus.setStartTime(System.currentTimeMillis()); itemStatus.setState(ExecState.PAUSED); execStatus.addItemStatus(runbookItem.getItemId(), itemStatus); store.update(execStatus); 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 StepExecutionStatus executingItem(DtRunbookItem runbookItem) { if (emitOutput) { System.out.println( '\n' + "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"); System.out.println(" Step : " + runbookItem.getId() + " | " + " STARTED"); System.out.println( "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" + '\n'); } StepExecutionStatus itemStatus = new StepExecutionStatus(runbookItem.getItemId()); itemStatus.setStartTime(System.currentTimeMillis()); execStatus.addItemStatus(runbookItem.getItemId(), itemStatus); store.create(itemStatus); return itemStatus; }
@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; }