Package com.adobe.granite.workflow.model
Interface WorkflowModel
- All Superinterfaces:
HasMetaData
WorkflowModel represents a model/definition of a workflow.
It provides methods for retrieving the entities of the model like
WorkflowNodes and
WorkflowTransitions as well as common model attributes
like name, description or version.-
Method Summary
Modifier and TypeMethodDescriptioncreateNode(String title, String type, String description) createTransition(WorkflowNode from, WorkflowNode to, String rule) createVariableTemplate(String name, String dataType) Returns the description of theWorkflowModel.Returns the end.WorkflowNodegetId()Returns the ID of theWorkflowModel.Returns thewith the given idWorkflowNodegetNodes()Returns the list ofs contained by theWorkflowNodeWorkflowModel.Returns the root/start.WorkflowNodegetTitle()Returns the title of theWorkflowModel.Returns the list ofs contained by theWorkflowTransitionWorkflowModel.Returns the version of theWorkflowModel.voidsetDescription(String description) Sets the description of theWorkflowModel.voidsetEndNode(WorkflowNode node) voidsetRootNode(WorkflowNode node) voidSets the title of theWorkflowModel.voidvalidate()Validates the model.Methods inherited from interface com.adobe.granite.workflow.HasMetaData
getMetaDataMap
-
Method Details
-
getId
String getId()Returns the ID of theWorkflowModel.- Returns:
- The ID of the
WorkflowModel.
-
getTitle
String getTitle()Returns the title of theWorkflowModel.- Returns:
- The title of the
WorkflowModel.
-
setTitle
Sets the title of theWorkflowModel.- Parameters:
title- The new title of theWorkflowModel.
-
getDescription
String getDescription()Returns the description of theWorkflowModel.- Returns:
- The description of the
WorkflowModel.
-
setDescription
Sets the description of theWorkflowModel.- Parameters:
description- The new description of theWorkflowModel.
-
getVersion
String getVersion()Returns the version of theWorkflowModel.- Returns:
- The version of the
WorkflowModel.
-
getNodes
List<WorkflowNode> getNodes()Returns the list ofs contained by theWorkflowNodeWorkflowModel.- Returns:
- The list of
s of theWorkflowNodeWorkflowModel.
-
createNode
WorkflowNode createNode()- Returns:
- the created workflow node
-
createNode
- Parameters:
title- the titletype- the typedescription- the description- Returns:
- the created workflow node
-
setRootNode
- Parameters:
node- the workflow node
-
setEndNode
- Parameters:
node- the workflow node
-
getNode
Returns thewith the given idWorkflowNode- Parameters:
id- The ID of the.WorkflowNode- Returns:
- The
WorkflowNodeor 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
List<WorkflowTransition> getTransitions()Returns the list ofs contained by theWorkflowTransitionWorkflowModel.- Returns:
- The list of
s of theWorkflowTransitionWorkflowModel.
-
createTransition
WorkflowTransition createTransition()- Returns:
- the created workflow transition
-
createTransition
- 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
Validates the model.- Throws:
ValidationException- in case the validation fails
-
getVariableTemplates
Map<String,VariableTemplate> getVariableTemplates()- Returns:
- a
Mapwith keys as variables' names and values ass .VariableTemplate
-
createVariableTemplate
- Parameters:
name- the name of the variabledataType- the type of the variable in java fully qualified class name format- Returns:
- the created variable template
-