Class StepOperation
- java.lang.Object
-
- com.dtolabs.rundeck.core.execution.workflow.engine.StepOperation
-
- All Implemented Interfaces:
WorkflowSystem.Operation<WFSharedContext,OperationCompleted>,java.util.function.Function<WFSharedContext,OperationCompleted>
public class StepOperation extends java.lang.Object implements WorkflowSystem.Operation<WFSharedContext,OperationCompleted>
operation for running a step
-
-
Constructor Summary
Constructors Constructor Description StepOperation(int stepNum, java.lang.String label, StepCallable callable, StateObj startTriggerState, StateObj skipTriggerState, java.util.Set<Condition> startTriggerConditions, java.util.Set<Condition> skipTriggerConditions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationCompletedapply(WFSharedContext context)StateObjgetFailureState(java.lang.Throwable t)StateObjgetSkipState(StateObj state)booleanshouldRun(StateObj state)booleanshouldSkip(StateObj state)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.dtolabs.rundeck.core.rules.WorkflowSystem.Operation
getIdentity
-
-
-
-
Constructor Detail
-
StepOperation
public StepOperation(int stepNum, java.lang.String label, StepCallable callable, StateObj startTriggerState, StateObj skipTriggerState, java.util.Set<Condition> startTriggerConditions, java.util.Set<Condition> skipTriggerConditions)
-
-
Method Detail
-
shouldRun
public boolean shouldRun(StateObj state)
- Specified by:
shouldRunin interfaceWorkflowSystem.Operation<WFSharedContext,OperationCompleted>- Parameters:
state- current state- Returns:
- true if the operation should run given the state shown
-
shouldSkip
public boolean shouldSkip(StateObj state)
- Specified by:
shouldSkipin interfaceWorkflowSystem.Operation<WFSharedContext,OperationCompleted>- Parameters:
state- current state- Returns:
- true if the operation should be skipped and never run
-
apply
public OperationCompleted apply(WFSharedContext context)
- Specified by:
applyin interfacejava.util.function.Function<WFSharedContext,OperationCompleted>
-
getSkipState
public StateObj getSkipState(StateObj state)
- Specified by:
getSkipStatein interfaceWorkflowSystem.Operation<WFSharedContext,OperationCompleted>- Parameters:
state- current state- Returns:
- state change if operation is skipped
-
getFailureState
public StateObj getFailureState(java.lang.Throwable t)
- Specified by:
getFailureStatein interfaceWorkflowSystem.Operation<WFSharedContext,OperationCompleted>- Parameters:
t- throwable- Returns:
- new state changes if the operation failed
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-