Package io.serverlessworkflow.api.states
Class CallbackState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.CallbackState
-
- All Implemented Interfaces:
State
,Serializable
public class CallbackState extends DefaultState implements Serializable, State
This state is used to wait for events from event sources and then transitioning to a next state- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.serverlessworkflow.api.states.DefaultState
DefaultState.Type
-
-
Constructor Summary
Constructors Constructor Description CallbackState()
No args constructor for use in serializationCallbackState(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
-
CallbackState
public CallbackState()
No args constructor for use in serialization
-
CallbackState
public CallbackState(String name, DefaultState.Type type)
- Parameters:
name
-type
-
-
-
Method Detail
-
getAction
public Action getAction()
Action Definition
-
setAction
public void setAction(Action action)
Action Definition
-
withAction
public CallbackState withAction(Action action)
-
getEventRef
public String getEventRef()
References an unique callback event name in the defined workflow events
-
setEventRef
public void setEventRef(String eventRef)
References an unique callback event name in the defined workflow events
-
withEventRef
public CallbackState withEventRef(String eventRef)
-
getEventDataFilter
public EventDataFilter getEventDataFilter()
-
setEventDataFilter
public void setEventDataFilter(EventDataFilter eventDataFilter)
-
withEventDataFilter
public CallbackState withEventDataFilter(EventDataFilter eventDataFilter)
-
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 CallbackState withUsedForCompensation(boolean usedForCompensation)
-
withId
public CallbackState withId(String id)
- Overrides:
withId
in classDefaultState
-
withName
public CallbackState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public CallbackState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withEnd
public CallbackState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public CallbackState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public CallbackState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public CallbackState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withOnErrors
public CallbackState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public CallbackState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
withTimeouts
public CallbackState withTimeouts(TimeoutsDefinition timeouts)
- Overrides:
withTimeouts
in classDefaultState
-
-