Class NodeTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.flow.NodeTemplate
- Direct Known Subclasses:
ConditionNodeTemplate
,EndNodeTemplate
,EventNodeTemplate
,FlowNodeTemplate
,FunctionNodeTemplate
,PageNodeTemplate
,ServiceNodeTemplate
This template represents a node in a flow.
- Since:
- 6.0
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NodeTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, FlowTemplate flowTemplate, String targetId) -
Method Summary
Modifier and TypeMethodDescriptionaddCondition
(String expression) This method will create a condition node, and connect it to the default exit event of this node.addEndNode
(String exitEvent) This method will create an end node, and connect it to the default exit event of this node.addEvent
(com.aquima.interactions.flow.EventNodeType eventType) This method will add an event node, and connect it to the default exit event of this node.This method will add a (sub)flow node, and connect it to the default exit event of this node.addFunctionCall
(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.This method will add a page node, and connect it to the default exit event of this node.addServiceCall
(String callName) This method will add a service call node, and connect it to the default exit event of this node.addServiceCall
(String serviceCallName, String serviceTypeName, com.aquima.interactions.foundation.IParameters parameters) This method will add a service call node, and connect it to the default exit event of this node.getEdge
(com.aquima.interactions.flow.ExitEvent exitEvent) This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.protected List
<EdgeTemplate> getEdges()
protected FlowTemplate
protected String
getId()
protected String
abstract com.aquima.interactions.flow.ds.INodeDS
This method converts the template to a data source that can be used to initialize a flow node.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
NodeTemplate
protected NodeTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, FlowTemplate flowTemplate, String targetId)
-
-
Method Details
-
addEndNode
This method will create an end node, and connect it to the default exit event of this node.- Parameters:
exitEvent
- The exit event of the end node.- Returns:
- Template representing the condition node.
-
addCondition
This method will create a condition node, and connect it to the default exit event of this node.- Parameters:
expression
- The expression of the condition node.- Returns:
- Template representing the condition node.
-
addServiceCall
This method will add a service call node, and connect it to the default exit event of this node.- Parameters:
callName
- The service call name of the node.- 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, and connect it to the default exit event of this 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 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 inflowName
- The name of the flow to execute as function- Returns:
- Function node template representing the function call node.
-
addPage
This method will add a page node, and connect it to the default exit event of this node.- Parameters:
pageName
- The name of the page.- Returns:
- Page node template representing the page node.
-
addEvent
This method will add an event node, and connect it to the default exit event of this node.- Parameters:
eventType
- The type of the event.- Returns:
- Event node template representing the event node.
-
addFlow
This method will add a (sub)flow node, and connect it to the default exit event of this node. If the name passed to this method is equal to the name of the flow it is added to, this method will NOT create a sub-flow node, but instead it will create an edge linking back to the start node of this flow.- Parameters:
flowName
- The name of the sub-flow.- Returns:
- Flow node node template representing the flow node, or null when the flow links back to itself.
-
getEdge
This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.- Parameters:
label
- The label for which this edge is applied.- Returns:
- The edge corresponding to the label.
-
getEdge
This method will return the edge for the specified label, the if previously an edge with the same name was already requested the same edge will be returned.- Parameters:
exitEvent
- The label for which this edge is applied.- Returns:
- The edge corresponding to the label.
-
getTargetId
-
getFlowTemplate
-
getId
-
getEdges
-
toDataSource
public abstract com.aquima.interactions.flow.ds.INodeDS toDataSource()This method converts the template to a data source that can be used to initialize a flow node.- Returns:
- a data source that can be used to initialize a flow node.
-