Skip to end of metadata
Go to start of metadata

In this page you can find examples and templates for iteraQl queries.

For an introduction to iteraQl and a reference, see here:

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 inconstencies in the model. They are – in part – an alternative to the former built-in consistency check queries in iteraplan. 

Information System Landscape

The queries in this section find inconstencies in InformationSystems, Interfaces, BusinessObjects and Projects.

InformationSystems with more than one active release

Consistency check: Is there more than one release of an Information System that has the status 'Current'?

InformationSystem[@typeOfStatus="current"];

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

InformationSystems 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[@typeOfStatus!="Current" & @runtimePeriod.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.

InformationSystems 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, only be productive in the future?

InformationSystem[(@typeOfStatus="Current" | @typeOfStatus = "Inactive" ) & ! @runtimePeriod.contains("2017-01-01;2017-01-01")];

Replace the date with several points of time in the future, for example with the 1st of Jan of the next few years.

InformationSystems 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[(@typeOfStatus = "Inactive" ) & ! @runtimePeriod.contains("2010-01-01;2010-01-01")];

Replace the date with several points of time in the past, for example with the 1st of Jan of the last few years.

Planned InformationSystems without (implementing) project

Consistency check: Are there Information Systems with the status 'Planned', but without associated Projects?

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

InformationSystems with projects but not planned

Consistency check: Are there Information Systems with associated Projects, which do not have the status 'Planned'?

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

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

Consistency check:  Are there any Information Systems connected via Information Flows, which are not both active at any given time?

InformationSystem [
( @typeOfStatus!="Current" 
  & ( 
    count(/informationFlow1Associations/informationFlow/informationSystem2Association/informationSystem[@typeOfStatus="Current"]) > 0
    | count(/informationFlow2Associations/informationFlow/informationSystem1Association/informationSystem[@typeOfStatus="Current"]) > 0
  )
) 
|
( @typeOfStatus="Current" 
  & (
    count(/informationFlow1Associations/informationFlow/informationSystem2Association/informationSystem[@typeOfStatus!="Current"]) > 0
    | count(/informationFlow2Associations/informationFlow/informationSystem1Association/informationSystem[@typeOfStatus!="Current"]) > 0
  )
)
];

Explanation: The first part finds an active IS connected to an inactive IS, the second part an inactive IS connected to an active IS. Because the connection via the InformationFlow is directed, there are two parallel reationship 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 inconstencies in Technical Components, Infrastructure Elements and Information Systems.

TechnicalComponents without status

Consistency check: Are there any Technical Components that don't have a status?

TechnicalComponent[
 @typeOfStatus!="Current" & 
 @typeOfStatus!="Planned" & 
 @typeOfStatus!="Inactive" & 
 @typeOfStatus!="Target"];
}

Note: unlike InformationSystem, the status here is optional.

TechnicalComponents with non-compliant base components

Consistency check: Are there any Technical Components which are using unreleased Technical Components?

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




General Landscape

The queries in this section find inconstencies that may exist in any type of building block. For each kind of inconsitency in question, there are seperate queries by kind of building block. Moreover, there are specific criteria for each attribute in question, because these attribute may vary from installation to installation. Given the examples below, you can modify the queries to fit your specific metamodel configuration.

Building block with a missing value for a mandatory attribute

Template: InformationSystem without costs

Specific consistency check for: Are there any Building Blocks of type X that do not have all mandatory attributes filled out?

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 madatory or optional. You can be stricter or more lenient in your query.

Building block with a numeric attribute value out of bounds

Template: InformationSystem with costs over maximum.

Specific consistency check for: Are there any Building Blocks of type X that have number attribute values which are out of bounds?

InformationSystem[ count(@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: InformationSystems updated after Jan 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 appriate date format of your locale.

Building block without associations

Template: InformationSystems without BusinessFunctions

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 InformationSystems 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 InformationSystems 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 visualization 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: the result set consist of relations and not elements and cannot be used for visualisations etc.

  • No labels