Interface IMultipleConditionBuilder
-
- All Superinterfaces:
IMultiConditionBuilder<IMultipleConditionBuilder>
public interface IMultipleConditionBuilder extends IMultiConditionBuilder<IMultipleConditionBuilder>
Builder for configuring a multiple condition node.- Since:
- 8.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description WorkflowNode
build()
Creates a new multiple condition node with the current configuration.FcMultipleConditionProps
buildProps()
Creates a new multiple condition properties POJO with the current configuration.IMultipleConditionBuilder
description(String description)
Sets the description of the multiple condition node.IMultipleConditionBuilder
labelNo(String labelNo)
Sets the label to be used for the "no" branch of the condition.IMultipleConditionBuilder
labelYes(String labelYes)
Sets the label to be used for the "yes" branch of the condition.IMultipleConditionBuilder
name(String name)
Sets the name of the multiple condition node.default IMultipleConditionBuilder
self()
Returns this builder.IMultipleConditionBuilder
whenFalse(WorkflowNode... alternate)
Sets the child nodes to execute when the condition evaluates to false.default IMultipleConditionBuilder
whenFalse(Iterable<WorkflowNode> alternate)
Sets the child nodes to execute when the condition evaluates to false.IMultipleConditionBuilder
whenTrue(WorkflowNode... consequent)
Sets the child nodes to execute when the condition evaluates to true.default IMultipleConditionBuilder
whenTrue(Iterable<WorkflowNode> consequent)
Sets the child nodes to execute when the condition evaluates to true.-
Methods inherited from interface de.xima.fc.workflow.processor.factory.IMultiConditionBuilder
combinationType, conditionAnd, conditionCustom, conditionOr, conditions, conditions, customCombinationExpression
-
-
-
-
Method Detail
-
build
WorkflowNode build() throws FastJsonException
Creates a new multiple condition node with the current configuration. Changes to the builder after this method has been called will not affect the created node.- Returns:
- The created multiple condition node.
- Throws:
FastJsonException
- When the properties model could not be serialized.
-
buildProps
FcMultipleConditionProps buildProps()
Creates a new multiple condition properties POJO with the current configuration. Changes to the builder after this method has been called will not affect the created node.- Returns:
- The created multiple condition properties.
-
description
IMultipleConditionBuilder description(String description)
Sets the description of the multiple condition node.- Parameters:
description
- The description.- Returns:
- This builder for chaining method calls.
-
labelNo
IMultipleConditionBuilder labelNo(String labelNo)
Sets the label to be used for the "no" branch of the condition.- Parameters:
labelNo
- The label for the "no" branch.- Returns:
- This builder for chaining method calls.
-
labelYes
IMultipleConditionBuilder labelYes(String labelYes)
Sets the label to be used for the "yes" branch of the condition.- Parameters:
labelYes
- The label for the "yes" branch.- Returns:
- This builder for chaining method calls.
-
name
IMultipleConditionBuilder name(String name)
Sets the name of the multiple condition node.- Parameters:
name
- The name.- Returns:
- This builder for chaining method calls.
-
self
default IMultipleConditionBuilder self()
Description copied from interface:IMultiConditionBuilder
Returns this builder.- Specified by:
self
in interfaceIMultiConditionBuilder<IMultipleConditionBuilder>
- Returns:
- This builder.
-
whenFalse
IMultipleConditionBuilder whenFalse(WorkflowNode... alternate)
Sets the child nodes to execute when the condition evaluates to false.Can be any node or list of nodes. When not a single node of type
EWorkflowNodeType.SEQUENCE
, the node or nodes are wrapped in a sequence node.- Parameters:
alternate
- The child nodes to execute.- Returns:
- This builder for chaining method calls.
-
whenFalse
default IMultipleConditionBuilder whenFalse(Iterable<WorkflowNode> alternate)
Sets the child nodes to execute when the condition evaluates to false.Can be any node or list of nodes. When not a single node of type
EWorkflowNodeType.SEQUENCE
, the node or nodes are wrapped in a sequence node.- Parameters:
alternate
- The child nodes to execute.- Returns:
- This builder for chaining method calls.
-
whenTrue
IMultipleConditionBuilder whenTrue(WorkflowNode... consequent)
Sets the child nodes to execute when the condition evaluates to true.Can be any node or list of nodes. When not a single node of type
EWorkflowNodeType.SEQUENCE
, the node or nodes are wrapped in a sequence node.- Parameters:
consequent
- The child nodes to execute.- Returns:
- This builder for chaining method calls.
-
whenTrue
default IMultipleConditionBuilder whenTrue(Iterable<WorkflowNode> consequent)
Sets the child nodes to execute when the condition evaluates to true.Can be any node or list of nodes. When not a single node of type
EWorkflowNodeType.SEQUENCE
, the node or nodes are wrapped in a sequence node.- Parameters:
consequent
- The child nodes to execute.- Returns:
- This builder for chaining method calls.
-
-