Class FlowTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.flow.FlowTemplate
This template represents a flow definition.
- Since:
- 6.0
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FlowTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, ApplicationTemplate applicationTemplate, String flowName) protected
FlowTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, ApplicationTemplate applicationTemplate, String flowName, boolean exposed) -
Method Summary
Modifier and TypeMethodDescriptionaddConditionNode
(String lhsExpression) This method may be used to add a condition node to the current flow.addEndNode
(String exitEvent) This method may be used to add an end node to the flow.addEndNode
(String exitEvent, boolean checkTheSameExitEvents) This method may be used to add an end node to the flow.addEventNode
(com.aquima.interactions.flow.EventNodeType eventNodeType) This method may be used to add an event node to the flow.addFlowNode
(String flowName) This method may be used to add a sub-flow node to the current flow.protected void
addFunctionCall
(FunctionCallTemplate functionCallTemplate) 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.addPageNode
(String pageName) This method may be used to add a page node to the current flow.This method may be used to add an event node to the flow.protected void
addServiceCall
(ServiceCallTemplate serviceCallTemplate) addServiceCallNode
(String serviceCallName) This method may be used to add a service call node to the current flow node with a specified call name.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.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.protected List
<EdgeTemplate> protected List
<NodeTemplate> protected String[]
protected String[]
protected AutomaticTaskFlowDefinitionTemplate
protected DcmWidgetFlowDefinitionTemplate
protected ExternalFlowDefinitionTemplate
protected String
protected FunctionCallTemplate
getFunctionCall
(String functionCallName) protected FunctionFlowDefinitionTemplate
protected com.aquima.interactions.foundation.GUID
getId()
protected MessageEventFlowDefinitionTemplate
protected String
getName()
protected ServiceCallTemplate
getServiceCall
(String serviceCallName) This method returns the template that contains the reference to the first node in the flow.boolean
This method returns a boolean indicating the flow is exposed and can be started by a user.protected boolean
Converts the flow to an automatic task flow and returns a template to fill in the details.Converts the flow to a DCM widget flow and returns a template to fill in the details.Converts the flow to an external flow and returns a template to fill in the details.This method makes the flow of type Function and returns a template to fill in function detailsmakeMessageEventFlow
(String messageEvent, String dataMapping) Converts the flow to an message event flow and returns a template to fill in the details.protected String
nextId()
protected void
registerEdge
(EdgeTemplate edgeTemplate) 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
setFlowTypeName
(String name) This method may be used to specify the name of the flow type.void
setIsExposed
(boolean isExposed) This method may be used to change the 'exposed' setting of the flow (default is true).void
setTransactional
(boolean isTransactional) This method may be used to mark a flow as transactional.com.aquima.interactions.flow.ds.IFlowDS
This method returns a data source implementation using the nodes defined in this template.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
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
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
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
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 theNodeTemplate.getEdge(String)
function- Parameters:
lhsExpression
- The expression of the condition node.- Returns:
- A new ConditionNodeTemplate node.
-
addServiceCallNode
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 inflowName
- The name of the flow to execute as function- Returns:
- Function node template representing the function call node.
-
addEndNode
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
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
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.
-
addRetryNode
This method may be used to add an event node to the flow. The event node is not connected to an existing node.- Returns:
- Template representing the retry event node.
-
getName
-
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
-
getAllEdges
-
registerEdge
-
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
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
Converts the flow to an external flow and returns a template to fill in the details.- Returns:
- the external flow template
-
makeDcmWidgetFlow
Converts the flow to a DCM widget flow and returns a template to fill in the details.- Returns:
- the DCm widget flow template
-
makeAutomaticTaskFlow
Converts the flow to an automatic task flow and returns a template to fill in the details.- Returns:
- the automatic task flow template
-
makeMessageEventFlow
public MessageEventFlowDefinitionTemplate makeMessageEventFlow(String messageEvent, String dataMapping) Converts the flow to an message event flow and returns a template to fill in the details.- Returns:
- the automatic task flow template
-
getServiceCall
-
addServiceCall
-
getFunctionCall
-
addFunctionCall
-
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
-
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.
-
getAllowedChannels
-
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.
-
nextId
-
getFlowTypeName
-
setFlowTypeName
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
-
getExternalFlowDefinition
-
getDcmWidgetFlowDefinition
-
getAutomaticTaskFlowDefinition
-
getMessageEventFlowDefinition
-