Class AbstractUserInJourneyChoiceNode

    • 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 identifier
        name - the node name
        journeyEntityId - the journey or journey stage identifier
        trueNode - the truthy follow-up
        falseNode - 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 object
        flowEntry - 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 class TrueFalseNode
        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. Returns true if the context matches the condition or false otherwise.
        Specified by:
        evaluate in class TrueFalseNode
        Parameters:
        flowContext - the context
        Returns:
        true if the context matches the condition or false 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 class TrueFalseNode
        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