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 OperationCompleted
apply(WFSharedContext context)
StateObj
getFailureState(java.lang.Throwable t)
StateObj
getSkipState(StateObj state)
boolean
shouldRun(StateObj state)
boolean
shouldSkip(StateObj state)
java.lang.String
toString()
-
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:
shouldRun
in 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:
shouldSkip
in 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:
apply
in interfacejava.util.function.Function<WFSharedContext,OperationCompleted>
-
getSkipState
public StateObj getSkipState(StateObj state)
- Specified by:
getSkipState
in 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:
getFailureState
in interfaceWorkflowSystem.Operation<WFSharedContext,OperationCompleted>
- Parameters:
t
- throwable- Returns:
- new state changes if the operation failed
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-