}
@Override
protected void verifyPrecondition() throws CommandException, PreconditionException {
if (wfJob == null) {
throw new PreconditionException(ErrorCode.E0604, jobId);
}
if (wfAction == null) {
throw new PreconditionException(ErrorCode.E0605, actionId);
}
if (wfAction.isPending()
&& (wfAction.getStatus() == WorkflowActionBean.Status.PREP
|| wfAction.getStatus() == WorkflowActionBean.Status.START_RETRY
|| wfAction.getStatus() == WorkflowActionBean.Status.START_MANUAL
|| wfAction.getStatus() == WorkflowActionBean.Status.USER_RETRY
)) {
if (wfJob.getStatus() != WorkflowJob.Status.RUNNING) {
throw new PreconditionException(ErrorCode.E0810, WorkflowJob.Status.RUNNING.toString());
}
}
else {
throw new PreconditionException(ErrorCode.E0816, wfAction.getPending(), wfAction.getStatusStr());
}
executor = Services.get().get(ActionService.class).getExecutor(wfAction.getType());
if (executor == null) {
throw new CommandException(ErrorCode.E0802, wfAction.getType());