Skip to main content
Skip table of contents

iteraQL syntax

This is a step-by-step introduction to the syntax of iteraQL. In the following sections the syntax is presented with examples, covering the different operators and language features.

Selection Queries

A selection query does not employ operators and only uses the elements of the LUY meta model. There are two kinds of selection queries for building blocks and relations, respectively. A simple building block selection query is

InformationSystem;

which simply retrieves the list of all instances of the information system building block. Instead of 'InformationSystem' the name of any building block or association can be used. A selection query can also select a relation, in which case a binding set is returned. A simple relation query is

InformationSystem/projectAssociations/project;

which retrieves all pairs of related instances of the information system and project building blocks. In general, a query always specifies an initial building block or association, optionally followed by operators. A query may further contain one or more relations or relation operators and terminates with a semicolon (';').

Using relation names or such types like 'BusinessMapping' will cause query error.

Read more about querying with iteraQL operators here.

iteraQL examples

List of successors

The following query lists all successors of an element. The query is suitable for building block types having the successor self-relation.

InformationSystem[@name.contains("CRM # 3.1")].unfold(/successors);

Consistency checks

The queries below find inconsistencies in the model. They are – in part – an alternative to the former built-in consistency check queries in LUY. 

Information system landscape

The queries in this section find inconstencies in information systems, interfaces, business objects and projects.

Information systems with more than one active release

Consistency check: Is there more than one release of an information system that has the status “current”?

InformationSystem[@Status values="current"];

Look in the result list for lines with the same information system name, ignoring the release suffix.

Information systems within production period but not current

Consistency check: Are there any releases of an information system, which are productive, according to their dates, but do not have the status “current”?

InformationSystem[@Status values!="Current" & @Productive period.contains("2016-01-01;2016-01-01")];

Replace the date with the current date for your query. The date is written as a date interval containing exactly one day.

Information systems with production period in the future, but status current or inactive

Consistency check (approximation): Are there any Information Systems that have the status “current” or “inactive”, but will, according to their dates, be live in the future?

InformationSystem[(@Status values="Current" | @Status values = "Inactive" ) & ! @Productive period.contains("2017-01-01;2017-01-01")];

Replace the date with several points of time in the future, for example with the 1st of January in the following years.

Information systems with production period in the past but not inactive

Consistency check (approximation): Are there any information systems that were, according to their dates, productive in the past, but do not have the status “inactive”?

InformationSystem[(@Status values = "Inactive" ) & ! @Productive period.contains("2010-01-01;2010-01-01")];

Replace the date with several points of time in the past, for example with the 1st of January in the following years.

Planned information systems without (implementing) project

Consistency check: Are there information systems with the status “planned”, but without any associated projects?

InformationSystem[@Status values="Planned" & count(/projectAssociations/project) = 0];

Information systems with projects but not planned

Consistency check: Are there information systems with associated projects, which do not have the status “planned”?

InformationSystem[@Status values!="Planned" & count(/projectAssociations/project) > 0];

Information systems connected via an Information Flow, but not both active or both inactive

Consistency check: Are there any information systems connected via information flows, and both are not active at the same time?

SQL
InformationSystem [
( @Status values!="Current" 
  & ( 
    count(/informationFlow1Associations/informationFlow/informationSystem2Associations/informationSystem[@Status values="Current"]) > 0
    | count(/informationFlow2Associations/informationFlow/informationSystem1Associations/informationSystem[@Status values="Current"]) > 0
  )
) 
|
( @Status values="Current" 
  & (
    count(/informationFlow1Associations/informationFlow/informationSystem2Associations/informationSystem[@Status values!="Current"]) > 0
    | count(/informationFlow2Associations/informationFlow/informationSystem1Associations/informationSystem[@Status values!="Current"]) > 0
  )
)
];

Explanation: The first part finds an active IS connected to an inactive IS, the second part finds an inactive IS connected to an active IS. Because the connection is directed via the information flow, there are two parallel relationship arcs. Only the combination of a /...1/...2 and /...2/...1 is a valid arc. A combination of /...1/...1 or /...2/...2 would be an invalid loop leading back to the same element.

Technical landscape

The queries in this section find inconsistencies in technical components, infrastructure elements and information systems.

Technical components without status

Consistency check: Are there any technical components which don't have a status?

SQL
TechnicalComponent[
 @Status values!="Current" & 
 @Status values!="Planned" & 
 @Status values!="Inactive" & 
 @Status values!="Target"];
}

Technical components with non-compliant base components

Consistency check: Are there any unreleased technical components?

TechnicalComponent[ count(/baseComponents[ @Compliance to Guidelines != "compliant" ]) > 0 ];

General landscape

The queries in this section find inconsistencies which may exist in any type of building block. For each kind of inconsistency in question, there are separate queries for each building block. Moreover, there are specific criteria for each attribute in question because these attributes may vary from installation to installation. Given the examples below, you can modify the queries to fit your specific meta model configuration.

Building block with a missing value for a mandatory attribute

Template: Information system without costs

Specific consistency check for: Are there any building blocks of type X that have empty mandatory attributes?

InformationSystem[ count(@costs) = 0 ];

Replace the building block name to query for other types. Add more attributes to the criteria following the template above. Use the ampersand & as logical and.

Note that this query is independent of the attribute configuration that marks an attribute as mandatory or optional. You can be stricter or more lenient in your query.

Building block with a numeric attribute value out of bounds

Template: Information system with costs over maximum.

Specific consistency check for: Are there any building blocks of type X that have out of bounds number attribute values?

InformationSystem[ @costs > 10000 ];

Replace the building block name to query for other types. Add more attributes to the criteria for upper and lower bounds following the template above. Use the ampersand & as logical and. 

Building block updated since last week

Template: Information systems updated after January 13th 2011.

Specific consistency check for: Which building blocks of type X updated or changed in the last N days?

InformationSystem[ @lastModificationTime > "01-13-2011" ];

Replace the building block name to query for other types. Change the date to reflect the time interval of interest. Use the appropriate date format of your locale.

Building block without associations

Template: Information systems without business functions

Specific consistency check for: Are there any building blocks of type X which do not have any association to other building blocks?

InformationSystem[ count(/businessMappings/businessFunction) = 0];

Replace the building block name to query for other types. Add more relations to query for more empty associations. Use the ampersand & as logical and. 

Overview over number of connections

List all information systems and show how many projects are associated with each one, grouped by this count.

InformationSystem .objectify(count(/projectAssociations/project)) /isValueOf;

The resulting list has the counts (0, 1, 2, ...) on the left-hand side, and the information systems with name, ID and description on the right-hand side.

Replace the building block and the association name to query other associations.

Further examples

Find a subtree including the parent element

List all children of business processes containing "Mgmt" in their names. The parent elements will also be included. The result set can be used for diagrams and further reporting.

BusinessProcess[@name.contains("Management")] .expand(/children);

To retrieve a set of relations within such subtree(s) run the following:

BusinessProcess[@name.contains("Management")] .unfold(/children);

Note that the result set consists of relations and not elements and cannot be used for diagrams etc..

JavaScript errors detected

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

If this problem persists, please contact our support.