Package io.serverlessworkflow.api.states
Class SubflowState
- java.lang.Object
-
- io.serverlessworkflow.api.states.DefaultState
-
- io.serverlessworkflow.api.states.SubflowState
-
- All Implemented Interfaces:
State
,Serializable
public class SubflowState extends DefaultState implements Serializable, State
Defines a sub-workflow to be executed- 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 SubflowState()
No args constructor for use in serializationSubflowState(String workflowId, String name, DefaultState.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getWorkflowId()
Sub-workflow unique id.boolean
isUsedForCompensation()
If true, this state is used to compensate another state.boolean
isWaitForCompletion()
Workflow execution must wait for local workflow to finish before continuing.void
setUsedForCompensation(boolean usedForCompensation)
If true, this state is used to compensate another state.void
setWaitForCompletion(boolean waitForCompletion)
Workflow execution must wait for local workflow to finish before continuing.void
setWorkflowId(String workflowId)
Sub-workflow unique id.SubflowState
withCompensatedBy(String compensatedBy)
SubflowState
withDataInputSchema(String dataInputSchema)
SubflowState
withDataOutputSchema(String dataOutputSchema)
SubflowState
withEnd(End end)
SubflowState
withId(String id)
SubflowState
withMetadata(Map<String,String> metadata)
SubflowState
withName(String name)
SubflowState
withOnErrors(List<Error> onErrors)
SubflowState
withStart(Start start)
SubflowState
withStateDataFilter(StateDataFilter stateDataFilter)
SubflowState
withTransition(Transition transition)
SubflowState
withType(DefaultState.Type type)
SubflowState
withUsedForCompensation(boolean usedForCompensation)
SubflowState
withWaitForCompletion(boolean waitForCompletion)
SubflowState
withWorkflowId(String workflowId)
-
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
-
SubflowState
public SubflowState()
No args constructor for use in serialization
-
SubflowState
public SubflowState(String workflowId, String name, DefaultState.Type type)
- Parameters:
name
-type
-workflowId
-
-
-
Method Detail
-
isWaitForCompletion
public boolean isWaitForCompletion()
Workflow execution must wait for local workflow to finish before continuing.
-
setWaitForCompletion
public void setWaitForCompletion(boolean waitForCompletion)
Workflow execution must wait for local workflow to finish before continuing.
-
withWaitForCompletion
public SubflowState withWaitForCompletion(boolean waitForCompletion)
-
getWorkflowId
public String getWorkflowId()
Sub-workflow unique id. (Required)
-
setWorkflowId
public void setWorkflowId(String workflowId)
Sub-workflow unique id. (Required)
-
withWorkflowId
public SubflowState withWorkflowId(String workflowId)
-
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 SubflowState withUsedForCompensation(boolean usedForCompensation)
-
withId
public SubflowState withId(String id)
- Overrides:
withId
in classDefaultState
-
withName
public SubflowState withName(String name)
- Overrides:
withName
in classDefaultState
-
withType
public SubflowState withType(DefaultState.Type type)
- Overrides:
withType
in classDefaultState
-
withStart
public SubflowState withStart(Start start)
- Overrides:
withStart
in classDefaultState
-
withEnd
public SubflowState withEnd(End end)
- Overrides:
withEnd
in classDefaultState
-
withStateDataFilter
public SubflowState withStateDataFilter(StateDataFilter stateDataFilter)
- Overrides:
withStateDataFilter
in classDefaultState
-
withMetadata
public SubflowState withMetadata(Map<String,String> metadata)
- Overrides:
withMetadata
in classDefaultState
-
withTransition
public SubflowState withTransition(Transition transition)
- Overrides:
withTransition
in classDefaultState
-
withDataInputSchema
public SubflowState withDataInputSchema(String dataInputSchema)
- Overrides:
withDataInputSchema
in classDefaultState
-
withDataOutputSchema
public SubflowState withDataOutputSchema(String dataOutputSchema)
- Overrides:
withDataOutputSchema
in classDefaultState
-
withOnErrors
public SubflowState withOnErrors(List<Error> onErrors)
- Overrides:
withOnErrors
in classDefaultState
-
withCompensatedBy
public SubflowState withCompensatedBy(String compensatedBy)
- Overrides:
withCompensatedBy
in classDefaultState
-
-