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.
See Also:
  • Method Details

    • 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:
    • 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. The process type may be null.
      Returns:
      The (name of the) process type corresponding to the referenced process template or null.
      See Also:
    • 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. This may be null.
      Returns:
      A string representing a logical version number to be able to distinguish between minor and major changes or null.
      See Also:
    • 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:
    • getDescription

      String getDescription()
      Gets the description of the referenced process template. THis may be null.
      Returns:
      The description of the referenced process template or null.
      See Also:
    • getSupervisorAgent

      QualifiedAgent getSupervisorAgent()
      Returns the supervisor agent of the process template.
      Returns:
      The supervisor agent of the process template.
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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 is TemplateUsage.NO_SUBPROCESS.
      See Also:
    • 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 is TemplateUsage.NO_SUBPROCESS.
      See Also:
    • 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 is TemplateUsage.NO_SUBPROCESS.
      See Also:
    • 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: