Package io.serverlessworkflow.api.states
Class DelayState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.DelayState
-
- All Implemented Interfaces:
State
,Serializable
public class DelayState 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 DelayState()
No args constructor for use in serializationDelayState(String timeDelay, String name, DefaultState.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTimeDelay()
Amount of time (ISO 8601 format) to delay (Required)boolean
isUsedForCompensation()
If true, this state is used to compensate another state.void
setTimeDelay(String timeDelay)
Amount of time (ISO 8601 format) to delay (Required)void
setUsedForCompensation(boolean usedForCompensation)
If true, this state is used to compensate another state.DelayState
withCompensatedBy(String compensatedBy)
DelayState
withDataInputSchema(String dataInputSchema)
DelayState
withDataOutputSchema(String dataOutputSchema)
DelayState
withEnd(End end)
DelayState
withId(String id)
DelayState
withMetadata(Map<String,String> metadata)
DelayState
withName(String name)
DelayState
withOnErrors(List<Error> onErrors)
DelayState
withStart(Start start)
DelayState
withStateDataFilter(StateDataFilter stateDataFilter)
DelayState
withTimeDelay(String timeDelay)
DelayState
withTransition(Transition transition)
DelayState
withType(DefaultState.Type type)
DelayState
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
-
DelayState
public DelayState()
No args constructor for use in serialization
-
DelayState
public DelayState(String timeDelay, String name, DefaultState.Type type)
- Parameters:
name
-timeDelay
-type
-
-
-
Method Detail
-
getTimeDelay
public String getTimeDelay()
Amount of time (ISO 8601 format) to delay (Required)
-
setTimeDelay
public void setTimeDelay(String timeDelay)
Amount of time (ISO 8601 format) to delay (Required)
-
withTimeDelay
public DelayState withTimeDelay(String timeDelay)
-
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 DelayState withUsedForCompensation(boolean usedForCompensation)
-
withId
public DelayState withId(String id)
- Overrides:
withId
in classDefaultState
-
withName
public DelayState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public DelayState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withStart
public DelayState withStart(Start start)
- Overrides:
withStart
in classDefaultState
-
withEnd
public DelayState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public DelayState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public DelayState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public DelayState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withDataInputSchema
public DelayState withDataInputSchema(String dataInputSchema)
- Overrides:
withDataInputSchema
in classDefaultState
-
withDataOutputSchema
public DelayState withDataOutputSchema(String dataOutputSchema)
- Overrides:
withDataOutputSchema
in classDefaultState
-
withOnErrors
public DelayState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public DelayState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
-