Interface AbstractActivity
-
- All Superinterfaces:
PluginDataContainer
,UserAttributeContainer
- All Known Subinterfaces:
Activity
,ActivityInstance
,ActivityTemplate
,BuildtimeActivity
,DecisionActivity
,DecisionActivityInstance
public interface AbstractActivity extends PluginDataContainer, UserAttributeContainer
AnAbstractActivity
unifies the similarities of activities (used in the process model), activity templates (intermediate objects for transferring the necessary information from the activity model to the process model), activity template definitions (the corresponding objects in the activity model) and activity instances (the objects that are finally executed). This allows for easier implementation of checks based on these objects. However, the semantic of the attributes may slightly differ especially for theActivityTemplateDefintion
since all other activity objects stem from such an activity template definition. Refer to the documentation of the corresponding interface for further information.- Author:
- Ulrich Kreher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getActivityName()
Gets the name of this abstract activity.Map<ActivityConstants.LocallyOverrideableActivityAttribute,ActivityConstants.ActivityModelEntityType>
getAttributeOrigins()
Gets the origins, that is the activity model entity types, a specific attribute of an activity stems from.ClassLoaderUsage
getClassLoaderUsage()
Gets what classloader to use for execution of this activity.List<String>
getClassPath()
Gets the classpath to be used when instantiating theimplementation class
for this abstract activity as well as all classes needed to execute all of its methods.ActivityConfiguration
getConfiguration()
Gets the configuration of this abstract activity.String
getConfigurationName()
Gets the name of the configuration set (in the activity model) or the configuration namespace (for the global and local runtime configurations) or null if this abstract activity does not have a configuration set/namespace.String
getDescription()
Gets a description for this abstract activity for usage in the process model.String
getExecutableComponentName()
Gets the system-wide unique name of theExecutableComponentDescription
this abstract activity is based upon.ExecutionControlProperties
getExecutionControlProperties()
Gets the interactions that the executable component of this abstract activity supports for controlling its execution, that is whether the component responds to signals from the outside to suspend, reset or close the component.String
getGUIContextID()
Gets the ID of the GUI context the executable component of this abstract activity needs, for instance, an SWT or an AWT context.UUID
getIconID()
Gets the ID of the icon to use for process steps and worklist items of the underlying executable component.UUID
getID()
Gets the (world-wide) unique ID of theActivityTemplateDefinition
this abstract activity is based upon.String
getImplementationClass()
Gets the name of the class implementingExecutableComponent
which is called when the process node is executed for which this abstract activity is for.String
getOperationName()
Gets the name of the operation (unique with respect to theExecutableComponentDescription
) this abstract activity belongs to.Parameter
getParameter(String name, ActivityConstants.AccessType accessType)
Gets the parameter object linked to the passed parameter name.Set<? extends Parameter>
getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of the operation of this abstract activity.Map<ActivityConstants.ActivityModelEntityType,List<String>>
getSeparatedClassPaths()
Gets the classpath separated by the activity model entity type a part of the classpath stems from.byte[]
getSystemComponent()
Gets the signature in case the executable component of this abstract activity is privileged component and may access system services.boolean
supportsViewOnly()
Gets whether the operation of this abstract activity supports a view only mode.-
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 (world-wide) unique ID of theActivityTemplateDefinition
this abstract activity is based upon. This changes with every revision and thus allows to identify a revision since thenormal revision
does not suffice to identify anActivityTemplateDefinition
since two different activity models usually go through the very same revisions but with different changes.- Returns:
- The (world-wide) unique ID (including the revision) of the
ActivityTemplateDefinition
this abstract activity is based upon.
-
getExecutableComponentName
String getExecutableComponentName()
Gets the system-wide unique name of theExecutableComponentDescription
this abstract activity is based upon.- Returns:
- The system-wide unique name of the
ExecutableComponentDescription
this abstract activity is based upon which also identifies the configurations that apply at runtime
-
getOperationName
String getOperationName()
Gets the name of the operation (unique with respect to theExecutableComponentDescription
) this abstract activity belongs to. This name is used in configurations that apply at runtime for operation-specific configurations. Therefore one may have configuration values for executable components as well as operations.- Returns:
- The name of the operation (unique with respect to the
ExecutableComponentDescription
) this abstract activity is based upon.
-
getConfigurationName
String getConfigurationName()
Gets the name of the configuration set (in the activity model) or the configuration namespace (for the global and local runtime configurations) or null if this abstract activity does not have a configuration set/namespace.- Returns:
- The name of the configuration set or configuration namespace or null if this abstract activity does not have a configuration set/namespace.
-
getActivityName
String getActivityName()
Gets the name of this abstract activity. This name is used as default name for the corresponding process node which in turn is used in worklists to allow the end user to identify the corresponding worklist item.- Returns:
- The name of this abstract activity.
-
getDescription
String getDescription()
Gets a description for this abstract activity for usage in the process model. This description is used as default description for the corresponding process node which in turn is used in worklists to allow the end user to identify the corresponding worklist item.- Returns:
- A description for this abstract activity for usage in the process model that may be displayed in worklists.
-
getImplementationClass
String getImplementationClass()
Gets the name of the class implementingExecutableComponent
which is called when the process node is executed for which this abstract activity is for. Theclasspath
needs to be set appropriately.
An implementation class is not required for with the runtime service, therefore for such activitiesnull
may be exceptionally returned.- Returns:
- The name of the class implementing
ExecutableComponent
which is called when the process node is executed for which this abstract activity is for. This may exceptionally benull
for activities that are only to be executed with the runtime service.
-
getClassPath
List<String> getClassPath()
Gets the classpath to be used when instantiating theimplementation class
for this abstract activity 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.This is only relevant for
ClassLoaderUsage.NON_SHARED
andClassLoaderUsage.SHARE_ACTIVITY_INSTANCES
.- 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.
-
getClassLoaderUsage
ClassLoaderUsage getClassLoaderUsage()
Gets what classloader to use for execution of this activity. This may be a specific classloader for each execution, a shared classloader for all executions of the very same activity on the same runtime manager and the classloader of the AristaFlow platform.
When using the AristaFlow platform classloadergetClassPath()
will be ignored. That is, the activity may not have additional classpaths; all classes need to be available in the platform classloader.- Returns:
- What classloader to use for execution of this activity; one for each execution, shared for all executions of the same activity or the classloader of the AristaFlow platform.
-
getSystemComponent
byte[] getSystemComponent()
Gets the signature in case the executable component of this abstract activity is privileged component and may access system services. Such an executable component receives a registry in the constructor and may use this to retrieve the needed services.
The system component signature allows to verify the component. Null indicates a non-system component.- Returns:
- A signature to verify the component to prevent harmful components from system access or null for non-system components.
-
getGUIContextID
String getGUIContextID()
Gets the ID of the GUI context the executable component of this abstract activity needs, for instance, an SWT or an AWT context. This is provided at runtime and allows the component to render its graphical user interface to.- Returns:
- The ID of the GUI context the executable component of this abstract
activity needs to render its graphical user interface to. This will
be
GUIConstants.NULL_CONTEXT
if no GUI context is required.
-
getExecutionControlProperties
ExecutionControlProperties getExecutionControlProperties()
Gets the interactions that the executable component of this abstract activity supports for controlling its execution, that is whether the component responds to signals from the outside to suspend, reset or close the component.- Returns:
- The interactions that the executable component of this abstract activity supports for controlling its execution, that is whether the component responds to signals from the outside to suspend, reset or close the component.
-
supportsViewOnly
boolean supportsViewOnly()
Gets whether the operation of this abstract activity supports a view only mode. In this mode the operation is executed normally but all of its output parameters are provided very similar to input parameters. The operation should then just display its input and output values. This allows to reproduce the execution of an operation later and thus improves traceability of a process. Since the operation must not write output, this mode has to be explicitly supported.- Returns:
- Whether the operation of this abstract activity supports a view only mode to re-execute the operation only for displaying input data as well as the formerly written output data.
- See Also:
SessionContext.isViewOnly()
-
getIconID
UUID getIconID()
Gets the ID of the icon to use for process steps and worklist items of the underlying executable component. With the ID the corresponding item can be requested from an icon providing service in various sizes and formats.- Returns:
- The ID of the icon to use for process steps and worklist items; the corresponding icon may be retrieved in various sizes and formats. This may be null if no icon is specified.
-
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.- Returns:
- The configuration values set for this activity template based on the configuration description.
-
getParameters
Set<? extends Parameter> getParameters(ActivityConstants.AccessType accessType)
Gets the parameters of the designated access type of the operation of this abstract activity. These make up the interface of the operation. Parameters have a unique name with respect to the correspondingAccessType
.- 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 abstract activity for the designated access type. If the operation does not have parameters of the designated type, an empty collection will be returned.
-
getParameter
Parameter getParameter(String name, ActivityConstants.AccessType accessType)
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.- Parameters:
name
- The name of the parameter.accessType
- The access type of the parameter. Only values inActivityConstants.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.
-
getAttributeOrigins
Map<ActivityConstants.LocallyOverrideableActivityAttribute,ActivityConstants.ActivityModelEntityType> getAttributeOrigins()
Gets the origins, that is the activity model entity types, a specific attribute of an activity stems from. This information is only needed for attributes that can be overridden locally. The returned map is complete, that is, each overrideable attribute has an entry for the activity model entity type its stems from.- Returns:
- An unmodifiable mapping from all overrideable activity attributes to the entity type of the activity model the corresponding attribute stems from.
-
getSeparatedClassPaths
Map<ActivityConstants.ActivityModelEntityType,List<String>> getSeparatedClassPaths()
Gets the classpath separated by the activity model entity type a part of the classpath stems from. The returned map is indexed by the activity model entity type a classpath stems from, the values are the parts of the class path.
This allows to override the classpath with the corresponding priority, that is, class paths fromActivityTemplateDefinition
s have a higher priority than the ones fromOperation
s orExecutableComponentDescription
s (even if overridden locally).- Returns:
- An unmodifiable mapping from the originating activity model entity type to the part of the class path which stems from this activity model entity type. The class path will be the empty list in case the designated activity model entity type does not contribute to the class path.
-
-