Interface ActivityTemplate

  • All Superinterfaces:
    AbstractActivity, BuildtimeActivity, PluginDataContainer, UserAttributeContainer

    public interface ActivityTemplate
    extends BuildtimeActivity
    An ActivityTemplate represents the object that is finally assigned (dragged) to a process node; it is a self-contained artificial vessel to transport all relevant information to the process model. Therefore it contains the merged information that is provided by the activity model by several entities, that is, it combines the attributes of an ExecutableComponentDescription, an Operation, optionally a ConfigurationSet and an ActivityTemplateDefinition.
    When dragged to a process node it will be connected to the data flow of the process and thus will become an activity.

    Besides its usage for the process model it can certainly also be used for other purposes, for instance, to display the merged attributes of the activity model in advance when editing it.

    Author:
    Ulrich Kreher
    • Method Detail

      • getDeveloperDescription

        String getDeveloperDescription()
        Gets a description for the process modeler and the administrator of the activity model. This description is not propagated to the process and is only part of the activity model.
        Returns:
        A description for the process modeler and the administrator of the activity model. This description is not propagated to the process and is only part of the activity model.
      • getState

        State getState()
        Gets the current deployment state of the activity model branch which is the aggregated state of the ActivityTemplateDefinition of this activity template and the state of its parent entities. The priority is as follows:
        • OUTDATED
        • IN_DEVELOPMENT
        • IN_PRODUCTION
        This means, an activity template will only be IN_PRODUCTION if all the corresponding activity model entities are also IN_PRODUCTION. OUTDATED has the highest priority and overrides all other states.
        Returns:
        The current deployment state as aggregated state of the activity model branch of this activity template. One OUTDATED entity causes this activity template to be outdated; for being IN_PRODUCTION, all entities also need to be IN_PRODUCTION.
      • getLicenceInformation

        String getLicenceInformation()
        Gets the licence information for the operation of this activity template. This may specify legal stuff for using the corresponding component.
        Returns:
        The licence information for the operation of this activity template or an empty string.
      • getConfigurationDescription

        ConfigurationDescription getConfigurationDescription()
        Gets the configuration description for this activity template, that is a description of all configuration values that are needed or supported at runtime. This also provides whether a configuration value is mandatory and its type.
        This configuration description is merged from the configuration description of the activity model branch of this activity template whereas configuration entries with the same name override the corresponding ones of the parent entities.
        Returns:
        The description for all configuration values of this activity template component, that is, the name of the configuration entries, their type and whether they are mandatory.
      • getConfiguration

        ActivityConfiguration getConfiguration()
        Gets the configuration of this abstract activity. These configuration values may also be provided via an input parameter (which has to exist then) or from a process configuration.
        Whether all of the configuration values are really set here, depends on the more special interface of this abstract activity. For instance, in the activity model, not all need to be set, while an activity instance does have all configuration values. The configuration values are merged from the configuration values of the activity model branch of this activity template whereas configuration values with the same entry name override the corresponding ones of the parent entities.
        Specified by:
        getConfiguration in interface AbstractActivity
        Returns:
        The configuration values set for this activity template based on the configuration description. This does not necessarily contain all values since they can still be set for the activity.
      • getParameters

        Set<ATParameter> getParameters​(ActivityConstants.AccessType accessType)
        Gets the parameters of the designated access type of the operation of this activity template. That is all parameters of the entities of the activity model branch of this activity template whereas parameters with the same name override the corresponding ones of parent entities. These make up the interface of the operation. Depending on the parameter change policy of this operation, its collection of parameters may be fix, parameters may be changed and/or parameters may be added to the collection. Apparently this requires the underlying implementation of this operation to check for the defined parameters at runtime and react appropriately.
        Parameters are identified by the access type, for instance input or output parameter, and their name.

        The parameters need not be based on parameter templates of the activity template.

        Specified by:
        getParameters in interface AbstractActivity
        Parameters:
        accessType - The access type of the parameters to be retrieved (only values in ActivityConstants.AccessType.activityRelatedValues() are allowed).
        Returns:
        The parameters of the operation of this activity template for the designated access type. If the operation does not have parameters of the designated type or they are not defined yet (since they may be added for the corresponding activity), an empty collection will be returned.
      • getParameter

        ATParameter getParameter​(String name,
                                 ActivityConstants.AccessType accessType)
        Description copied from interface: AbstractActivity
        Gets the parameter object linked to the passed parameter name. The parameter name is the symbolic name by which an application component can retrieve a data value from the data context of the process management system.
        Specified by:
        getParameter in interface AbstractActivity
        Parameters:
        name - The name of the parameter.
        accessType - The access type of the parameter. Only values in ActivityConstants.AccessType.activityRelatedValues() are allowed!
        Returns:
        The corresponding parameter object or null in case no parameter of the designated name exists for the designated access type.
      • getParameterTemplates

        Map<String,​ATParameterTemplate> getParameterTemplates()
        Gets parameter templates that are defined for this activity template. That is all parameter templates of the entities of the activity model branch of this activity template whereas parameter templates having the same name override the corresponding ones of parent entities. This allows to simplify the creation of parameters for operations, activity template definitions and activity templates for operations with a non-fixed interfaces (generic interfaces).

        This templates need not be used at all when creating parameters. If an operation needs to ensure that only these templates are used, an appropriate check needs to be provided that verifies the created parameters.

        Returns:
        Templates for parameters that may be added to the activity of this activity template. This is the merged collection of all parameter templates of the corresponding activity model branch. If no parameter templates are defined, an empty collection will be returned.
      • getStaffAssignmentRule

        String getStaffAssignmentRule()
        Gets the staff assignment rule that is proposed by the developer of the operation of this activity template or the administrator of the activity model. This simplifies usage of the operation in a process. However, the process modeler can deviate from this.
        An empty string will be returned if this is undefined.
        Returns:
        The staff assignment rule that is proposed by the developer of the operation of this activity template or the administrator of the activity model or an empty string.
      • getIdentifiers

        Map<UUID,​Identifier> getIdentifiers()
        Gets all identifiers of all (defined) parameters of this activity template independent from the access type of the parameters. This is a convenient method for retrieving the parameters for all access types and iterating over all of them.
        Returns:
        All identifiers of all (defined) parameters of this activity template independent from the access type of the parameters.