Class StartNodeTemplate

java.lang.Object
com.aquima.interactions.test.templates.flow.StartNodeTemplate

public class StartNodeTemplate extends Object
This template holds the first node of a flow.
Since:
7.0
Author:
O. Kerpershoek
  • Constructor Details

    • StartNodeTemplate

      protected StartNodeTemplate(FlowTemplate flowTemplate)
  • Method Details

    • setFirstNode

      public void setFirstNode(NodeTemplate node)
      This method may be used to set the first node of the flow. The method may only be invoked once, as a start node can point to only a single node.
      Parameters:
      node - The node from the flow that should be used as the first node.
    • getFirstNode

      public NodeTemplate getFirstNode()
      This method will return the node template of the first node in the flow.
      Returns:
      The node template of the first node in the flow.
    • addCondition

      public ConditionNodeTemplate addCondition(String expression)
      This method will add a condition node to the flow, and set it as the start node.
      Parameters:
      expression - The expression of the condition node.
      Returns:
      Template representing the condition node.
    • addPage

      public PageNodeTemplate addPage(String pageName)
      This method will add a page node to the flow, and set it as the start node.
      Parameters:
      pageName - The name of the page.
      Returns:
      Page node template representing the page node.
    • addServiceCall

      public ServiceNodeTemplate addServiceCall(String callName)
      This method will add a service call node to the flow, and set it as the start node.
      Parameters:
      callName - The name of the service call.
      Returns:
      Service node template representing the service call node.
    • addServiceCall

      public ServiceNodeTemplate addServiceCall(String serviceCallName, String serviceTypeName, com.aquima.interactions.foundation.IParameters parameters)
      This method will add a service call node to the flow, and set it as the start node.
      Parameters:
      serviceCallName - The call name of the service.
      serviceTypeName - The type name of the service.
      parameters - The service parameters.
      Returns:
      Service node template representing the service call node.
    • addFunctionCall

      public FunctionNodeTemplate addFunctionCall(String callName, String moduleName, String flowName)
      This method creates a new function call and adds a function call sub node to the current flow node.
      Parameters:
      callName - The call name of the function.
      moduleName - The module the function flow resides in
      flowName - The name of the flow to execute as function
      Returns:
      Function node template representing the function call node.
    • addFlow

      public FlowNodeTemplate addFlow(String flowName)
      This method will add a sub-flow node to the flow, and set it as the start node.
      Parameters:
      flowName - The name of the sub-flow.
      Returns:
      Flow node template representing the sub-flow node.
    • addEndNode

      public EndNodeTemplate addEndNode(String exitEvent)
      This method will create an end node as start node, to create an empty flow
      Parameters:
      exitEvent - The exit event of the end node.
      Returns:
      Template representing the end node.
    • addEventNode

      public EventNodeTemplate addEventNode(com.aquima.interactions.flow.EventNodeType eventNodeType)
      This method will create an event node as start node, to create an empty flow
      Parameters:
      eventNodeType - The event type of the event node.
      Returns:
      Template representing the event node.
    • setTransactional

      public void setTransactional(boolean isTransactional)
      This method may be used to mark a flow as transactional.
      Parameters:
      isTransactional - boolean indicating if the flow is transactional.
    • setAllowedRoles

      public void setAllowedRoles(String... roles)
      This method may be used to specify the roles for which the flow is allowed to be executed.
      Parameters:
      roles - the roles for which the flow is allowed to be executed.
    • setAllowedChannels

      public void setAllowedChannels(String... channels)
      This method may be used to specify the channels for which the flow is allowed to be executed.
      Parameters:
      channels - the channels for which the flow is allowed to be executed.
    • getFlowTemplate

      public FlowTemplate getFlowTemplate()