Skip to content

Query Storable

Maikel-Shinoda edited this page Jan 2, 2024 · 1 revision

Figure 1: Query Storable The Query Storable object is a Modeling Block to retrieve Storable instances. Dragging a Query Storable into a Workflow you can configure it to query Data Type instances inheriting from xnwh.persistence.Storable. The query's result can be narrowed down by additional filter criteria or formated by additional sort criteria.

Table of Contents

Add a Query to the Workflow

To insert a Query Storable into a Workflow, drag the Query Storable symbol out of the icon bar.

Output of a Query

The Output Parameter of the Query Storable specifies the Data Type of the instances to be queried. You can drag all kinds of Data Types onto the Output Parameter, as long as they inherit from xnwh.persistence.Storable. To remove a set Storable Data Type, just click onto Remove Dynamic Type in its Context Menu. Without a specialization, all instances of the general Data Type xnwh.persistence.Storable are queried.

Configure a Query

The output will all queried instances, that match the configuration. You can show the configuration area by toggling Show/Hide Configurations in its context menu. There are following fields to configure:

  • Filter criteria: To this field, you can add any number of conditions, the queried instances have to fulfill. Each condition has to be modeled via Formula Modeling. The filter criteria may contain parameters from other Process Steps above the Query Storable. Simply drag and drop the parameter into a certain filter criterion. When specifying more than one filter criterion, the criteria are automatically combined via an AND. With no filter criterion specified, you get all instances matching the requested Storable Data Type.
  • Selection masks: To this field, you can restrict the set of Member Variables, which should be returned with data. If a selection mask is set, not-selected Member Variables will be returned null-valued.
    Please note: Be careful when saving the result because the null values are also saved.
  • Sortings: At this field you can define the order of the search results. The sort criteria list will be applied in specified order. For each sort criterion, you can specify via the adjacent arrow, if it shall be applied ascending or descending. If no sort criterion is specified, the order of queried instances depends on the configuration of the server-side data storage (e.g. a data base).
  • Limit results: With this field you specify the maximum number of queried instances. The value is infinite (-1) by default.
  • Query history: If this field is active, historized data is taken into account as well. This is deactivated by default.

Document the Query

You can show the documentation area by toggling Show/Hide Documentation Area in the context menu of the query.

See Also

Clone this wiki locally