public abstract class TrueFalseNode extends FlowNode
FlowNode.FlowNodeExecutionResult
Constructor and Description |
---|
TrueFalseNode(org.json.JSONObject object,
FlowEntry flowEntry)
Creates a new instance from the given JSON object.
|
TrueFalseNode(String id,
String name,
FlowNode trueNode,
FlowNode falseNode)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
evaluate(FlowContext flowContext)
Evaluates the given flow context.
|
FlowNode.FlowNodeExecutionResult |
execute(FlowContext flowContext)
Executes this node and returns the next node to be executed.
|
org.json.JSONObject |
toJSONObject()
Returns the JSON representation of this node.
|
boolean |
validateStateAndLog(boolean checkAllNextNodes)
To permit edition when JSON flow is saved incorrectly in data base, the flow node constructor by JSON parameter need allows to load flow node variables
without exception when something already is wrong.
|
getFlowEntry, getId, getName, logError
public TrueFalseNode(String id, String name, FlowNode trueNode, FlowNode falseNode)
id
- the node identifiername
- the node nametrueNode
- the node to be executed if the condition is evaluated to true
.falseNode
- the node to be executed if the condition is evaluated to false
.public TrueFalseNode(org.json.JSONObject object, FlowEntry flowEntry)
object
- the JSON object.flowEntry
- the flow entry this node belongs to.public boolean validateStateAndLog(boolean checkAllNextNodes)
FlowNode
validateStateAndLog
in class FlowNode
checkAllNextNodes
- check all next nodes nodes.public org.json.JSONObject toJSONObject()
FlowNode
#FlowNode(JSONObject)
constructor.toJSONObject
in class FlowNode
public FlowNode.FlowNodeExecutionResult execute(FlowContext flowContext) throws PortalException
FlowNode
execute
in class FlowNode
flowContext
- the flow contextPortalException
public abstract boolean evaluate(FlowContext flowContext) throws PortalException
true
if the context matches the condition or false
otherwise.flowContext
- the contexttrue
if the context matches the condition or false
otherwise.PortalException
LumisXP 12.0.0.190809 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.