Interface ActivityTemplateDefinition
-
- All Superinterfaces:
AbstractActivityTemplateDefinition
,PluginDataContainer
,UserAttributeContainer
public interface ActivityTemplateDefinition extends AbstractActivityTemplateDefinition
ActivityTemplateDefinition
s are located belowOperation
s, that is, they override the attributes of operations. Usually they are just a specific configuration of the corresponding parent entity/Operation
. For instance, an operation for a generic wrapper calling arbitrary Java methods, may have severalActivityTemplateDefinition
s which represent a specific Java-method each. This allows for very simple usage of these Java methods in a process.
ThusActivityTemplateDefinition
s are the leafs of the activity model branches, that is, they do not have child entities in the activity model. However, they do have offspring (theActivityTemplate
s) that are based on the activity template definition and that may inherit or override the very same attributes.ActivityTemplate
s are not part of an activity model branch but rather a container for the merged attributes of the entities of an activity model branch.
All methods for retrieving an overridden attribute return a merged value, that is the value resulting after overriding (exceptgetOwnClassPath()
).ActivityTemplateDefinition
s provide an additionalID
relative to the operation, that uniquely identifies an activity template (and therefore a complete activity model branch) including its revision. This allows for version branches, that is, changingActivityTemplateDefinition
s in two different activity models that both originally stem from the same activity model branch and therefore having the same names.To allow for common configurations, activity templates may be based on
ConfigurationSet
s. In this case, they also belong to anOperation
but they inherit the configurations (configuration description, normal and test configuration), the parameter templates and the staff assignment rule from the configuration set before inheriting from the corresponding operation. Therefore requesting the inheritance state of these attributes refers to a configuration set if present (getConfiguration()
returns a valid configuration set).
Configuration sets provide configurations either for all of its activity template definitions, for specific executable component descriptions or for specific operations. However, since these are merged, an activity template definition overrides all of them. The documentation of the corresponding methods of this class does not reflect this directly but refers only to one of these configurations.- Author:
- Ulrich Kreher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>
getClassPath()
Gets the classpath to be used when instantiating theimplementation class
for this activity template definition as well as all classes needed to execute all of its methods.InheritedActivityConfiguration
getConfiguration()
Gets the configuration of this activity template description that corresponds to the configuration description of this activity template.InheritedConfigurationDescription
getConfigurationDescription()
Gets the configuration description for this activity template.ConfigurationSet
getConfigurationSet()
Gets the configuration set of this activity template definition ornull
in case this activity template definition does not have a configuration set.Operation
getOperation()
Gets the operation of this activity template definition.List<String>
getOwnClassPath()
Gets the part of theclasspath
that is added by this activity template definition to the one of theparent attribute
.InheritedCollection<String,ActivityModelParameter>
getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of the operation of this activity template definition.InheritedCollection<String,ParameterTemplate>
getParameterTemplates()
Gets parameter templates that are defined for the operation of this activity template definition or that are removed from the ones of the parent entity.StorageActivityTemplateDefinition
getStorageATD()
Gets the object that allows to easily store the data of thisActivityTemplateDefinition
.InheritedActivityConfiguration
getTestConfiguration()
Gets the test configuration of this activity template definition that corresponds to theconfiguration description
of this activity template definition.void
setClassPath(List<String> classPath)
Sets the classpath to be used when instantiating and executing theimplementation class
for the executable component of this activity template definition.void
setConfiguration(InheritedActivityConfiguration configuration)
Sets the configuration of this activity template definition to the designated one.void
setConfigurationDescription(InheritedConfigurationDescription description)
Sets the configuration description for this activity template definition.void
setParameters(ActivityConstants.AccessType accessType, InheritedCollection<String,ActivityModelParameter> parameters)
Sets all the parameters of the designated access type of the operation of this activity template definition.void
setParameterTemplates(InheritedCollection<String,ParameterTemplate> parameterTemplates)
Sets parameter templates that are defined for this activity template definition and its offspring.void
setTestConfiguration(InheritedActivityConfiguration testConfiguration)
Sets the test configuration of the operation of this activity template definition to the designated one.-
Methods inherited from interface de.aristaflow.adept2.model.activitymodel.AbstractActivityTemplateDefinition
areExecutionControlPropertiesInherited, getClassLoaderUsage, getDescription, getDeveloperDescription, getExecutionControlProperties, getGUIContextID, getIconID, getID, getImplementationClass, getLicenceInformation, getName, getParameterChangePolicy, getRevision, getStaffAssignmentRule, getState, getSystemComponent, isClassLoaderUsageInherited, isDescriptionInherited, isDeveloperDescriptionInherited, isGUIContextIDInherited, isIconIDInherited, isImplementationClassInherited, isLicenceInformationInherited, isParameterChangePolicyInherited, isStaffAssignmentRuleInherited, isSupportsTestExecutionInherited, isSupportsViewOnlyInherited, isSystemComponentInherited, removeOwnClassLoaderUsage, removeOwnDescription, removeOwnDeveloperDescription, removeOwnExecutionControlProperties, removeOwnGUIContextID, removeOwnIconID, removeOwnImplementationClass, removeOwnLicenceInformation, removeOwnParameterChangePolicy, removeOwnStaffAssignmentRule, removeOwnSupportsTestExecution, removeOwnSupportsViewOnly, removeOwnSystemComponent, setClassLoaderUsage, setDescription, setDeveloperDescription, setExecutionControlProperties, setGUIContextID, setIconID, setID, setImplementationClass, setLicenceInformation, setName, setParameterChangePolicy, setStaffAssignmentRule, setSupportsTestExecution, setSupportsViewOnly, setSystemComponent, supportsTestExecution, supportsViewOnly
-
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
-
getOperation
Operation getOperation()
Gets the operation of this activity template definition.- Returns:
- The operation of this activity template definition.
-
getConfigurationSet
ConfigurationSet getConfigurationSet()
Gets the configuration set of this activity template definition ornull
in case this activity template definition does not have a configuration set.- Returns:
- The configuration set of this activity template definition or
null
.
-
getClassPath
List<String> getClassPath()
Gets the classpath to be used when instantiating theimplementation class
for this activity template definition as well as all classes needed to execute all of its methods.
The classpath contains all classpaths of the corresponding activity model branch whereas the classpath of child entities prepends the one of parent entities. The usual classpaths (directories, jar-files, URLs) as well as references to the resource manager are supported.
The classpath may be supplemented by the configurations that apply at runtime.- Returns:
- A list of entries for the classpath to search for classes used at runtime. The order is important: Prior entries are used first; they are provided by child entities of the corresponding activity model branch.
-
getOwnClassPath
List<String> getOwnClassPath()
Gets the part of theclasspath
that is added by this activity template definition to the one of theparent attribute
. In case this activity template definition does not supplement the classpath this will be an empty list.- Returns:
- The part of the classpath that is contributed by this activity template definition. This is appended to the classpath of the parent entity and thus forms the complete classpath.
-
getConfigurationDescription
InheritedConfigurationDescription getConfigurationDescription()
Gets the configuration description for this activity template. This may change the configuration description of the corresponding executable component description, operation and configuration set or add new entries. Note that removal of an inherited entry is not possible and has to be simulated by providing a null value as configuration value.This configuration description is merged with the configuration description of the corresponding operation or the configuration description of the corresponding configuration set.
- Returns:
- The description for all configuration values of this activity template definition, that is, the name of the configuration entries, their type and whether they are mandatory.
-
getConfiguration
InheritedActivityConfiguration getConfiguration()
Gets the configuration of this activity template description that corresponds to the configuration description of this activity template. These configuration values are provided as defaults for this activity template. They may be overridden (unless fixed) and not all configuration values need to be provided yet. Configuration values may also be provided via an input parameter (which has to exist for this operation then) or from a process configuration (which is needed when modelling).This configuration is merged with the configuration of the corresponding operation or the configuration of the corresponding configuration set.
- Returns:
- The configuration values set for this activity template definition based on the configuration description. This does not necessarily contain all values since they can still be set when modelling.
-
getTestConfiguration
InheritedActivityConfiguration getTestConfiguration()
Gets the test configuration of this activity template definition that corresponds to theconfiguration description
of this activity template definition. These configuration values only apply when the operation is executed in test mode, that is the operation is provided this configuration instead of thenormal configuration
. This test configuration is merged with the normal configuration. Note that the test configuration allows to override fixed values of the normal configuration.- Returns:
- The merged configuration values set for the test mode of this activity template definition based on the configuration description.
-
getParameters
InheritedCollection<String,ActivityModelParameter> getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of the operation of this activity template definition. The returned collection will be the resulting collection when merging all parameters of the activity model branch.The parameters need not be based on parameter templates of this activity template definition or its parent entities.
- Parameters:
accessType
- The access type of the parameters to be retrieved (only values inActivityConstants.AccessType.activityRelatedValues()
are allowed).- Returns:
- The parameters of the operation of this activity template definition for the designated access type (mapped from parameter name to the corresponding parameter). If this operation does not have parameters of the designated type or they are not defined yet (since they may be added later), an empty collection will be returned.
-
getParameterTemplates
InheritedCollection<String,ParameterTemplate> getParameterTemplates()
Gets parameter templates that are defined for the operation of this activity template definition or that are removed from the ones of the parent entity.This collection of parameter templates is merged with the collection of parameter templates of the corresponding operation.
- Returns:
- Templates for parameters (mapped from parameter template name to the corresponding parameter template) that may be added to the activity template of this activity template definition.
-
getStorageATD
StorageActivityTemplateDefinition getStorageATD()
Gets the object that allows to easily store the data of thisActivityTemplateDefinition
. This provides the data without merging it before, that is, these are only the differences with respect to the parent entities.The returned object is for storing only! You should not rely on it to retrieve unmerged attribute values! If you need these, you will have to use appropriate tool methods or "unmerge" them yourself.
- Returns:
- The object for storing this
ActivityTemplateDefinition
by just providing the differences with respect to the parent entities. That is no attribute value is merged with the corresponding parent attribute.
-
setClassPath
void setClassPath(List<String> classPath)
Sets the classpath to be used when instantiating and executing theimplementation class
for the executable component of this activity template definition.
The classpath is ordered, prior entries are searched before subsequent entries. The usual classpaths (directories, jar-files, URLs) as well as references to thecode manager
are supported.This attribute supplements the
parent attribute
, that is the classpath of this entity prepends the classpath of the parent entity. The designated classpath may already be merged, implementations have to separate the inherited part if necessary.- Parameters:
classPath
- A list of entries for the classpath to search for classes used at runtime. The order is important: Prior entries are used first. This classpath (the first part that differs from the inherited classpath) prepends the classpath of the parent entity.
-
setConfigurationDescription
void setConfigurationDescription(InheritedConfigurationDescription description)
Sets the configuration description for this activity template definition. This may change the configuration description of the corresponding executable component description, the operation and the configuration set. Note that removal of an inherited entry is not possible and has to be simulated by providing a null value as configuration value.
The configuration description has to be set as a whole; to add or modify single entries, retrieve the complete description from this activity template definition, add or modify the entry and provide the complete description again to this method. Usenull
to remove it from this activity template definition and inherit the configuration description of the parent entity without any changes.The designated configuration description is merged with the configuration description of the corresponding operation or the configuration description of the corresponding configuration set.
- Parameters:
description
- The description for all configuration values of this activity template definition, that is, the name of the configuration entries, their type and whether they are mandatory. Usenull
to remove the configuration description from this activity template definition, that is, it will be inherited from the parent entity again.
-
setConfiguration
void setConfiguration(InheritedActivityConfiguration configuration)
Sets the configuration of this activity template definition to the designated one. The provided configuration has to correspond to the (merged) configuration description of this activity template definition and parent entities, that is the values have to have appropriate configuration entries. Not all configuration entries need to have a value yet except the fixed ones. The values may also be retrieved from process parameters or the process configuration (determined when modelling).The configuration has to be set as a whole; to add or modify single values, retrieve the complete configuration, add or modify the value and provide the complete configuration again to this method. Use
null
to remove the configuration from this activity template definition, that is, it will be inherited from the parent entity again.The designated configuration is merged with the configuration of the corresponding operation or the configuration of the corresponding configuration set.
- Parameters:
configuration
- The configuration values set for this activity template definition based on the configuration description. This does not necessarily contain all values since they can still be set when modelling. Usenull
to remove the configuration from this activity template definition, that is, it will be inherited from the parent entity again.
-
setTestConfiguration
void setTestConfiguration(InheritedActivityConfiguration testConfiguration)
Sets the test configuration of the operation of this activity template definition to the designated one. The provided configuration has to correspond to the (merged)configuration description
of this activity template definition, that is the values have to have appropriate configuration entries.
These configuration values only apply when the operation is executed in test mode, that is the operation is provided this configuration instead of thenormal configuration
. This test configuration is merged with the normal configuration. Note that the test configuration allows to override fixed values of the normal configuration. The values may also be retrieved from process parameters or the process configuration (determined when modelling).The configuration has to be set as a whole; to add or modify single values, retrieve the complete configuration, add or modify the value and provide the complete configuration again to this method. Use
null
to remove the test configuration from this activity template definition, that is, it will be inherited from the parent entity again.- Parameters:
testConfiguration
- The configuration values set for the test mode of the operation of this activity template definition based on the configuration description. This does not necessarily contain all values since they can still be set when modelling or taken from the normal configuration. Usenull
to remove the test configuration from this activity template definition, that is, it will be inherited from the parent entity again.
-
setParameters
void setParameters(ActivityConstants.AccessType accessType, InheritedCollection<String,ActivityModelParameter> parameters)
Sets all the parameters of the designated access type of the operation of this activity template definition. These make up the interface of the operation. Depending on theparameter change policy
of this activity template definition, its collection of parameters may be fix, changed and/or added; removal is not allowed. However, the parameter change policy of this activity template definition does not apply to this activity template definition but to its offspring.
Parameters are identified by the access type, for instance input or output parameter, and their name. Usenull
for removing all parameter templates of this activity template definition, that is, the parameters will be inherited from the parent entity again.
The parameters need not be based on parameter templates of this activity template definition or its parent entities.
The designated collection of parameters is merged with the collection of parameters of the corresponding operation.
- Parameters:
accessType
- The access type of the parameters to be retrieved (only values inActivityConstants.AccessType.activityRelatedValues()
are allowed).parameters
- The parameters of the operation of this activity template definition for the designated access type. If the operation does not have parameters of the designated type providenull
. This removes overriding parameters and inherits them from the parent entity again.
-
setParameterTemplates
void setParameterTemplates(InheritedCollection<String,ParameterTemplate> parameterTemplates)
Sets parameter templates that are defined for this activity template definition and its offspring. This may change the parameter templates of the corresponding parent entities or add new parameter templates; removal is not allowed. If you need removal, add a new template and override the description of the one to be removed stating that it should not be used.When setting the parameter templates the whole collection has to be set; to add or modify single parameter templates retrieve the complete templates from this activity template definition, add or modify the template and provide the collection of templates again to this method. Use
null
for removing all parameter templates of this activity template definition, that is, the parameter templates will be inherited from the parent entity again.
It will not be allowed to set parameter templates for this activity template definition if the parameter change policy of this activity template definition does not allow to add or change real parameters (ParameterChangePolicy.ADD_VIRTUAL
orParameterChangePolicy.FIXED
); onlynull
will be accepted. It will not make sense to set parameter templates if the offspring entities are not allowed to add or change parameters.The designated collection of parameter templates is merged with the collection of parameter templates of the corresponding operation.
- Parameters:
parameterTemplates
- A collection containing all parameter templates that are defined for this activity template definition.
-
-