public class ForkedActionStartXCommand extends ActionStartXCommand
ActionXCommand.ActionExecutorContext, ActionXCommand.ForkedActionExecutorContextactionId, context, COULD_NOT_START, EL_ERROR, EL_EVAL_ERROR, EXEC_DATA_MISSING, START_DATA_MISSING, wfAction, wfJobRECOVERY_ID_SEPARATORINSTR_FAILED_JOBS_COUNTER_NAME, INSTR_KILLED_JOBS_COUNTER_NAME, INSTR_SUCCEEDED_JOBS_COUNTER_NAMEDEFAULT_LOCK_TIMEOUT, DEFAULT_REQUEUE_DELAY, dryrun, eventService, instrumentation, LOG| Constructor and Description |
|---|
ForkedActionStartXCommand(String actionId,
String type) |
ForkedActionStartXCommand(WorkflowJobBean wfJob,
String id,
String type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
callActionEnd() |
protected void |
endWF() |
protected ActionXCommand.ActionExecutorContext |
execute()
Command execution body.
|
void |
failJob(ActionExecutor.Context context,
WorkflowActionBean action)
Fail the job due to failed action
|
protected ActionXCommand.ActionExecutorContext |
getContext(boolean isRetry,
boolean isUserRetry)
Get action executor context
|
String |
getEntityKey()
Return the entity key for the command.
|
protected void |
handleError(ActionXCommand.ActionExecutorContext context,
WorkflowJobBean workflow,
WorkflowActionBean action) |
protected void |
handleNonTransient(ActionExecutor.Context context,
ActionExecutor executor,
WorkflowAction.Status status)
Takes care of non transient failures.
|
protected void |
queue(XCommand<?> command,
long msDelay)
Queue a command for delayed execution after the current command execution completes.
|
protected void |
updateJobLastModified() |
protected void |
updateParentIfNecessary(WorkflowJobBean wfjob,
int maxRetries) |
getKey, isLockRequired, loadState, queueCommandForTransientFailure, setLogInfo, verifyPreconditionaddActionCron, failJob, handleError, handleTransient, handleUserRetry, incrActionCountergenerateEvent, generateEvent, generateEvent, updateParentIfNecessarycall, eagerLoadState, eagerVerifyPrecondition, executeInterrupts, getCreatedTime, getInstrumentation, getLockTimeOut, getLog, getName, getPriority, getRequeueDelay, getType, inInterruptMode, isReQueueRequired, queue, resetUsed, setInterruptMode, toStringpublic ForkedActionStartXCommand(String actionId, String type)
public ForkedActionStartXCommand(WorkflowJobBean wfJob, String id, String type)
protected ActionXCommand.ActionExecutorContext execute() throws CommandException
XCommandThis method will be invoked after the {link #loadState} and {link #verifyPrecondition} methods.
If the command requires locking, this method will be invoked ONLY if the lock has been acquired.
execute in class ActionStartXCommandCommandException - thrown if the command execution failed.public String getEntityKey()
XCommandgetEntityKey in interface XCallable<ActionXCommand.ActionExecutorContext>getEntityKey in class ActionStartXCommandprotected void queue(XCommand<?> command, long msDelay)
XCommandAll commands queued during the execution of the current command with the same delay will be queued for a single serial execution.
If the command execution throws an exception, no command will be effectively queued.
queue in class ActionStartXCommandcommand - command to queue.msDelay - delay in milliseconds.public void failJob(ActionExecutor.Context context, WorkflowActionBean action) throws CommandException
ActionXCommandfailJob in class ActionXCommand<ActionXCommand.ActionExecutorContext>context - the execution context.action - the action that caused the workflow to failCommandException - thrown if unable to fail jobprotected void updateParentIfNecessary(WorkflowJobBean wfjob, int maxRetries) throws CommandException
updateParentIfNecessary in class WorkflowXCommand<ActionXCommand.ActionExecutorContext>CommandExceptionprotected void handleNonTransient(ActionExecutor.Context context, ActionExecutor executor, WorkflowAction.Status status) throws CommandException
ActionXCommandhandleNonTransient in class ActionXCommand<ActionXCommand.ActionExecutorContext>context - the execution context.executor - the executor instance being used.status - the status to be set for the action.CommandException - thrown if unable to suspend jobprotected void handleError(ActionXCommand.ActionExecutorContext context, WorkflowJobBean workflow, WorkflowActionBean action) throws CommandException
handleError in class ActionStartXCommandCommandExceptionprotected void updateJobLastModified()
updateJobLastModified in class ActionStartXCommandprotected void endWF()
endWF in class ActionStartXCommandprotected void callActionEnd()
callActionEnd in class ActionStartXCommandprotected ActionXCommand.ActionExecutorContext getContext(boolean isRetry, boolean isUserRetry)
ActionStartXCommandgetContext in class ActionStartXCommandCopyright © 2016 Apache Software Foundation. All rights reserved.