Modeling integration scenarios frequently involves asynchronous processes. For example, a purchase order process is initialized by the first order. Then, the user adds new items until the process is closed by receiving the payment and sending the goods to the customer.
Such processes are also known as long running transactions. All activities involved in this process may be separated by days or even weeks making it necessary to hold the states of such a purchase order persistent.

The persistent state management of containerized xUML services involves the following functions:

Open the details page of a containerized xUML service and switch to the Persistent State section.

The initial page displays an overview of all persistent state classes and their states, in this example Ticketcreation. Each class corresponds to a Designer process.

Click on a persistent state class to display its different states.
Refer to Querying the Persistent State Database for details.

Click the icon to open the Primary Key Search.

The search enables you to search for a particular persistent state object in a large amount of data. Enter all key fields (in our example the  id ) and click Search.

You will either get the toast message Could not find object or the persistent state object details page will open.

Querying the Persistent State Database

In the persistent state objects list, the names of all persistent state elements are displayed in normalized UML. Normalized means, all white spaces are replaced by underscores ('_'). The page is divided into two parts:

  1. Filter
  2. List

The list part contains separate lists for each state.

A single persistent state object can be in various states at once.

IconUsage
Use this icon to reload the persistent state list.
Use this icon to expand all listed states.
Use this icon to collapse all listed states.

Expand a list to display all persistent state objects in this state. For each object, the following information is displayed:

  • Primary key
  • Creation date
  • Date of the last update

You can specify the count of rows to be displayed for each table (Items). Use the icons in the footer to toggle between pages.

If you want to inspect a single object, click on the primary key (refer to Viewing Persistent State Object Details for further information).

The list of states may contain a large amount of data and thus can be filtered in the upper part of the page:

FilterUsage
Count

Enter the number of objects you want to display. Always the latest objects are displayed. In order to see all objects, enter 0.

Be careful using option 0, the database can contain a large amount of data!

Creation from... to...Enter a date/time range. Use the calender to enter the date.
Last Update from... to...Enter a date/time range. Use the calender to enter the date.
Attributes

Use the Attributes button to add filters and specify a query, e.g.

Apply the filter(s) by clicking Filter.

Click Filter to update the screen or Reset all to remove all entered data.

All persistent state information can also be viewed, if the service is stopped. This is helpful in case of debugging a service. But, in this case, browsing the persistent state details may be slower, as for each request the xUML Runtime is started to collect the information and stopped afterwards. The persistent state objects will  not  be changed in this case!

Viewing Persistent State Object Details

In the persistent state objects overview, for each persistent state object you can see primary key, creation date/time and date/time of the last update. When clicking on the primary key of an object, more details can be viewed in the object details view:

ContentDescription
Primary KeyAll key fields are displayed, separated by comma.
CreationThe timestamp of the creation of the persistent state object.
Last UpdateThe timestamp of the last update of the persistent state object.
States

In this group box the state of the persistent state object and all substates are listed with Creation timestamp and status. The state name is the normalized UML name. Normalized means, all white spaces are replaced by underscores ('_'). You have also two options to send signals to the object, refer to Sending Signals to Persistent State Objects for details.

The name of the final state will never be seen because by entering the final state the object ceases to exist. However, while destroying the object, the state machine is in the state  --8<-- . Think of  --8<--  as an internal state name for the final state. So every object will reach this state before it gets deleted from the database. The state name  --8<--  is strange by design to prevent a clash with other state names. If the state engine has a low load you will perhaps never see objects in this state. If the state engine is very busy you can see a lot of such objects but this is no problem.

Events A list of all events that occurred on this state object and are not yet finished is displayed. Click on the event name to display further details, refer to Inspecting Event Details for more information.
Object Information

This text box contains the persistent state data, displayed in json format.

  • : Use this icon to download a json file with the object information.
  • : Use this icon to copy the content of the editor to the clipboard.

Sending Signals to Persistent State Objects 

In the States section, you can find several icons to send signals: Retry Transitions and Send Signal (one for each signal that can be send to the displayed persistent state object).

  • Use Retry to resend the last signal to the persistent state object, if that last transition has failed.
  • Click on one of the other buttons to send the indicated signal.

Sending signals can be useful

  • during development, if you want to test a persistent state service.
  • when the service is running in production, to release a persistent state object that got stalled in a state.

Inspecting Event Details

In the persistent state object list, a list of all events that occurred on this state object and are not yet finished is displayed. Click on the event name to display further details:

The following information is displayed:

ContentDescriptionValues
IDIdentifier of the event.Any string.
Type






Type of the event.
STARTWORKA do activity is scheduled.
WORKDONEA do activity has finished and an update to the object is scheduled.
TIMEOUTA time triggered transition is scheduled.
COMPLETIONA regular transition is scheduled.
JOINParallel persistent states are joined.
FINALIZEObject reached final state and is due to be deleted.
SIGNALProcessing a signal that has been send to the object.
CreationThe timestamp of the creation of the persistent state object.Any datetime.
DeliveryThe timestamp of when this event has been delivered to the object.Any datetime.
xUML Data
This text box contains the persistent state data, displayed in xml.

Deleting Persistent State Objects

You have two options to delete persistent state objects. You can delete...

Deleting Multiple Objects 

You can use the persistent state objects list to delete several persistent state objects at once.

Select the checkbox in front of the objects that you want to delete, then use icon .

Since an object can be in different states at once, a selected object will be deleted from all states.

You can also select all displayed objects by using the checkbox in the header of the list.

This option does only select the objects that are displayed in the current table view, not all objects in this state.

You need to confirm your choice.

Deleting a Single Object

Use the button Delete Object on the object details page to delete a single persistent state object.

You need to confirm the deletion.


  • No labels