Class FlowTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.flow.FlowTemplate

public class FlowTemplate extends AbstractReportingTemplate
This template represents a flow definition.
Since:
6.0
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

    • FlowTemplate

      protected FlowTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, ApplicationTemplate applicationTemplate, String flowName)
    • FlowTemplate

      protected FlowTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, ApplicationTemplate applicationTemplate, String flowName, boolean exposed)
  • Method Details

    • getId

      protected com.aquima.interactions.foundation.GUID getId()
    • setIsExposed

      public void setIsExposed(boolean isExposed)
      This method may be used to change the 'exposed' setting of the flow (default is true).
      Parameters:
      isExposed - Boolean indicating if the flow is exposed.
    • isExposed

      public boolean isExposed()
      This method returns a boolean indicating the flow is exposed and can be started by a user.
      Returns:
      A boolean indicating the flow is exposed and can be started by a user.
    • addPageNode

      public PageNodeTemplate addPageNode(String pageName)
      This method may be used to add a page node to the current flow. The node itself is not connected yet.
      Parameters:
      pageName - The name of the page the node represents.
      Returns:
      Page node template representing the flow node.
    • addFlowNode

      public FlowNodeTemplate addFlowNode(String flowName)
      This method may be used to add a sub-flow node to the current flow. The node itself is not connected yet.
      Parameters:
      flowName - The name of the flow the node represents.
      Returns:
      Flow node template representing the node.
    • addConditionNode

      public ConditionNodeTemplate addConditionNode(String lhsExpression)
      This method may be used to add a condition node to the current flow. The node itself is not connected yet. This is done on the parent node by calling the NodeTemplate.getEdge(String) function
      Parameters:
      lhsExpression - The expression of the condition node.
      Returns:
      A new ConditionNodeTemplate node.
    • addServiceCallNode

      public ServiceNodeTemplate addServiceCallNode(String serviceCallName)
      This method may be used to add a service call node to the current flow node with a specified call name. The node itself is not connected yet. Note that if no service call is defined with this name (in ApplicationTemplate) a service call is created, the service type name will be equal to the service call name.
      Parameters:
      serviceCallName - The call name of the service.
      Returns:
      Service node template representing the service call node.
    • addServiceCallNode

      public ServiceNodeTemplate addServiceCallNode(String serviceCallName, String serviceTypeName, com.aquima.interactions.foundation.IParameters parameters)
      This method creates a new service call and adds a service call sub node to the current flow 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.
    • addServiceCallNode

      public ServiceNodeTemplate addServiceCallNode(String serviceCallName, String serviceTypeName, com.aquima.interactions.portal.ITypedParameters typedParameters)
      This method creates a new service call and adds a service call sub node to the current flow node.
      Parameters:
      serviceCallName - The call name of the service.
      serviceTypeName - The type name of the service.
      typedParameters - The service parameters.
      Returns:
      Service node template representing the service call node.
    • addFunctionCallNode

      public FunctionNodeTemplate addFunctionCallNode(String functionCallName, String moduleName, String flowName)
      This method creates a new function call and adds a function call sub node to the current flow node.
      Parameters:
      functionCallName - 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.
    • addEndNode

      public EndNodeTemplate addEndNode(String exitEvent)
      This method may be used to add an end node to the flow. If an end node is already defined with the same exit event, the existing node will be returned.
      Parameters:
      exitEvent - The exit event of the end node.
      Returns:
      Template representing the end node.
    • addEndNode

      public EndNodeTemplate addEndNode(String exitEvent, boolean checkTheSameExitEvents)
      This method may be used to add an end node to the flow. If an end node is already defined with the same exit event, the existing node will be returned. It also check if the exit events are the same.
      Parameters:
      exitEvent - The exit event of the end node.
      checkTheSameExitEvents - Flag for checking if the exit events are the same.
      Returns:
      Template representing the end node.
    • addEventNode

      public EventNodeTemplate addEventNode(com.aquima.interactions.flow.EventNodeType eventNodeType)
      This method may be used to add an event node to the flow. The event node is not connected to an existing node.
      Parameters:
      eventNodeType - The event type of the event node.
      Returns:
      Template representing the event node.
    • getName

      protected String getName()
    • getStartNode

      public StartNodeTemplate getStartNode()
      This method returns the template that contains the reference to the first node in the flow.
      Returns:
      the template that contains the reference to the first node in the flow.
    • getAllNodes

      protected List<NodeTemplate> getAllNodes()
    • getAllEdges

      protected List<EdgeTemplate> getAllEdges()
    • registerEdge

      protected void registerEdge(EdgeTemplate edgeTemplate)
    • toDataSource

      public com.aquima.interactions.flow.ds.IFlowDS toDataSource()
      This method returns a data source implementation using the nodes defined in this template.
      Returns:
      a data source implementation using the nodes defined in this template.
    • makeFunctionFlow

      public FunctionFlowDefinitionTemplate makeFunctionFlow()
      This method makes the flow of type Function and returns a template to fill in function details
      Returns:
      the template that contains the reference to the definition of a function flow.
    • makeExternalFlow

      public ExternalFlowDefinitionTemplate makeExternalFlow()
      Converts the flow to an external flow and returns a template to fill in the details.
      Returns:
      the external flow template
    • makeDcmWidgetFlow

      public DcmWidgetFlowDefinitionTemplate makeDcmWidgetFlow()
      Converts the flow to a DCM widget flow and returns a template to fill in the details.
      Returns:
      the DCm widget flow template
    • getServiceCall

      protected ServiceCallTemplate getServiceCall(String serviceCallName)
    • addServiceCall

      protected void addServiceCall(ServiceCallTemplate serviceCallTemplate)
    • getFunctionCall

      protected FunctionCallTemplate getFunctionCall(String functionCallName)
    • addFunctionCall

      protected void addFunctionCall(FunctionCallTemplate functionCallTemplate)
    • isTransactional

      protected boolean isTransactional()
    • 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.
    • getAllowedRoles

      protected String[] getAllowedRoles()
    • 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.
    • getAllowedChannels

      protected String[] getAllowedChannels()
    • 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.
    • nextId

      protected String nextId()
    • getFlowTypeName

      protected String getFlowTypeName()
    • setFlowTypeName

      public void setFlowTypeName(String name)
      This method may be used to specify the name of the flow type. The default value is null.
      Parameters:
      name - the name of the flowtype
    • getFunctionFlowDefinition

      protected FunctionFlowDefinitionTemplate getFunctionFlowDefinition()
    • getExternalFlowDefinition

      protected ExternalFlowDefinitionTemplate getExternalFlowDefinition()
    • getDcmWidgetFlowDefinition

      protected DcmWidgetFlowDefinitionTemplate getDcmWidgetFlowDefinition()