Package com.adobe.granite.workflow.model
Interface WorkflowModel
-
- All Superinterfaces:
HasMetaData
@ProviderType public interface WorkflowModel extends HasMetaData
WorkflowModel
represents a model/definition of a workflow. It provides methods for retrieving the entities of the model like
s andWorkflowNode
s as well as common model attributes like name, description or version.WorkflowTransition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkflowNode
createNode()
WorkflowNode
createNode(java.lang.String title, java.lang.String type, java.lang.String description)
WorkflowTransition
createTransition()
WorkflowTransition
createTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)
VariableTemplate
createVariableTemplate(java.lang.String name, java.lang.String dataType)
java.lang.String
getDescription()
Returns the description of theWorkflowModel
.WorkflowNode
getEndNode()
Returns the end
.WorkflowNode
java.lang.String
getId()
Returns the ID of theWorkflowModel
.WorkflowNode
getNode(java.lang.String id)
Returns the
with the given idWorkflowNode
java.util.List<WorkflowNode>
getNodes()
Returns the list of
s contained by theWorkflowNode
WorkflowModel
.WorkflowNode
getRootNode()
Returns the root/start
.WorkflowNode
java.lang.String
getTitle()
Returns the title of theWorkflowModel
.java.util.List<WorkflowTransition>
getTransitions()
Returns the list of
s contained by theWorkflowTransition
WorkflowModel
.java.util.Map<java.lang.String,VariableTemplate>
getVariableTemplates()
java.lang.String
getVersion()
Returns the version of theWorkflowModel
.void
setDescription(java.lang.String description)
Sets the description of theWorkflowModel
.void
setEndNode(WorkflowNode node)
void
setRootNode(WorkflowNode node)
void
setTitle(java.lang.String title)
Sets the title of theWorkflowModel
.void
validate()
Validates the model.-
Methods inherited from interface com.adobe.granite.workflow.HasMetaData
getMetaDataMap
-
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the ID of theWorkflowModel
.- Returns:
- The ID of the
WorkflowModel
.
-
getTitle
java.lang.String getTitle()
Returns the title of theWorkflowModel
.- Returns:
- The title of the
WorkflowModel
.
-
setTitle
void setTitle(java.lang.String title)
Sets the title of theWorkflowModel
.- Parameters:
title
- The new title of theWorkflowModel
.
-
getDescription
java.lang.String getDescription()
Returns the description of theWorkflowModel
.- Returns:
- The description of the
WorkflowModel
.
-
setDescription
void setDescription(java.lang.String description)
Sets the description of theWorkflowModel
.- Parameters:
description
- The new description of theWorkflowModel
.
-
getVersion
java.lang.String getVersion()
Returns the version of theWorkflowModel
.- Returns:
- The version of the
WorkflowModel
.
-
getNodes
java.util.List<WorkflowNode> getNodes()
Returns the list of
s contained by theWorkflowNode
WorkflowModel
.- Returns:
- The list of
s of theWorkflowNode
WorkflowModel
.
-
createNode
WorkflowNode createNode()
- Returns:
- the created workflow node
-
createNode
WorkflowNode createNode(java.lang.String title, java.lang.String type, java.lang.String description)
- Parameters:
title
- the titletype
- the typedescription
- the description- Returns:
- the created workflow node
-
setRootNode
void setRootNode(WorkflowNode node)
- Parameters:
node
- the workflow node
-
setEndNode
void setEndNode(WorkflowNode node)
- Parameters:
node
- the workflow node
-
getNode
WorkflowNode getNode(java.lang.String id)
Returns the
with the given idWorkflowNode
- Parameters:
id
- The ID of the
.WorkflowNode
- Returns:
- The
WorkflowNode
or null if not found.
-
getRootNode
WorkflowNode getRootNode()
Returns the root/start
.WorkflowNode
- Returns:
- The root
.WorkflowNode
-
getEndNode
WorkflowNode getEndNode()
Returns the end
.WorkflowNode
- Returns:
- The end
.WorkflowNode
-
getTransitions
java.util.List<WorkflowTransition> getTransitions()
Returns the list of
s contained by theWorkflowTransition
WorkflowModel
.- Returns:
- The list of
s of theWorkflowTransition
WorkflowModel
.
-
createTransition
WorkflowTransition createTransition()
- Returns:
- the created workflow transition
-
createTransition
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to, java.lang.String rule)
- Parameters:
from
- the workflow node to begin the transition withto
- the workflow node to end the transition withrule
- the rule- Returns:
- the created workflow transition
-
validate
void validate() throws ValidationException
Validates the model.- Throws:
ValidationException
- in case the validation fails
-
getVariableTemplates
java.util.Map<java.lang.String,VariableTemplate> getVariableTemplates()
- Returns:
- a
Map
with keys as variables' names and values as
s .VariableTemplate
-
createVariableTemplate
VariableTemplate createVariableTemplate(java.lang.String name, java.lang.String dataType)
- Parameters:
name
- the name of the variabledataType
- the type of the variable in java fully qualified class name format- Returns:
- the created variable template
-
-