Skip to main content
Skip table of contents

Persistent States of Containerized xUML Services

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:

xuml-service_persistent_state.png

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

Open the Primary Key Search to search for a particular persistent state object in a large amount of data. Enter all key fields (in our example this is only field id) and click Search:

primary_key_search.png

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

xuml_states.png

The list part contains separate lists for each state:

states_list.png

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

Icon

Description

image-20240726-070610.png

Use this option to reload the persistent state list.

image-20240729-130334.png

Use this option to expand all listed states.

image-20240729-130320.png

Use this option 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:

pstate_objects.png

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:

pstate_filter.png

Filter

Usage

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:

object_details_page.png

Content

Description

Primary Key

All key fields are displayed, separated by comma.

Creation

The timestamp of the creation of the persistent state object.

Last Update

The 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 option Download to download a json file with the object information.

  • Use option Copy to clipboard 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:

pstate_event_details.png

Content

Description

Values

ID

Identifier of the event.

Any string.

Type





Type of the event.

STARTWORK

A do activity is scheduled.

WORKDONE

A do activity has finished and an update to the object is scheduled.

TIMEOUT

A time triggered transition is scheduled.

COMPLETION

A regular transition is scheduled.

JOIN

Parallel persistent states are joined.

FINALIZE

Object reached final state and is due to be deleted.

SIGNAL

Processing a signal that has been send to the object.

Creation

The timestamp of the creation of the persistent state object.

Any datetime.

Delivery

The 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 click option Delete:

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:

deletion_confirmation_selected_objects.png

Deleting a Single Object

Use option Delete Object on the object details page to delete a single persistent state object:

You need to confirm the deletion:

confirm_single_deletion.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.