Package io.serverlessworkflow.api.states
Class ParallelState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.ParallelState
-
- All Implemented Interfaces:
State,Serializable
public class ParallelState extends DefaultState implements Serializable, State
Consists of a number of states that are executed in parallel- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParallelState.CompletionType-
Nested classes/interfaces inherited from class io.serverlessworkflow.api.states.DefaultState
DefaultState.Type
-
-
Constructor Summary
Constructors Constructor Description ParallelState()No args constructor for use in serializationParallelState(List<Branch> branches, String name, DefaultState.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Branch>getBranches()Branch Definitions (Required)ParallelState.CompletionTypegetCompletionType()Option types on how to complete branch execution.StringgetNumCompleted()Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition.booleanisUsedForCompensation()If true, this state is used to compensate another state.voidsetBranches(List<Branch> branches)Branch Definitions (Required)voidsetCompletionType(ParallelState.CompletionType completionType)Option types on how to complete branch execution.voidsetNumCompleted(String numCompleted)Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition.voidsetUsedForCompensation(boolean usedForCompensation)If true, this state is used to compensate another state.ParallelStatewithBranches(List<Branch> branches)ParallelStatewithCompensatedBy(String compensatedBy)ParallelStatewithCompletionType(ParallelState.CompletionType completionType)ParallelStatewithEnd(End end)ParallelStatewithId(String id)ParallelStatewithMetadata(Map<String,String> metadata)ParallelStatewithName(String name)ParallelStatewithNumCompleted(String numCompleted)ParallelStatewithOnErrors(List<Error> onErrors)ParallelStatewithStateDataFilter(StateDataFilter stateDataFilter)ParallelStatewithTimeouts(TimeoutsDefinition timeouts)ParallelStatewithTransition(Transition transition)ParallelStatewithType(DefaultState.Type type)ParallelStatewithUsedForCompensation(boolean usedForCompensation)-
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
-
ParallelState
public ParallelState()
No args constructor for use in serialization
-
ParallelState
public ParallelState(List<Branch> branches, String name, DefaultState.Type type)
- Parameters:
name-branches-type-
-
-
Method Detail
-
withBranches
public ParallelState withBranches(List<Branch> branches)
-
getCompletionType
public ParallelState.CompletionType getCompletionType()
Option types on how to complete branch execution.
-
setCompletionType
public void setCompletionType(ParallelState.CompletionType completionType)
Option types on how to complete branch execution.
-
withCompletionType
public ParallelState withCompletionType(ParallelState.CompletionType completionType)
-
getNumCompleted
public String getNumCompleted()
Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition.
-
setNumCompleted
public void setNumCompleted(String numCompleted)
Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition.
-
withNumCompleted
public ParallelState withNumCompleted(String numCompleted)
-
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 ParallelState withUsedForCompensation(boolean usedForCompensation)
-
withId
public ParallelState withId(String id)
- Overrides:
withIdin classDefaultState
-
withName
public ParallelState withName(String name)
- Overrides:
withNamein classDefaultState
-
withType
public ParallelState withType(DefaultState.Type type)
- Overrides:
withTypein classDefaultState
-
withEnd
public ParallelState withEnd(End end)
- Overrides:
withEndin classDefaultState
-
withStateDataFilter
public ParallelState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilterin classDefaultState
-
withMetadata
public ParallelState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadatain classDefaultState
-
withTransition
public ParallelState withTransition(Transition transition)
- Overrides:
withTransitionin classDefaultState
-
withOnErrors
public ParallelState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrorsin classDefaultState
-
withCompensatedBy
public ParallelState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedByin classDefaultState
-
withTimeouts
public ParallelState withTimeouts(TimeoutsDefinition timeouts)
- Overrides:
withTimeoutsin classDefaultState
-
-