Assigning custom reports to simulation tests
You can create custom reports and assign them to simulation tests. By using this feature, you can adjust simulation reports to your business needs, for example, by configuring a report to show additional or more detailed data.
Important: This is an advanced task. Perform this task if your operator profile
has access to Designer Studio, for example, you are a system architect.
-
Create an output that is the source for your report or use an existing output
by performing the following actions:
Reports are based on outputs
-
Create a new output for your simulation test by performing the following
steps:
- In Customer Decision Hub, click Simulation Testing.
-
Select a simulation test to assign it a new output by clicking
Manage > Edit
in the
Actions
column, next to
that simulation's ID.
You can add outputs to simulation tests whose status is New or Completed.
- On the Edit Simulation Test screen, in the Assign output destinations section, click Create New.
- In the Create new output window, enter the name of your output, for example, MyDataTable, and select the output type, for example, Database Table.
- Click Done.
A new output is created in your application together with a new class Data- Output_Name, for example, Data-MyDataTable. -
In Designer Studio, create a Report Definition rule.
You must create a Report Definition rule in the same class as the output that you want to assign to this rule. For example, if you want to assign a report to MyDataTable that is in class Data-MyDataTable, you must create a Report Definition rule in the same class ( Data-MyDataTable ). For more information, see Report Definitions - Completing the Create, Save As, or Specialization form.
-
Enable the newly created Report Definition rule as a simulation report by
performing the following actions:
- On the Report Definition form, click the Report Viewer tab to open it.
- In the Report header section, complete the Report title field.
- In the User actions section, select the Display in report browser check box and, in the drop-down menu, select Simulations as the target report browser.
-
Configure the Report Definition rule to fetch data that is related to the
target simulation test by performing the following actions:
- On the Report Definition form, click the Pages & Classes tab to open it.
- Click the Add item icon to create a page.
- In the Page name column, enter pyWorkPage.
- In the Class column, enter Pega-DM-Batch-Work.
-
Add a filter condition so that the Report Definition rule fetches only the data
that is related to target simulation test by performing the following
steps:
- On the Report Definition form, click the Query tab to open it.
- In the Edit filters section, click Add filter.
- In the Column source field, enter .pyWorkID.
- In the Relationship drop-down, select Is equal.
- In the Value field, enter pyWorkPage.pyID.
- Make sure that Filter conditions to apply and Condition fields contain the same value, for example, A.
-
Save the rule.
The report is now available in Customer Decision Hub to assign to an output that you created in step 2.