Package io.serverlessworkflow.api.states
Class EventState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.EventState
-
- All Implemented Interfaces:
State,Serializable
public class EventState extends DefaultState implements Serializable, State
This state is used to wait for events from event sources and then to invoke one or more functions to run in sequence or in parallel.- 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 EventState()No args constructor for use in serializationEventState(String name, DefaultState.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OnEvents>getOnEvents()Define what events trigger one or more actions to be performedbooleanisExclusive()If true consuming one of the defined events causes its associated actions to be performed.voidsetExclusive(boolean exclusive)If true consuming one of the defined events causes its associated actions to be performed.voidsetOnEvents(List<OnEvents> onEvents)Define what events trigger one or more actions to be performedEventStatewithCompensatedBy(String compensatedBy)EventStatewithEnd(End end)EventStatewithExclusive(boolean exclusive)EventStatewithId(String id)EventStatewithMetadata(Map<String,String> metadata)EventStatewithName(String name)EventStatewithOnErrors(List<Error> onErrors)EventStatewithOnEvents(List<OnEvents> onEvents)EventStatewithStateDataFilter(StateDataFilter stateDataFilter)EventStatewithTimeouts(TimeoutsDefinition timeouts)EventStatewithTransition(Transition transition)EventStatewithType(DefaultState.Type type)-
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
-
EventState
public EventState()
No args constructor for use in serialization
-
EventState
public EventState(String name, DefaultState.Type type)
- Parameters:
name-type-
-
-
Method Detail
-
isExclusive
public boolean isExclusive()
If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed
-
setExclusive
public void setExclusive(boolean exclusive)
If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed
-
withExclusive
public EventState withExclusive(boolean exclusive)
-
getOnEvents
public List<OnEvents> getOnEvents()
Define what events trigger one or more actions to be performed
-
setOnEvents
public void setOnEvents(List<OnEvents> onEvents)
Define what events trigger one or more actions to be performed
-
withOnEvents
public EventState withOnEvents(List<OnEvents> onEvents)
-
withId
public EventState withId(String id)
- Overrides:
withIdin classDefaultState
-
withName
public EventState withName(String name)
- Overrides:
withNamein classDefaultState
-
withType
public EventState withType(DefaultState.Type type)
- Overrides:
withTypein classDefaultState
-
withEnd
public EventState withEnd(End end)
- Overrides:
withEndin classDefaultState
-
withStateDataFilter
public EventState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilterin classDefaultState
-
withMetadata
public EventState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadatain classDefaultState
-
withTransition
public EventState withTransition(Transition transition)
- Overrides:
withTransitionin classDefaultState
-
withOnErrors
public EventState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrorsin classDefaultState
-
withCompensatedBy
public EventState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedByin classDefaultState
-
withTimeouts
public EventState withTimeouts(TimeoutsDefinition timeouts)
- Overrides:
withTimeoutsin classDefaultState
-
-