public interface DataManager extends ADEPT2Service
Access to data elements is defined by the ADEPT-metamodel. For every write access the corresponding node (and user) is logged. This allows to provide reading nodes with the valid values. The validity of a data value depends on the position of the reading node relative to the corresponding writing node. For instance, it is only allowed to read a data value written by a successor node and not by a parallel node. For convenient usage a data container is provided which allows access via parameter names.
Since there may also be applications that need to access data elements outside of the process context, there is also an interface for such ProcessUnawareAccess. It is allowed to read the latest values written from inside of the process or the latest value written by another external application. Values written process unaware are stored separately so process aware application are always provided with the data intended by the process modeler.
The DataManager also allows to manage user-defined data types (UDTs) and
user-defined functions (UDFs). These are used by the ProcessManager when
importing or deleting process templates. The processing of UDFs is done via
the interface UDFExecution. This is called by the execution
manager or by external components when accessing values of user-defined data
type.
The DataManager does not synchronise any access to data elements. This is not necessary since every written value is versioned and only valid for specific readers succeeding the writer. The ADEPT-metamodel ensures that no conflicting access appears, for instance, concurrent reading and writing of the same value is not possible. This also allows for storing temporary and intermediate values by an application. The reader of these values is not started before the writing application has successfully terminated.
To allow for suspending of running applications, the DataManager provides an interface to store and retrieve session/application states via savepoints and to manage these savepoints.
The designated session tokens allow for checking access rights on a coarse level, for instance, to prevent controlling instances at all.
| Modifier and Type | Method and Description |
|---|---|
void |
archiveInstance(SessionToken session,
java.util.UUID instanceID)
Archives the data of the designated instance to a separate archive.
|
InstanceDataContainer |
createInstanceDataContainer(SessionToken session,
Template template)
Creates an instance data container for the input (and output) parameters of
the designated template.
|
java.net.URI[] |
getDataLogManager(SessionToken session)
Gets the log manager responsible for the
DataHistory assigned to
data manager for logging instance data. |
ProcessAwareAccess |
getProcessAwareAccess()
Gets an instance for accessing values of data elements from a process
context, which means, the access (storage and retrieval) is carried out by
an entity with valid node id and connector.
|
ProcessUnawareAccess |
getProcessUnawareAccess()
Gets an instance for accessing values of data elements from outside a
process context, which means, the access (storage and retrieval) is carried
out by an entity with no knowledge of a process.
|
SessionStateManager |
getSessionStateManager()
Gets an instance for managing session/application states via savepoints.
|
UDFExecution |
getUDFExecution()
Gets an instance for executing functions on the values of user-defined data
type.
|
UDTManager |
getUDTManagement()
Gets a reference to the management functions of user-defined data types
(UDTs) (creation, retrieval and removal).
|
void |
instanceChanged(SessionToken session,
Instance instance)
Notifies the data manager that the designated instance has been changed.
|
void |
instanceChanged(SessionToken session,
Instance instance,
DataContainer changedDataContainer)
Notifies the data manager that the designated instance and also its output
parameters have changed.
|
void |
instanceStarted(SessionToken session,
ExecutableInstance instance,
DataContainer dataContainer)
Tells the data manager that an instance has been started with the
designated data container (input and output parameters of the instance).
|
void |
instanceTerminated(SessionToken session,
ExecutableInstance instance,
DataContainer dataContainer)
Tells the data manager that an instance has been terminated with the
designated data container (input and output parameters of the instance).
|
DataContainer |
retrieveInstanceDataContainer(SessionToken session,
Instance instance)
Retrieves the instance data container for the designated instance.
|
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startvoid instanceStarted(SessionToken session, ExecutableInstance instance, DataContainer dataContainer)
session - The session which is used to notify the starting of an
instance which is just used for tracking and logging purpose.instance - The instance that is started. The caller must have an
execution lock on this instance.dataContainer - The data container for the designated instance or null
in case the instance does not have input and output parameters.void instanceChanged(SessionToken session, Instance instance)
InstanceDeltaLayer. This method is usually called by the
corresponding ExecutionManager. Be sure to have the change
lock on the instance when calling this method! instanceChanged(SessionToken, Instance, DataContainer)
instead.session - The session which is used to notify changes to a running
instance which is just used for tracking and logging purpose.instance - The instance that has been changed. The caller has to have
an appropriate lock.void instanceChanged(SessionToken session, Instance instance, DataContainer changedDataContainer)
InstanceDeltaLayer. This method is usually called
by the corresponding ExecutionManager. Be sure to have the
change lock on the instance when calling this method! changedDataContainer just like
instanceStarted(SessionToken, ExecutableInstance, DataContainer).session - The session which is used to notify changes to a running
instance which is just used for tracking and logging purpose.instance - The instance that has been changed. The caller has to have
an appropriate lock.changedDataContainer - The data container for the designated instance
in case the container has also changed or null in case the
instance does not have input and output parameters any more.void instanceTerminated(SessionToken session, ExecutableInstance instance, DataContainer dataContainer)
session - The session which is used to notify the termination of an
instance which is just used for tracking and logging purpose.instance - The instance that has terminated. The caller must have an
execution lock on this instance.dataContainer - The data container for the designated instance or null
in case the instance does not have input and output parameters.InstanceDataContainer createInstanceDataContainer(SessionToken session, Template template)
session - The session which is used to check for access rights on this
method.template - The template for which to create a data container having
the corresponding input and output parameters.InstanceDataContainer having all input and output
parameters of the designated template which allows to set input
parameters and retrieve the values of the output parameters.DataContainer retrieveInstanceDataContainer(SessionToken session, Instance instance)
session - The session which is used to check for access rights on this method.instance - The instance of which to retrieve the data container. The caller must have an
execution lock on this instance.ProcessAwareAccess getProcessAwareAccess()
ProcessUnawareAccess getProcessUnawareAccess()
UDTManager getUDTManagement()
UDFExecution getUDFExecution()
SessionStateManager getSessionStateManager()
java.net.URI[] getDataLogManager(SessionToken session)
DataHistory assigned to
data manager for logging instance data.session - The session which is used to access the data log manager.
This is just used as a coarse check for the necessary access
rights.DataManager.void archiveInstance(SessionToken session, java.util.UUID instanceID)
session - The session which is used to check for access rights on this
method.instanceID - The (logical) ID of the instance to archive all data.