Package io.serverlessworkflow.api.states
Class OperationState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.OperationState
-
- All Implemented Interfaces:
State
,Serializable
public class OperationState extends DefaultState implements Serializable, State
This state allows one or more functions to run in sequence or in parallel without waiting for any event.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OperationState.ActionMode
-
Nested classes/interfaces inherited from class io.serverlessworkflow.api.states.DefaultState
DefaultState.Type
-
-
Constructor Summary
Constructors Constructor Description OperationState()
No args constructor for use in serializationOperationState(OperationState.ActionMode actionMode, List<Action> actions, String name, DefaultState.Type type)
-
Method Summary
-
Methods inherited from class io.serverlessworkflow.api.states.DefaultState
getCompensatedBy, getEnd, getId, getMetadata, getName, getOnErrors, getStateDataFilter, getTimeouts, getTransition, getType, setCompensatedBy, setEnd, setId, setMetadata, setName, setOnErrors, setStateDataFilter, setTimeouts, setTransition, setType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.serverlessworkflow.api.interfaces.State
getCompensatedBy, getEnd, getId, getMetadata, getName, getOnErrors, getStateDataFilter, getTimeouts, getTransition, getType
-
-
-
-
Constructor Detail
-
OperationState
public OperationState()
No args constructor for use in serialization
-
OperationState
public OperationState(OperationState.ActionMode actionMode, List<Action> actions, String name, DefaultState.Type type)
- Parameters:
actionMode
-name
-type
-actions
-
-
-
Method Detail
-
getActionMode
public OperationState.ActionMode getActionMode()
Specifies whether functions are executed in sequence or in parallel. (Required)
-
setActionMode
public void setActionMode(OperationState.ActionMode actionMode)
Specifies whether functions are executed in sequence or in parallel. (Required)
-
withActionMode
public OperationState withActionMode(OperationState.ActionMode actionMode)
-
withActions
public OperationState withActions(List<Action> actions)
-
isUsedForCompensation
public boolean isUsedForCompensation()
If true, this state is used to compensate another state. Default is false
-
setUsedForCompensation
public void setUsedForCompensation(boolean usedForCompensation)
If true, this state is used to compensate another state. Default is false
-
withUsedForCompensation
public OperationState withUsedForCompensation(boolean usedForCompensation)
-
withId
public OperationState withId(String id)
- Overrides:
withId
in classDefaultState
-
withName
public OperationState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public OperationState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withEnd
public OperationState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public OperationState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public OperationState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public OperationState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withOnErrors
public OperationState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public OperationState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
withTimeouts
public OperationState withTimeouts(TimeoutsDefinition timeouts)
- Overrides:
withTimeouts
in classDefaultState
-
-