Class AbstractUserInJourneyChoiceNode
- java.lang.Object
-
- lumis.portal.analytics.automationflow.FlowNode
-
- lumis.portal.analytics.automationflow.condition.TrueFalseNode
-
- lumis.portal.analytics.automationflow.condition.AbstractUserInJourneyChoiceNode
-
- Direct Known Subclasses:
UserInJourneyChoiceNode
,UserInJourneyStageChoiceNode
public abstract class AbstractUserInJourneyChoiceNode extends TrueFalseNode
Choice node that splits the flow depending whether the user is on a given journey or journey instance.- Since:
- 12.2.0
- Version:
- $Revision: 24428 $ $Date: 2021-03-22 13:20:52 -0300 (Mon, 22 Mar 2021) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class lumis.portal.analytics.automationflow.FlowNode
FlowNode.FlowNodeExecutionResult
-
-
Constructor Summary
Constructors Constructor Description AbstractUserInJourneyChoiceNode(java.lang.String id, java.lang.String name, java.lang.String journeyEntityId, FlowNode trueNode, FlowNode falseNode)
Creates a new instance.AbstractUserInJourneyChoiceNode(org.json.JSONObject object, FlowEntry flowEntry)
Creates a new instance from the given JSON configuration object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(FlowContext flowContext)
Evaluates the given flow context.java.lang.String
getJourneyEntityId()
Returns this node journey entity identifier.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, execute, getFalseNodeFromJson, getFollowUps, getTrueNodeFromJson
-
Methods inherited from class lumis.portal.analytics.automationflow.FlowNode
getAndValidateNotAnonymousUser, getFlowEntry, getId, getName, getNodeLogLabel, init, logError, logError
-
-
-
-
Constructor Detail
-
AbstractUserInJourneyChoiceNode
public AbstractUserInJourneyChoiceNode(java.lang.String id, java.lang.String name, java.lang.String journeyEntityId, FlowNode trueNode, FlowNode falseNode)
Creates a new instance.- Parameters:
id
- the node identifiername
- the node namejourneyEntityId
- the journey or journey stage identifiertrueNode
- the truthy follow-upfalseNode
- the falsy follow-up- Since:
- 12.2.0
-
AbstractUserInJourneyChoiceNode
public AbstractUserInJourneyChoiceNode(org.json.JSONObject object, FlowEntry flowEntry)
Creates a new instance from the given JSON configuration object.- Parameters:
object
- the JSON configuration objectflowEntry
- the flow entry- Since:
- 12.2.0
-
-
Method Detail
-
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.
-
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
-
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.
-
getJourneyEntityId
public java.lang.String getJourneyEntityId()
Returns this node journey entity identifier.- Returns:
- this node journey entity identifier.
- Since:
- 12.2.0
-
-