Interface ProcessAwareAccess
-
public interface ProcessAwareAccess
This interface provides access to the values (including null) of data elements for clients which have process knowledge, which means, they are accessing the data element from a specific and known node instance. This is due to the fact, that values of data elements in ADEPT have a well-defined scope. Every access depends on process-specific information, namely the node and its current iteration (for nodes in a loop). The data elements are specified by the instance-ID, the node-ID, the node-iteration and the dataelement-ID. If the assumed data access, that is the triple instance-ID, node-ID and dataelement-ID, does not exist at a called method, anIllegalArgumentException
will be thrown.The read value respects the ADEPT-metamodel, which means, the returned value is written by a preceding node of the reading node. Values that are written by nodes parallel branches (without synchronisation) must not be returned.
To allow for intermediate results, all written values are stored temporarily. A reading node will get its own values if they are written by the very same node. This will only apply if a node reads and also writes a specific data element. When completing the corresponding node, the temporary values have to be validated.
NULL-values are also managed by this interfaces. NULL represents an undefined value for the process-management-system because of not setting or consuming a value by an application.
Concurrent access to one data element is allowed. The ADEPT-metamodel defines how to handle this. Write accesses lead to a new version of a data value. Each value has a well-defined scope, that is, reading a data element returns a dedicated value. It also allows successive writing by one application, which just overwrites older values written by the application (same nodeID and same iteration).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
discardValue(SessionToken session, UUID instanceID, int discardingNodeID, int discarderIteration, int dataElementID)
Discards the value for the designated data element set before by the designated node.void
discardValue(SessionToken session, UUID instanceID, int discardingNodeID, int discarderIteration, int dataElementID, String savepoint)
Discards the value for the designated data element set before by the designated node.void
dropWrittenValues(SessionToken session, Instance instance, int nodeId, int nodeIteration)
Drops all values written by the designated instance that have not been validated yet, that is, the values are removed (or marked as removed) from the data manager for all savepoints.boolean
dropWrittenValuesBackTo(SessionToken session, Instance instance, int nodeId, int nodeIteration, String savepoint)
Drops all values written by the designated instance that have not been validated yet back to the designated savepoint, that is, the values are removed (or marked as removed) from the data manager for all savepoints after the designated one.String
flushDataContainer(SessionToken session, Instance instance, int writingNodeId, int writerIteration, DataContainer dataContainer, String savepoint)
Flushes all values from the designated data container and persists them in this data manager (if the corresponding data container stems from this data manager) referring to it by the designated savepoint ID.void
flushSavepoint(SessionToken session, Instance instance, int writingNodeId, int writerIteration, DataContainer dataContainer, String savepoint)
Flushes the designated safepoint only.DataContainer
getDataContainer(SessionToken session, Instance instance, int nodeID)
Gets the data container for the application specified by the designated activity.InputDataContainer
getNodeDataContainer(SessionToken session, Instance instance, int nodeID)
Gets the data container for the designated node.DataContainer
getObsoleteDataContainer(SessionToken session, ExecutionHistory execHist, Instance instance, int nodeID, int iteration)
Gets the data container for a finished application specified by the designated node and iteration ID.ParameterDataContext
getPublicDataContext(SessionToken session, Instance instance, int nodeID)
Gets the data context providing all public data elements for the designated node.boolean
isNull(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Returns whether the value of the designated data element for the specified node is NULL which means the data element has not been written or has been consumed yet or has been explicitly set to NULL by a previous application.boolean
retrieveBoolean(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the boolean value of the designated data element of type BOOLEAN valid for the specified node of the process instance and its current iteration count.Date
retrieveDate(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the date value of the designated data element of type DATE valid for the specified node of the process instance and its current iteration count.double
retrieveFloat(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the double value of the designated data element of type FLOAT valid for the specified node of the process instance and its current iteration count.long
retrieveInteger(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the long value of the designated data element of type INTEGER valid for the specified node of the process instance and its current iteration count.String
retrieveString(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the string value of the designated data element of type STRING valid for the specified node of the process instance and its current iteration count.UDTValue
retrieveUDT(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves (the proxy of) the value of the designated data element of user-defined type (UDT) valid for the specified node of the process instance and its current iteration count.ServerUDTInputStream
retrieveUDTIncrementally(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the value of the designated data element of user-defined type (UDT) valid for the specified node of the process instance and its current iteration count asServerUDTInputStream
.URI
retrieveURI(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Retrieves the URI value of the designated data element of type URI valid for the specified node of the process instance and its current iteration count.void
storeBoolean(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, boolean value)
Stores an intermediate BOOLEAN value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeBoolean(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, boolean value)
Stores an intermediate BOOLEAN value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeDate(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, Date value)
Stores an intermediate DATE value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeDate(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, Date value)
Stores an intermediate DATE value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeFloat(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, double value)
Stores an intermediate FLOAT value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeFloat(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, double value)
Stores an intermediate FLOAT value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeInteger(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, long value)
Stores an intermediate INTEGER value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeInteger(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, long value)
Stores an intermediate INTEGER value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeString(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String value)
Stores an intermediate string value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeString(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, String value)
Stores an intermediate string value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeUDT(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, UDTValue value)
Stores an intermediate value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeUDT(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, UDTValue value)
Stores an intermediate value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeURI(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, URI value)
Stores an intermediate URI value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
storeURI(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, URI value)
Stores an intermediate URI value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration.void
validateWrittenValues(SessionToken session, Instance instance, int nodeId, int nodeIteration, String savepoint)
Validates and verifies all values written by the designated node instance for the designated savepoint, that is, the values are not temporary any more but valid for the following nodes and it is checked whether all mandatory output parameters have valid values.
-
-
-
Method Detail
-
isNull
boolean isNull(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID)
Returns whether the value of the designated data element for the specified node is NULL which means the data element has not been written or has been consumed yet or has been explicitly set to NULL by a previous application. This method has to be called before retrieving a value.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
true
if the value of the designated data element is NULL and therefore has not been written or has been consumed yet.
-
retrieveInteger
long retrieveInteger(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the long value of the designated data element of type INTEGER valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type INTEGER and of Java-type
long
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type INTEGER, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.INTEGER
-
retrieveFloat
double retrieveFloat(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the double value of the designated data element of type FLOAT valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type FLOAT and of Java-type
double
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type FLOAT, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.FLOAT
-
retrieveBoolean
boolean retrieveBoolean(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the boolean value of the designated data element of type BOOLEAN valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type BOOLEAN and of
Java-type
boolean
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type BOOLEAN, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.BOOLEAN
-
retrieveString
String retrieveString(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the string value of the designated data element of type STRING valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type STRING and of
Java-type
String
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type STRING, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.STRING
-
retrieveDate
Date retrieveDate(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the date value of the designated data element of type DATE valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type DATE and of Java-type
java.util.Date
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type DATE, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.DATE
-
retrieveURI
URI retrieveURI(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the URI value of the designated data element of type URI valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type URI and of Java-type
java.net.URI
. - Throws:
InvalidDataTypeException
- If the designated data element is not of type URI, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.URI
-
retrieveUDT
UDTValue retrieveUDT(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves (the proxy of) the value of the designated data element of user-defined type (UDT) valid for the specified node of the process instance and its current iteration count. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type USERDEFINED and of Java-type
UDTValue
. The caller is responsible for closing. - Throws:
InvalidDataTypeException
- If the designated data element is not of type USERDEFINED, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
retrieveUDTIncrementally
ServerUDTInputStream retrieveUDTIncrementally(SessionToken session, UUID instanceID, int readingNodeID, int readerIteration, int dataElementID) throws InvalidDataTypeException
Retrieves the value of the designated data element of user-defined type (UDT) valid for the specified node of the process instance and its current iteration count asServerUDTInputStream
. This is either the last valid value or the intermediate value written by the very same node in the current iteration which has not been validated yet.
The server input stream does not provide the complete content of the underlying resource but a proxy object requesting the content incrementally when transfered via the communication.
Callers should first check whether the value is null by callingisNull(SessionToken, UUID, int, int, int)
. Otherwise in case of NULL anIllegalStateException
will be thrown.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be read.readingNodeID
- The ID of the node which reads the value.readerIteration
- The current iteration count of the reading node.dataElementID
- The ID of the data element to be read.- Returns:
- The value of the data element of ADEPT2-type USERDEFINED as
ServerUDTInputStream
, that is, clients do not retrieve all of the content of the stream at once but incrementally. The caller is responsible for closing. - Throws:
InvalidDataTypeException
- If the designated data element is not of type USERDEFINED, anInvalidDataTypeException
will be raised.IllegalStateException
- If the value of the designated input parameter is null anIllegalStateException
will be thrown.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
getPublicDataContext
ParameterDataContext getPublicDataContext(SessionToken session, Instance instance, int nodeID)
Gets the data context providing all public data elements for the designated node.
This method is for use from inside ADEPT2 when the calling component already has a reference to an instance and maybe also locked the instance.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instance
- The instance which houses the public data elements to be accessed.nodeID
- The ID of the node for which the parameter data context is needed.- Returns:
- The parameter data context providing all public data elements for the designated reading node.
-
getNodeDataContainer
InputDataContainer getNodeDataContainer(SessionToken session, Instance instance, int nodeID)
Gets the data container for the designated node. The data container contains all the input parameters of the node - output parameters are written implicitly.
The current iteration of the designated node is inferred from the instance. The instance object itself will not be stored in the data container and may therefore be unlocked afterwards.
This method is for use from inside ADEPT2 when the calling component already has a reference to an instance and maybe also locked the instance.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instance
- The instance which houses the data elements to be accessed.nodeID
- The ID of the node for which the data container is needed.- Returns:
- The data container of the designated reading node. The caller is responsible for closing.
-
getDataContainer
DataContainer getDataContainer(SessionToken session, Instance instance, int nodeID)
Gets the data container for the application specified by the designated activity. The data container contains all the input and output parameters of the application. This supersedes calling one retrieval method for every single input parameter. Only the input parameters are provided with valid values.
The current iteration of the designated node is inferred from the instance. The instance object itself will not be stored in the data container and may therefore be unlocked afterwards.
This method is for use from inside ADEPT2 when the calling component already has a reference to an instance and maybe also locked the instance.Intermediate values written to the data container may differ from the intermediate results in the data manager. This allows for caching in the data container.
- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.instance
- The instance which houses the data elements to be accessed.nodeID
- The ID of the node for which the data container is needed.- Returns:
- The data container of the designated reading application. The caller is responsible for closing.
-
flushSavepoint
void flushSavepoint(SessionToken session, Instance instance, int writingNodeId, int writerIteration, DataContainer dataContainer, String savepoint) throws InvalidDataContainerException
Flushes the designated safepoint only. This safepoint has to exist in the designated data container. After calling this method, all values are guaranteed to be persistent in a database.
Only the designated savepoint will be stored. If you want to store all unsaved savepoints useflushDataContainer(SessionToken, Instance, int, int, DataContainer, String)
and providenull
as savepoint.In case the data container writes through or the designated savepoint has already been flushed, this is a no-op.
- Parameters:
session
- The session which is used to synchronise access and to check for access rights on this method.instance
- The instance which houses the data elements to be written.writingNodeId
- The ID of the node for which the data container has been created.writerIteration
- The iteration of the node for which the data container has been created.dataContainer
- The data container providing the values for the designated node. The caller is responsible for closing.savepoint
- The savepoint for which to flush the data container. If a savepoint of this name has already been persisted, it will be overwritten. If the savepoint is not set in the designated data container, it will be ignored. This must neither benull
nor the empty string.- Throws:
InvalidDataContainerException
- If the designated data container does not correspond to the designated node data or it cannot be flushed due to other reasons, anInvalidDataContainerException
will be thrown.
-
flushDataContainer
String flushDataContainer(SessionToken session, Instance instance, int writingNodeId, int writerIteration, DataContainer dataContainer, String savepoint) throws InvalidDataContainerException
Flushes all values from the designated data container and persists them in this data manager (if the corresponding data container stems from this data manager) referring to it by the designated savepoint ID. After calling this method, all values are guaranteed to be persistent in a database.
Only the designated savepoint will be stored. If you want to store all unsaved savepoints providenull
as savepoint.In case the data container writes through, this is a no-op.
- Parameters:
session
- The session which is used to synchronise access and to check for access rights on this method.instance
- The instance which houses the data elements to be written.writingNodeId
- The ID of the node for which the data container has been created.writerIteration
- The iteration of the node for which the data container has been created.dataContainer
- The data container providing the values for the designated node. The caller is responsible for closing.savepoint
- The savepoint for which to flush the data container. If a savepoint of this name has already been flushed, it will be overwritten. If the savepoint is not set in the designated data container, it will be set first and will then encompass the current values of the data container. This must not be the empty string! If this isnull
and there are unsaved changes, the implicit savepoint will be used (and possibly overwritten).- Returns:
- The latest savepoint containing all changes. Usually this is the designated savepoint unless there are no unsaved changes in the data container. In this case the latest savepoint will be returned and no flushing will have taken place.
- Throws:
InvalidDataContainerException
- If the designated data container does not correspond to the designated node data or it cannot be flushed due to other reasons, anInvalidDataContainerException
will be thrown.
-
getObsoleteDataContainer
DataContainer getObsoleteDataContainer(SessionToken session, ExecutionHistory execHist, Instance instance, int nodeID, int iteration) throws InvalidActivityStateException
Gets the data container for a finished application specified by the designated node and iteration ID. The data container contains all the values of the input parameters read by the application as well as the written output parameters of the application.
The input parameters have to be retrieved fromInputDataContainer
while the output parameters have to be retrieved fromDataContainer
. The data container does not allow to write any values.This method checks whether the designated node has been executed in the designated iteration. If it has not, a
InvalidActivityStateException
will be thrown since no valid data container can be created, for instance, when a node has been skipped or the iteration is in the future.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the accessing agent and the corresponding organisational position.execHist
- the execution history for the specified instanceinstance
- The instance which houses the data elements to be accessed.nodeID
- The ID of the node for which the data container is wanted.iteration
- The iteration of the node of which to retrieve the data container.- Returns:
- The data container housing all read and written values of the designated node in the
designated instance. Written values have to be retrieved via the
stored*
-methods. This data container does not allow to store any value.
The caller is responsible for closing. - Throws:
InvalidActivityStateException
- If the designated node has not been executed for the current iteration (either it has been skipped or it has not reached this iteration), aInvalidActivityStateException
will be thrown.
-
discardValue
void discardValue(SessionToken session, UUID instanceID, int discardingNodeID, int discarderIteration, int dataElementID)
Discards the value for the designated data element set before by the designated node. This does not (necessarily) set the value to null but rather undoes the writing of the designated node. After calling this method, the data element has the value it had before executing the designated node.
If the designated node has not written the designated data element before or the values of the node have already been validated, this method does nothing. This applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.discardingNodeID
- The ID of the node which has written the value and wants to discard it now.discarderIteration
- The current iteration count of the node which has written the value and wants to discard it now.dataElementID
- The ID of the data element of which to discard the value.
-
discardValue
void discardValue(SessionToken session, UUID instanceID, int discardingNodeID, int discarderIteration, int dataElementID, String savepoint)
Discards the value for the designated data element set before by the designated node. This does not (necessarily) set the value to null but rather undoes the writing of the designated node. After calling this method, the data element has the value it had before executing the designated node.
If the designated node has not written the designated data element before or the values of the node have already been validated, this method does nothing. This applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.discardingNodeID
- The ID of the node which has written the value and wants to discard it now.discarderIteration
- The current iteration count of the node which has written the value and wants to discard it now.dataElementID
- The ID of the data element of which to discard the value.savepoint
- The savepoint for which to discard the value. This must not be the empty string!null
discards for the next implicit savepoint.
-
storeInteger
void storeInteger(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, long value) throws InvalidDataTypeException
Stores an intermediate INTEGER value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typelong
of the data element of ADEPT2-type INTEGER.- Throws:
InvalidDataTypeException
- If the designated data element is not of type INTEGER, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.INTEGER
-
storeInteger
void storeInteger(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, long value) throws InvalidDataTypeException
Stores an intermediate INTEGER value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typelong
of the data element of ADEPT2-type INTEGER.- Throws:
InvalidDataTypeException
- If the designated data element is not of type INTEGER, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.INTEGER
-
storeFloat
void storeFloat(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, double value) throws InvalidDataTypeException
Stores an intermediate FLOAT value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typedouble
of the data element of ADEPT2-type FLOAT.- Throws:
InvalidDataTypeException
- If the designated data element is not of type FLOAT, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.FLOAT
-
storeFloat
void storeFloat(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, double value) throws InvalidDataTypeException
Stores an intermediate FLOAT value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typedouble
of the data element of ADEPT2-type FLOAT.- Throws:
InvalidDataTypeException
- If the designated data element is not of type FLOAT, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.FLOAT
-
storeBoolean
void storeBoolean(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, boolean value) throws InvalidDataTypeException
Stores an intermediate BOOLEAN value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typeboolean
of the data element of ADEPT2-type BOOLEAN.- Throws:
InvalidDataTypeException
- If the designated data element is not of type BOOLEAN, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.BOOLEAN
-
storeBoolean
void storeBoolean(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, boolean value) throws InvalidDataTypeException
Stores an intermediate BOOLEAN value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typeboolean
of the data element of ADEPT2-type BOOLEAN.- Throws:
InvalidDataTypeException
- If the designated data element is not of type BOOLEAN, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.BOOLEAN
-
storeString
void storeString(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String value) throws InvalidDataTypeException
Stores an intermediate string value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typeString
of the data element of ADEPT2-type STRING. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type STRING, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.STRING
-
storeString
void storeString(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, String value) throws InvalidDataTypeException
Stores an intermediate string value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typeString
of the data element of ADEPT2-type STRING. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type STRING, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.STRING
-
storeDate
void storeDate(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, Date value) throws InvalidDataTypeException
Stores an intermediate DATE value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typejava.util.Date
of the data element of ADEPT2-type DATE. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type DATE, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.DATE
-
storeDate
void storeDate(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, Date value) throws InvalidDataTypeException
Stores an intermediate DATE value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typejava.util.Date
of the data element of ADEPT2-type DATE. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type DATE, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.DATE
-
storeURI
void storeURI(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, URI value) throws InvalidDataTypeException
Stores an intermediate URI value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value as Java-typejava.net.URI
of the data element of ADEPT2-type URI. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type URI, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.URI
-
storeURI
void storeURI(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, URI value) throws InvalidDataTypeException
Stores an intermediate URI value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value as Java-typejava.net.URI
of the data element of ADEPT2-type URI. This must not be null.- Throws:
InvalidDataTypeException
- If the designated data element is not of type URI, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.URI
-
storeUDT
void storeUDT(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, UDTValue value) throws InvalidDataTypeException
Stores an intermediate value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.value
- The value of the data element of ADEPT2-type USERDEFINED. This must not benull
. The caller is responsible for closing.- Throws:
InvalidDataTypeException
- If the designated data element is not of type USERDEFINED, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
storeUDT
void storeUDT(SessionToken session, UUID instanceID, int writingNodeID, int writerIteration, int dataElementID, String savepoint, UDTValue value) throws InvalidDataTypeException
Stores an intermediate value of the designated data element of the process instance and the corresponding metadata which is the writing node and its current iteration. The value applies to the implicit savepoint.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the writing agent and the corresponding organisational position.instanceID
- The (logical) ID of the process instance which houses the data element to be written.writingNodeID
- The ID of the node which writes the value.writerIteration
- The current iteration count of the writing node.dataElementID
- The ID of the data element to be written.savepoint
- The savepoint for which to store the value. This must not be the empty string!null
stores for the next implicit savepoint.value
- The value of the data element of ADEPT2-type USERDEFINED. This must not be null. The caller is responsible for closing.- Throws:
InvalidDataTypeException
- If the designated data element is not of type USERDEFINED, anInvalidDataTypeException
will be raised.- See Also:
ProcessConstants.AdeptDataType.USERDEFINED
-
validateWrittenValues
void validateWrittenValues(SessionToken session, Instance instance, int nodeId, int nodeIteration, String savepoint) throws ValidationFailedException
Validates and verifies all values written by the designated node instance for the designated savepoint, that is, the values are not temporary any more but valid for the following nodes and it is checked whether all mandatory output parameters have valid values. This method is to be called when terminating the execution of a node or whenever a savepoint should be marked as valid. Note that such savepoints will not be removed when dropping values. So use this function with care and probably only when finishing a node.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the validating agent and the corresponding organisational position.instance
- The process instance for which a node is completed. This requires that the caller of this method has an execution lock on the instance.nodeId
- The ID of the node for which to validate a savepoint.nodeIteration
- The iteration of the node for which to validate a savepoint.savepoint
- The name of the savepoint which to validate. Be sure that this savepoint has written all mandatory output parameters. Otherwise validation may fail although this is not intended, e. g. since the savepoint is not the final savepoint for this node. This must not be the empty string! If this isnull
, the implicit savepoint will be used.- Throws:
ValidationFailedException
- If the validation fails, for instance due to missing values of mandatory output parameters, aValidationFailedException
will be thrown.
-
dropWrittenValues
void dropWrittenValues(SessionToken session, Instance instance, int nodeId, int nodeIteration)
Drops all values written by the designated instance that have not been validated yet, that is, the values are removed (or marked as removed) from the data manager for all savepoints. For tracking purpose it is absolutely required that the dropped values are logged in the data history. Dropping (but not logging) includes the removal of the state of a suspended activity.
This method is for resetting an activity and not for invalidating data values. The latter is implicit, therefore this method must not be called instead offlushing
data from a data container.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the dropping agent and the corresponding organisational position for logging purpose.instance
- The process instance for which a node is completed. This requires that the caller of this method has a lock on the instance.nodeId
- The ID of the node which is completed.nodeIteration
- The iteration of the node which is completed.
-
dropWrittenValuesBackTo
boolean dropWrittenValuesBackTo(SessionToken session, Instance instance, int nodeId, int nodeIteration, String savepoint)
Drops all values written by the designated instance that have not been validated yet back to the designated savepoint, that is, the values are removed (or marked as removed) from the data manager for all savepoints after the designated one. For tracking purpose it is absolutely required that the dropped values are logged in the data history. Dropping (but not logging) includes the removal of the state of a suspended activity.
This method is for resetting an activity and not for invalidating data values. The latter is implicit, therefore this method must not be called instead offlushing
data from a data container.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the dropping agent and the corresponding organisational position for logging purpose.instance
- The process instance for which a node is completed. This requires that the caller of this method has a lock on the instance.nodeId
- The ID of the node which is completed.nodeIteration
- The iteration of the node which is completed.savepoint
- The ID of the savepoint back to which to drop the written data. All savepoints after this savepoint (and their data) will be removed or rather invalidated. Usenull
to invalidate all data that has been written since the last implicit savepoint of the activity. If there is no implicit savepoint,all savepoints will be dropped
- Returns:
- Whether all written values have been dropped (
dropWrittenValues(SessionToken, Instance, int, int)
) since the implicit savepoint was requested but not found.
-
-