Class StartNodeTemplate
java.lang.Object
com.aquima.interactions.test.templates.flow.StartNodeTemplate
This template holds the first node of a flow.
- Since:
- 7.0
- Author:
- O. Kerpershoek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCondition
(String expression) This method will add a condition node to the flow, and set it as the start node.addEndNode
(String exitEvent) This method will create an end node as start node, to create an empty flowaddEventNode
(com.aquima.interactions.flow.EventNodeType eventNodeType) This method will create an event node as start node, to create an empty flowThis method will add a sub-flow node to the flow, and set it as the start node.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.This method will add a page node to the flow, and set it as the start node.addServiceCall
(String callName) This method will add a service call node to the flow, and set it as the start node.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.This method will return the node template of the first node in the flow.void
setAllowedChannels
(String... channels) This method may be used to specify the channels for which the flow is allowed to be executed.void
setAllowedRoles
(String... roles) This method may be used to specify the roles for which the flow is allowed to be executed.void
setFirstNode
(NodeTemplate node) This method may be used to set the first node of the flow.void
setTransactional
(boolean isTransactional) This method may be used to mark a flow as transactional.
-
Constructor Details
-
StartNodeTemplate
-
-
Method Details
-
setFirstNode
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
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
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
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
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
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 inflowName
- The name of the flow to execute as function- Returns:
- Function node template representing the function call node.
-
addFlow
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
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
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
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
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
-