Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.4.1
Div
Classe2e-refDiv

Otp
Floatingfalse
maxHLevel1

Rp

...

.

Note
iconfalse

If errors occur in the context of the activity diagram, they must be handled, otherwise, all persistent state actions, including create, are rolled back

Anchor
6_advanced_behavioral_modeling_p_94496_advanced_behavioral_modeling_p_9449

Related Error Codes

Find a list of all persistent state error codes on System Errors of the Persistent State Adapter.

Error CodeDescription
PSADSM/5 A persistent object with the same primary key already exists.

Retrieving Object Handle

After creation, an object handle represents a persistent state object. With these handles, it is possible to retrieve information about and to send signals to the represented objects.
While a handle is returned by the create action and can be passed as parameter in and out of operations and services, it is also possible to retrieve a handle for an object specified by its primary key and class.
A <<PersistentStateAdapter>> instance with action set to getObjectHandle is used to implement this functionality.
The compulsory tagged value class defines what kind of object to look for. This class always has to be of stereotype <<PersistentState>>. A reference to it will also be stored in the attribute classifier of the returned handle.
As input, the persistent state adapter requires all primary keys as defined in the given class. In our example, the attributes id and customerID have the stereotype PrimaryKey and identify a persistent state object unambiguously (see class diagram in figure A Persistent State Class ). The input object flow states purchaseOrderID respectively customerID are mapped to these attributes.

Info
iconfalse

If the result set is not unique, or no persistent state object could be found, an error will be thrown that should be handled. ( This is not done in this example. For more information about error handling, see section Modeling Error Handling).

If no error occurs, the result is returned in an object of type Handle.

...

Info
iconfalse

The object state poHandle is of complex type Handle. This class is located in the Persistent State module in package Data / Persistent State / Services / Objects.

Related Error Codes

Find a list of all persistent state error codes on System Errors of the Persistent State Adapter.

Error CodeDescription
PSADSM/12Requested persistent object does not exist.

Retrieving Multiple Object Handles

...