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 performedboolean
isExclusive()
If true consuming one of the defined events causes its associated actions to be performed.void
setExclusive(boolean exclusive)
If true consuming one of the defined events causes its associated actions to be performed.void
setOnEvents(List<OnEvents> onEvents)
Define what events trigger one or more actions to be performedEventState
withCompensatedBy(String compensatedBy)
EventState
withEnd(End end)
EventState
withExclusive(boolean exclusive)
EventState
withId(String id)
EventState
withMetadata(Map<String,String> metadata)
EventState
withName(String name)
EventState
withOnErrors(List<Error> onErrors)
EventState
withOnEvents(List<OnEvents> onEvents)
EventState
withStateDataFilter(StateDataFilter stateDataFilter)
EventState
withTimeouts(TimeoutsDefinition timeouts)
EventState
withTransition(Transition transition)
EventState
withType(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:
withId
in classDefaultState
-
withName
public EventState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public EventState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withEnd
public EventState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public EventState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public EventState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public EventState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withOnErrors
public EventState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public EventState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
withTimeouts
public EventState withTimeouts(TimeoutsDefinition timeouts)
- Overrides:
withTimeouts
in classDefaultState
-
-