Class FilterByEventAttributeNode
- java.lang.Object
-
- lumis.portal.analytics.automationflow.FlowNode
-
- lumis.portal.analytics.automationflow.condition.TrueFalseNode
-
- lumis.portal.analytics.automationflow.condition.FilterByEventAttributeNode
-
public class FilterByEventAttributeNode extends TrueFalseNode
Filters the flow by the given event filter.- Since:
- 12.0.0
- Version:
- $Revision: 23716 $ $Date: 2020-03-26 18:26:08 -0300 (Thu, 26 Mar 2020) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class lumis.portal.analytics.automationflow.FlowNode
FlowNode.FlowNodeExecutionResult
-
-
Constructor Summary
Constructors Constructor Description FilterByEventAttributeNode(String id, String name, EventFilterData eventFilterData, FlowNode trueNextNode)
Creates a new instance.FilterByEventAttributeNode(org.json.JSONObject object, FlowEntry flowEntry)
Creates a new instance from the given JSON object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class lumis.portal.analytics.automationflow.condition.TrueFalseNode
addFalseNodeToJson, addTrueNodeToJson, getFalseNodeFromJson, getFollowUps, getTrueNodeFromJson
-
Methods inherited from class lumis.portal.analytics.automationflow.FlowNode
getAndValidateNotAnonymousUser, getFlowEntry, getId, getName, getNodeLogLabel, init, logError, logError
-
-
-
-
Constructor Detail
-
FilterByEventAttributeNode
public FilterByEventAttributeNode(String id, String name, EventFilterData eventFilterData, FlowNode trueNextNode)
Creates a new instance.- Parameters:
id
- the node identifiername
- the node nameeventFilterData
- the event filter to be usedtrueNextNode
- the next node to be executed- Since:
- 12.0.0
-
FilterByEventAttributeNode
public FilterByEventAttributeNode(org.json.JSONObject object, FlowEntry flowEntry) throws PortalException
Creates a new instance from the given JSON object.- Parameters:
object
- the JSON objectflowEntry
- the flow entry this node belongs to.- Throws:
PortalException
- Since:
- 12.0.0
-
-
Method Detail
-
validateStateAndLog
public boolean validateStateAndLog(boolean checkAllNextNodes)
Description copied from class:FlowNode
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. So, to prevents exception on flow node execution and prevent to save flow when flow node is invalid state, this methods will check if all variables is OK and log otherwise.- Overrides:
validateStateAndLog
in classTrueFalseNode
- Parameters:
checkAllNextNodes
- check all next nodes nodes.- Returns:
- true if all variable state is OK.
-
toJSONObject
public org.json.JSONObject toJSONObject()
Description copied from class:FlowNode
Returns the JSON representation of this node. This method is the counterpart of#FlowNode(JSONObject)
constructor.- Overrides:
toJSONObject
in classTrueFalseNode
- Returns:
- the JSON representation of this node.
-
execute
public FlowNode.FlowNodeExecutionResult execute(FlowContext flowContext) throws PortalException
Description copied from class:FlowNode
Executes this node and returns the next node to be executed.- Overrides:
execute
in classTrueFalseNode
- Parameters:
flowContext
- the flow context- Returns:
- the next node to be executed
- Throws:
PortalException
-
evaluate
public boolean evaluate(FlowContext flowContext) throws PortalException
Description copied from class:TrueFalseNode
Evaluates the given flow context. Returnstrue
if the context matches the condition orfalse
otherwise.- Specified by:
evaluate
in classTrueFalseNode
- Parameters:
flowContext
- the context- Returns:
true
if the context matches the condition orfalse
otherwise.- Throws:
PortalException
-
-