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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
getAction()
Action DefinitionEventDataFilter
getEventDataFilter()
String
getEventRef()
References an unique callback event name in the defined workflow eventsString
getTimeout()
Time period to wait for incoming events (ISO 8601 format)boolean
isUsedForCompensation()
If true, this state is used to compensate another state.void
setAction(Action action)
Action Definitionvoid
setEventDataFilter(EventDataFilter eventDataFilter)
void
setEventRef(String eventRef)
References an unique callback event name in the defined workflow eventsvoid
setTimeout(String timeout)
Time period to wait for incoming events (ISO 8601 format)void
setUsedForCompensation(boolean usedForCompensation)
If true, this state is used to compensate another state.CallbackState
withAction(Action action)
CallbackState
withCompensatedBy(String compensatedBy)
CallbackState
withDataInputSchema(String dataInputSchema)
CallbackState
withDataOutputSchema(String dataOutputSchema)
CallbackState
withEnd(End end)
CallbackState
withEventDataFilter(EventDataFilter eventDataFilter)
CallbackState
withEventRef(String eventRef)
CallbackState
withId(String id)
CallbackState
withMetadata(Map<String,String> metadata)
CallbackState
withName(String name)
CallbackState
withOnErrors(List<Error> onErrors)
CallbackState
withStart(Start start)
CallbackState
withStateDataFilter(StateDataFilter stateDataFilter)
CallbackState
withTimeout(String timeout)
CallbackState
withTransition(Transition transition)
CallbackState
withType(DefaultState.Type type)
CallbackState
withUsedForCompensation(boolean usedForCompensation)
-
Methods inherited from class io.serverlessworkflow.api.states.DefaultState
getCompensatedBy, getDataInputSchema, getDataOutputSchema, getEnd, getId, getMetadata, getName, getOnErrors, getStart, getStateDataFilter, getTransition, getType, setCompensatedBy, setDataInputSchema, setDataOutputSchema, setEnd, setId, setMetadata, setName, setOnErrors, setStart, setStateDataFilter, 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, getDataInputSchema, getDataOutputSchema, getEnd, getId, getMetadata, getName, getOnErrors, getStart, getStateDataFilter, 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)
-
getTimeout
public String getTimeout()
Time period to wait for incoming events (ISO 8601 format)
-
setTimeout
public void setTimeout(String timeout)
Time period to wait for incoming events (ISO 8601 format)
-
withTimeout
public CallbackState withTimeout(String timeout)
-
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
-
withStart
public CallbackState withStart(Start start)
- Overrides:
withStart
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
-
withDataInputSchema
public CallbackState withDataInputSchema(String dataInputSchema)
- Overrides:
withDataInputSchema
in classDefaultState
-
withDataOutputSchema
public CallbackState withDataOutputSchema(String dataOutputSchema)
- Overrides:
withDataOutputSchema
in classDefaultState
-
withOnErrors
public CallbackState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public CallbackState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
-