Tutorial: Creating View in QPR UI
Creating a New MobileDashboard View:
Define View Properties and Context
- Creating a new QPR MobileDashboard view starts by defining the Name, Description, and View Context. These are defined in the view properties that is opened by clicking the Properties button:
- First, give your view a Name and a Description. Then, click Context:
- The context defines the starting points for later querying data from QPR EnterpriseArchitect/ProcessDesigner, QPR Metrics, and/or QPR ProcessAnalyzer. Define the context by selecting values for the context variables by first selecting a variable from the drop-down menu and then tapping the edit icon on the Value column:
The available context variables are:- sys:eapdModel: QPR EnterpriseArchitect/ProcessDesigner model.
- sys:eapdElementType: QPR EnterpriseArchitect/ProcessDesigner element type that exists in the defined QPR EnterpriseArchitect/ProcessDesigner model
- sys:eapdElement: QPR EnterpriseArchitect/ProcessDesigner element that exists in the defined QPR EnterpriseArchitect/ProcessDesigner model
- sys:metricsModel: QPR Metrics model
- sys:metricsScorecard: QPR Metrics scorecard that exists in the defined QPR Metrics model
- sys:metricsValueSettings: QPR Metrics value settings that exist in the defined QPR Metrics model
- sys:metricsElement: QPR Metrics element that uses the defined Metrics value settings
- sys:referenceDate: The date used to define which period is to be used in the view
- To define your own context variables and their values, type in the name of the variable to the text field and click the check mark. After that, you can click the value field and type in the value for your custom context variable.
- You can also define the following system context variable values that have an effect on the user interface:
- sys:hideViewHeader: Defines if the top main toolbar in the view is hidden ("true") or visible ("false")
- sys:showVersionNumbers Defines if the version number text in the top main toolbar of the view and the panel headers are visible ("true") or hidden ("false")
- The Behavior selection affects the context variable used in the view in the following way:
- Default: the value of the context variable will be inherited from the higher level, i.e. Session (defined via the Selections button) → View → Panel → Presentation object. If there is no value for the context variable on a higher level, the value defined here will be used.
- Fixed: the value of the context variable will overwrite any existing effective value of the same context variable.
The panel and presentation object properties also have the Context tab. If you want a panel or a presentation object to always have a specific context variable value regardless of what is selected for the session, view, or panel, define the context variable in the panel or presentation object properties, and set the Behavior of the context variable to "Fixed".
To see what context variable values are used in the view, panel, or presentation object, select the Show effective context check box in the Context tab of the view, panel, or presentation object properties pages.
- Using QPR EnterpriseArchitect/Processdesigner data:
800px- To use EnterpriseArchitect/ProcessDesigner data, define the sys:eapdModel, sys:eapdElementType, and sys:eapdElement context variables to set the default context instance. With the sys:eapdElement context variable, you can use the check boxes on the left side of the list to select the elements to which the view you are designing applies. These elements will then be selectable as the context instance via the Selections button when browsing the view. Selecting the All elements automatically check box will result in all elements of the element type defined by the sys:eapdElementType variable to be automatically available in the view when new elements of that type are added to the model.
- Using QPR Metrics data:
- If you want to show data from element(s) that reside in some particular scorecard(s), define the sys:metricsModel and sys:metricsScorecard context variables. This is the most commonly preffered way of showing Metrics data.
- If you want to show data from a single Metrics element or measure, define the sys:metricsModel, sys:metricsValueSettings, and sys:metricsElement context variables.
- The difference between these two approaches is that views with the sys:metricsScorecard variable defined can show data from multiple measures residing in the selected scorecards, whereas views with the sys:metricsElement variable defined are restricted to the measures selected here, but they enable browsing different measures using the same value settings as the selected measure.
- With the sys:metricsScorecard and sys:metricsElement variables, you can use the check boxes on the left side of the list to select the scorecards/elements to which the view you are designing applies. These scorecards/elements will then be selectable as the context instance via the Selections button when browsing the view. Selecting the All scorecards/elements automatically check box will result in all scorecards/elements of the model defined by the sys:metricsModel variable to be automatically available in the view when new scorecards/elements of the defined sys:metricsValueSettings type are added to the model.
- Using QPR ProcessAnalyzer data:
- If you want to show ProcessAnalyzer data, define the desired custom context variables and their values into the text fields. Some suggested variables to use: FilterId, ModelId, AnalysisType, MaximumCount, SelectedActivities, and SelectedTransitions. See the Analysis Parameters page for a more complete listing of possible variables.
- After defining the view properties and context, click the Close button to apply the changes and exit the view properties.
Select Period
By default, the QPR MobileDashboard view shows data from the Current period. As the view you are designing might not have data available for the current period, click the Selections button:
Then, select a period for which you have data:
Add a Panel and Define Panel Properties and Context
A View consists of one or multiple Panels that hold inside them Presentation Objects that show the actual data. Panels can be reused, i.e. it is possible to add Panels that you have in your Private Workspace or that have been published to the Public Workspace.
- Add a new Panel to the view by clicking the Add New Panel button in the side toolbar.
- Click the Edit button on the panel.
800px - To give a Name and a Description for the panel, open the panel properties by clicking the Properties button.
- In the Panel Properties, you can define the Name and Description on the Properties tab.
In addition to normal text, you can use context variables in the Name field, so that the value of the variable will be shown when the context variable has a value. To do this, type the context variable name in the format "{#contextvariablename}" For example, you could define the Name of the panel to be "Selected scorecard: {#sys:metricsScorecard}."
If the name contains context variable separator characters ({ or }) or an escape character (\), the characters need to be escaped by the backslash (\) character before them. For example, to have "my{0}\example" working properly, it needs to be entered as "my\{0\}\\example".
This same functionality is available in presentation object names too.
You can also define panel specific context variable values on the Context tab.
You can hide the panel header from the view by selecting the "Hide panel header" check box.
Apply the changes and close the panel properties by clicking Close.
Add a Data Grid
You can now add Presentation Objects to the panel by tapping the Presentation Object buttons on the side toolbar. All graphical Presentation Objects need either a Table or Data Grid Presentation Object containing data as their intermediate data source. Defining the contents of the Table and Data Grid Presentation Objects is similar, so in this tutorial we will use the Data Grid Presentation Object.
- Add a Data Grid Presentation Object to the panel by clicking the Data Grid Presentation Object button on the side toolbar.
800px - This is a good point to save the Panel. Click the Save button on the toolbar on top.
- The Presentation Object Properties are used to define what data is used in the Data Grid and how the data is shown. Click the Edit button on the Data Grid Presentation Object to open the data grid properties.
- First, give a Name and optionally a Description for the data grid. Then click the Query tab.
800px - A query defines the element(s) from which attributes having values are taken. Click Add query to start defining a query, and then select either EnterpriseArchitect / ProcessDesigner, Metrics element, Metrics scorecard, or ProcessAnalyzer to be the initial data source.
800px- When querying EnterpriseArchitect / ProcessDesigner data, the first element that appears to the query is the sys:eapdElementType value that is defined in the Session or View/Panel/Presentation object Properties. Click on the Element and Connector types in the Side Pane until you have reached the desired Element Type from which you want to show data.
800px - When querying Metrics data, with Metrics scorecard, you can select the element residing in the scorecard defined by the sys:metricsScorecard context variable to be the element from which you want the query to take data.
With Metrics element, the first element that appears to the query is the element you selected as the sys:metricsElement context variable value.
Note that when the value of the context variables are changed, the initial element in the query will change too.
Metrics reference elements are shown with the format "Element name (Scorecard name)". When using a reference element, the data will always be taken from the selected reference element, regardless of what the currently selected scorecard is. - When querying Metrics data, you can define the Period range, which defines how many periods are shown before and after the currently selected period in the view.
- When querying ProcessAnalyzer data, enter the Analysis Parameters to the text field and click Set.
You can also use a ProcessAnalyzer bookmark by defining the analysis parameters as "ReportId=<Id of the Bookmark>" (without the quotes).
If the query contains context variable separator characters ({ or }) or an escape character (\), the characters need to be escaped by the backslash (\) character before them. For example: to have "my{0}=\\query\example.txt" working properly, it needs to entered as "my\{0\}=\\\\query\\example.txt"
Context variables can be used in the query by typing them in the format "{#contextvariablename}" (without the quotes). For example, you could define the "ModelId" analysis parameter to take the value from the "MyModelId" context variable by typing in "ModelId={#MyModelId}".
When using a bookmark, you can override the analysis parameters used in the bookmark by defining the needed parameters separately after the bookmark. - After reaching the wanted element (EA/PD), defining the period range (Metrics), or defining the analysis parameters (ProcessAnalyzer), click Finalize and give a name for the query result. The attributes from the result set will be selectable on the Mappings tab. If you want to add another query, click the Add query button.
- Click the Mapping tab. On the Mapping tab, you select which attributes' values are shown in the table.
First, expand a Result Set by clicking it under Select attributes. - Click on the Attribute Names on the Result Set list to add the attributes to the table. The whole rectangular area shown on the sheet is called a Mapping. The dotted line shown on the mapping on the sheet indicates where the next attribute will be placed in the table.
On the Mapping tab, the table will show only placeholders for the attribute values. Real values can be seen on the Presentation tab.
- When querying EnterpriseArchitect / ProcessDesigner data, the first element that appears to the query is the sys:eapdElementType value that is defined in the Session or View/Panel/Presentation object Properties. Click on the Element and Connector types in the Side Pane until you have reached the desired Element Type from which you want to show data.