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 class
ParallelState.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.CompletionType
getCompletionType()
Option types on how to complete branch execution.String
getN()
Used when completionType is set to 'n_of_m' to specify the 'N' valueboolean
isUsedForCompensation()
If true, this state is used to compensate another state.void
setBranches(List<Branch> branches)
Branch Definitions (Required)void
setCompletionType(ParallelState.CompletionType completionType)
Option types on how to complete branch execution.void
setN(String n)
Used when completionType is set to 'n_of_m' to specify the 'N' valuevoid
setUsedForCompensation(boolean usedForCompensation)
If true, this state is used to compensate another state.ParallelState
withBranches(List<Branch> branches)
ParallelState
withCompensatedBy(String compensatedBy)
ParallelState
withCompletionType(ParallelState.CompletionType completionType)
ParallelState
withDataInputSchema(String dataInputSchema)
ParallelState
withDataOutputSchema(String dataOutputSchema)
ParallelState
withEnd(End end)
ParallelState
withId(String id)
ParallelState
withMetadata(Map<String,String> metadata)
ParallelState
withN(String n)
ParallelState
withName(String name)
ParallelState
withOnErrors(List<Error> onErrors)
ParallelState
withStart(Start start)
ParallelState
withStateDataFilter(StateDataFilter stateDataFilter)
ParallelState
withTransition(Transition transition)
ParallelState
withType(DefaultState.Type type)
ParallelState
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
-
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)
-
getN
public String getN()
Used when completionType is set to 'n_of_m' to specify the 'N' value
-
setN
public void setN(String n)
Used when completionType is set to 'n_of_m' to specify the 'N' value
-
withN
public ParallelState withN(String n)
-
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:
withId
in classDefaultState
-
withName
public ParallelState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public ParallelState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withStart
public ParallelState withStart(Start start)
- Overrides:
withStart
in classDefaultState
-
withEnd
public ParallelState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public ParallelState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public ParallelState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public ParallelState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withDataInputSchema
public ParallelState withDataInputSchema(String dataInputSchema)
- Overrides:
withDataInputSchema
in classDefaultState
-
withDataOutputSchema
public ParallelState withDataOutputSchema(String dataOutputSchema)
- Overrides:
withDataOutputSchema
in classDefaultState
-
withOnErrors
public ParallelState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public ParallelState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
-