Interface TemplateReference
-
- All Superinterfaces:
PluginDataContainer
,UserAttributeContainer
- All Known Subinterfaces:
TemplateProxy
public interface TemplateReference extends UserAttributeContainer, PluginDataContainer
The lightweight representation of a process template. This reference allows to return just the data necessary to display the process template to the user. A full-fledged process template is represented by a corresponding interface of the ADEPT2-processmodel.- Author:
- Ulrich Kreher
- See Also:
Template
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
areInstancesChangeable(boolean subprocessScope)
Returns the comment set for the "instances migratable to"-status for either subprocess or top-level-usage.boolean
areInstancesMigratableTo(boolean subprocessScope)
Returns whether instances running on a parent process template may be migrated to this process template or not.ProcessConstants.TemplateBuildtimeState
getBuildtimeState()
Gets the state of this process template while it may be modified and is not released.String
getDescription()
Gets the description of the referenced process template.UUID
getID()
Gets the unique (with respect to a process repository) ID of the referenced process template.Set<ProcessModelParameter>
getInputParameters()
Gets the input parameters of the referenced process template that has to be provided when a corresponding instance is started as a list.String
getName()
Gets the name (not necessarily unique) of the referenced process template.Set<ProcessModelParameter>
getOutputParameters()
Gets the output parameters of the referenced process template that are provided to a surrounding process template as a list.String
getProcessType()
Gets the unique process type name of the referenced process template.QualifiedAgent
getSupervisorAgent()
Returns the supervisor agent of the process template.ProcessConstants.TemplateUsage
getUsageAsSubprocess()
Gets how the template may be used, that is whether the template may be used as a top-level process only, a copied subprocess, a referenced subprocess or both.String
getVersion()
Gets the logic version of the template, which distinguishes between, for instance, the major and minor versions (1.1.x vs. 1.x.y).boolean
isDerivable()
Returns whether this process template may be derived and therefore modified.boolean
isInstantiable(boolean subprocessScope)
Returns whether this process template may be instantiated or not.boolean
isOutdated(boolean subprocessScope)
Returns whether this process template is outdated and should not be used any more.boolean
isTopLevelUsable()
Returns whether this template may be used as top-level process-
Methods inherited from interface de.aristaflow.adept2.model.common.PluginDataContainer
getPluginData, getPluginDatas, getSupportedPlugins
-
Methods inherited from interface de.aristaflow.adept2.model.common.UserAttributeContainer
getUserAttributes, getUserAttributeValue, removeUserAttributeValue, setUserAttributeValue
-
-
-
-
Method Detail
-
getID
UUID getID()
Gets the unique (with respect to a process repository) ID of the referenced process template.- Returns:
- The ID of the referenced process template.
- See Also:
Template.getID()
-
getProcessType
String getProcessType()
Gets the unique process type name of the referenced process template. Every process template belongs to a well-defined process type. Process types are identified by a unique (with respect to a process repository) name.- Returns:
- The (name of the) process type corresponding to the referenced process template.
- See Also:
Template.getProcessType()
-
getVersion
String getVersion()
Gets the logic version of the template, which distinguishes between, for instance, the major and minor versions (1.1.x vs. 1.x.y). The version has merely a semantic meaning.- Returns:
- A string representing a logical version number to be able to distinguish between minor and major changes.
- See Also:
Template.getVersion()
-
getName
String getName()
Gets the name (not necessarily unique) of the referenced process template. Though it might be advisable for easier usage to use distinct names.- Returns:
- The name of the referenced process template.
- See Also:
Template.getName()
-
getDescription
String getDescription()
Gets the description of the referenced process template.- Returns:
- The description of the referenced process template.
- See Also:
Template.getDescription()
-
getSupervisorAgent
QualifiedAgent getSupervisorAgent()
Returns the supervisor agent of the process template.- Returns:
- The supervisor agent of the process template.
- See Also:
Template.getSupervisorAgent()
-
getInputParameters
Set<ProcessModelParameter> getInputParameters()
Gets the input parameters of the referenced process template that has to be provided when a corresponding instance is started as a list. Input parameters are all data elements that are written normally (no system write data edge) by the start node.- Returns:
- A list of input parameters that the referenced process template needs to read when instantiated.
- See Also:
Template.getParameters(de.aristaflow.adept2.model.globals.ActivityConstants.AccessType)
-
getOutputParameters
Set<ProcessModelParameter> getOutputParameters()
Gets the output parameters of the referenced process template that are provided to a surrounding process template as a list. Output parameters are all data elements that are read normally (no system read data edge) by the end node.- Returns:
- A list of output parameters that the referenced process template provides when terminated.
- See Also:
Template.getParameters(de.aristaflow.adept2.model.globals.ActivityConstants.AccessType)
-
isTopLevelUsable
boolean isTopLevelUsable()
Returns whether this template may be used as top-level process- Returns:
true
if this process template may be instantiated as top-level process.- See Also:
TemplateStatus.isTopLevelUsable()
-
getUsageAsSubprocess
ProcessConstants.TemplateUsage getUsageAsSubprocess()
Gets how the template may be used, that is whether the template may be used as a top-level process only, a copied subprocess, a referenced subprocess or both.- Returns:
- The subprocess usage of the template (none, copy, reference or both).
- See Also:
TemplateStatus.getUsageAsSubprocess()
-
getBuildtimeState
ProcessConstants.TemplateBuildtimeState getBuildtimeState()
Gets the state of this process template while it may be modified and is not released. A template can be in construction, locked or valid.- Returns:
- The TemplateBuildtimeState of this template specifying whether changes are allowed.
- See Also:
TemplateStatus.getBuildtimeState()
-
isDerivable
boolean isDerivable()
Returns whether this process template may be derived and therefore modified. Besides creating a child template of the same branch, derivable is also applicable to the creation of a new branch, starting with this template. Initially a released process template may be derived. This is for top-level usage only since it refers to the template as stand-alone object in the process repository.- Returns:
true
if the referenced process template may be derived.- See Also:
TemplateStatus.isDerivable()
-
isOutdated
boolean isOutdated(boolean subprocessScope)
Returns whether this process template is outdated and should not be used any more. This results in a warning message when using the template, for example when the template is instantiated, derived and migrated to. Initially a released process template is not outdated, that is "active".Please note that the returned state will have to be ignored if the request is for subprocess scope and the template usage is
NO_SUBPROCESS
.- Parameters:
subprocessScope
- Whether the scope of the asked for template state is for subprocess usage (template is referenced) or for usage as top-level process.- Returns:
true
if this process template is outdated and should not be used any more. Ignore the returned value if the request is for subprocess scope and the template usage isTemplateUsage.NO_SUBPROCESS
.- See Also:
ProcessConstants.TemplateUsage
,getUsageAsSubprocess()
,TemplateStatus.isOutdated(boolean)
-
isInstantiable
boolean isInstantiable(boolean subprocessScope)
Returns whether this process template may be instantiated or not. This state has no effect on already running instances. Initially a released process template is not instantiable.Please note that the returned state will have to be ignored if the request is for subprocess scope and the template usage is
NO_SUBPROCESS
.- Parameters:
subprocessScope
- Whether the scope of the asked for template state is for subprocess usage (template is referenced) or for usage as top-level process.- Returns:
true
if this process template may be instantiated. Ignore the returned value if the request is for subprocess scope and the template usage isTemplateUsage.NO_SUBPROCESS
.- See Also:
ProcessConstants.TemplateUsage
,getUsageAsSubprocess()
,TemplateStatus.isInstantiable(boolean)
-
areInstancesMigratableTo
boolean areInstancesMigratableTo(boolean subprocessScope)
Returns whether instances running on a parent process template may be migrated to this process template or not. Initially a released process template is not migratable to, this means this method returns false.Please note that the returned state will have to be ignored if the request is for subprocess scope and the template usage is
NO_SUBPROCESS
.- Parameters:
subprocessScope
- Whether the scope of the asked for template state is for subprocess usage (template is referenced) or for usage as top-level process.- Returns:
true
if instances may be migrated to the referenced process template. Ignore the returned value if the request is for subprocess scope and the template usage isTemplateUsage.NO_SUBPROCESS
.- See Also:
ProcessConstants.TemplateUsage
,getUsageAsSubprocess()
,TemplateStatus.areInstancesMigratableTo(boolean)
-
areInstancesChangeable
boolean areInstancesChangeable(boolean subprocessScope)
Returns the comment set for the "instances migratable to"-status for either subprocess or top-level-usage.Please note that the returned comment will have to be ignored if the request is for subprocess scope and the template usage is
NO_SUBPROCESS
.- Parameters:
subprocessScope
- Whether the scope of the asked for template state is for subprocess usage (template is referenced) or for usage as top-level process.- Returns:
- The comment set for the current "instances migratable to"-status or
null if not set. Ignore the returned value if the request is for
subprocess scope and the template usage is
TemplateUsage.NO_SUBPROCESS
. - See Also:
TemplateStatus.areInstancesChangeable(boolean)
-
-