Video guide – Constructing a QueryDesign
In this video, you will learn how to create your first QueryDesign.
The video will cover:
- Navigating existing QueryDesigns
- Defining the designtype and templatetype for the query
- Creating a simple query
In this section, we will approach the various methods of use-cases with the QueryDesigner in a chronological order. So, let’s get started by creating a new QueryDesign object.
Creating QueryDesign objects
When we are creating our first query design, we need to select a design type. Here we have three selections that provide different approaches to query design.
1. From Repository
This design type allows you to directly query the QualiWare repository database to retrieve information. It involves constructing SQL queries that access the underlying database tables and retrieve the relevant data based on the defined schema and relationships.
2. Use Composite
This design type involves utilizing the Composite View functionality in QualiWare. The Composite View allows you to create custom views and reports by combining information from different objects or symbols within the QualiWare tool. It provides a graphical interface for designing and organizing the data elements to be included in the query results.
3. Use Relational Diagram
This design type involves leveraging the Relational Diagram functionality within QualiWare. The Relational Diagram allows you to visually represent and explore the relationships between objects in the QualiWare repository. It provides a visual representation of the entities and their relationships, which can aid in query design by understanding the structure and connections between objects.
Secondly, we need to define what types of data, we want to retrieve. By categorizing templates into these types, the query designer can refine the scope of the query and specify the specific templates or aspects of the repository from which data should be retrieved. This helps in focusing the query on relevant areas of interest and extracting meaningful information based on the defined template.
After selecting a design type, we must select the templates for the data we want to work with. Below you’ll find an explanation of the four different approaches.
1. All templates
This template type includes all available templates in the QualiWare repository. When selecting “All Templates,” the query will retrieve data from all templates, encompassing a broad range of objects, connections, diagrams, and symbols within the repository.
2. Connection templates
This template type focuses specifically on connection templates. Connections represent the relationships or associations between objects in the QualiWare repository. By selecting “Connection Templates,” the query will retrieve data related to the specified connection templates, allowing for analysis and examination of the relationships between objects.
3. Diagram templates
This template type narrows down the scope to diagram templates. Diagrams in QualiWare provide visual representations of models or concepts. By selecting “Diagram Templates,” the query will retrieve data specific to the defined diagram templates, allowing for analysis and retrieval of information related to these visual representations.
4. Symbol templates
This template type targets symbol templates. Symbols represent individual objects or elements within diagrams or models. By selecting “Symbol Templates,” the query will retrieve data related to the specified symbol templates, enabling analysis and retrieval of information specific to these objects.
After selecting an appropriate design type, you’ll be presented with a list of templates.
Tip: Hold CTRL down to select multiple templates. CTRL-A selects all templates
Now that we have completed the preliminary setup of our first query, we will be presented with our selected templates and the default property, ‘name,’ in the Query Designer, as shown below:
Note that the template(s) selected is presented in the top section of the base query. To add more or change the templates selected, you need to right click on the grey area and select Open.
After clicking Open, you’ll be presented with the properties for the ObjectQuery, and you can see templates defined in the lower text field:
Select Template will open the Template List prompt, and you are free to choose a single or multiple templates.
Note: In some cases, you may need to remove the already defined template to be able to select a new template.
Now that we have selected the properties for our query, the next step is to determine the data we need. In this instance, I have chosen the ‘BusinessProcessNetwork’ and aim to receive a list of staff assigned to various processes. This will provide a comprehensive overview of all processes along with their associated RASCI values. To accomplish this, I have two options:
You can add further properties to our query by double-clicking on the grey area, and then you’ll be presented with three options –> Click on Select Properties:
After doing so you will be presented with the attribute list – a list of all the attributes related to our template:
Tip: Hold CTRL down to select multiple templates. CTRL-A selects all templates.
After selecting the desired attributes, you’ll be asked to select either of the appropriate template types. If in doubt select all types, since the suggested template list is based on their correlation with the attribute selected above – which in this instance is HasResponsible.
Tip: Hold CTRL down to select multiple templates. CTRL-A selects all templates
Now we have created a simple query that will list all our BusinessProcessNetworks and include description and the staff associated with it – in this instance Responsible and Owner.
Clicking on the play button will generate the query, we have just set up. Behind the scenes QualiWare Lifecycle Manager with connect with the underlying database and execute the query to pull data.
After a few seconds, we will be presented with the properties of the GenericQuery:
Before running the preview, we could verify that our attributes are correctly setup with a telling header and the correct formatting for the datatype. We can also control whether the attributes should be visible or if we just need them for calculations at a later point.
To change any of the values in the Attribute Definition table, you need to hold ALT and then click on the element you want to change. After a second, the element will be changed into a typable object that you can interact with freely or show you a dropdown of predefined options.
Click on the preview button and you’ll be presented with the Filter Designer:
Click on Edit Filter to open the Filter Wizard. Inside the wizard you’ll be able to create conditions that the data should uphold. You have both “and” & “or” conditions and can use them as you wish. The possibilities are many, and the feature is great for filtering out unwanted data. It’s also possible to use groups to make more complicated conditions for specific scenarios. In some cases, the filter will be sufficient rather than using a Composite Query
Let’s take a simple example:
In this example, we take two attributes and set them up against two conditions. What we use is the method Is greater than, and by making sure these attributes are greater than 0, we only take out the data where these two attributes are empty.
Tip: You can toggle the filter in the lower left corner of the preview by clicking the checkmark.
Now we have created our first basic query, and we will continue to Composite Queries, which by nature is a query based on another query. This allows us to combine queries into a single and more sophisticated query and it will make us able to filter our results further than the above filter is able to and create calculations based on the underlying data.
Video guide – Filtering query results
This video will demonstrate how to work with filters and remove entries from the result view.
The video will cover:
- How to preview the query and edit its filters
- An introduction to the filter editor and visual editor
- How to add conditions, groups, or attributes
- How to optimize your query using filters