Skip to main content
Member
September 21, 2026
Solved

Create a dashboard displaying all rule confirmations

  • September 21, 2026
  • 2 replies
  • 40 views

Hello,

I am looking to create a dashboard displaying all rule confirmations (name, text, amount, failure or warning, text1/2/3/4) for all companies in a given workflow, and then to add filters to it (by company, by anomaly category: Warning/Failure).

I would like to retrieve the list of rules and create a table from them (entity, period, rule details).

Is this possible?

Dim objConfirmInstanceInfo As ConfirmInstanceInfo = BRApi.DataQuality.Process.GetConfirmation(si, wfClusterPk, includeStoredResults) allows me to retrieve the name and/or description of the Rule Profiles associated with the wfClusterPk.

However, I do not know how to drill down further to loop through all the rules contained within the Rule Profiles.

I therefore cannot see how to retrieve `args.ConfirmationRuleArgs.Rule` and thus obtain the details of each rule.

Is this possible?

The two threads I found on the community forum didn’t get very far:

  •  

Thank you for any help you can provide.

Best answer by SBeaver

Hi Jérémy,

I believe there is a standard data source method type “ConfirmationForWorkflowUnit” which might be close to what you are loooking for.

Assuming you are looking for something more tailored, I have included below an example business rule that returns specific confirmation rule details all the way down to the entity results.

The trick is to loop all the way down from ConfirmInstanceInfo → List(Of ConfirmGroupInstanceInfo) → List(Of ConfirmRuleInstanceInfo) → KeyValuePair(Of String, ConfirmEntityInstanceInfo).

Dim wfProfileName As String = args.NameValuePairs.XFGetValue("WFProfile")
Dim scenarioName As String = args.NameValuePairs.XFGetValue("Scenario")
Dim timeName As String = args.NameValuePairs.XFGetValue("Time")

Dim wfClusterPk As WorkflowUnitClusterPk =
BRApi.Workflow.General.GetWorkflowUnitClusterPk(
si,
wfProfileName,
scenarioName,
timeName
)
Dim confInstance As ConfirmInstanceInfo =
BRApi.DataQuality.Process.GetConfirmation(
si,
wfClusterPk,
True
)
Dim resultDt As New DataTable
With resultDt.Columns
.Add("WFProfile", GetType(String))
.Add("Scenario", GetType(String))
.Add("Time", GetType(String))
.Add("RuleGroup", GetType(String))
.Add("RuleName", GetType(String))
.Add("Entity", GetType(String))
.Add("Result", GetType(Boolean))
.Add("Amount", GetType(Decimal))
.Add("Info1", GetType(String))
.Add("Info2", GetType(String))
.Add("Info3", GetType(String))
.Add("Info4", GetType(String))
End With

For Each confGroup As ConfirmGroupInstanceInfo In confInstance.Groups
For Each confRule As ConfirmRuleInstanceInfo In confGroup.Rules
For Each confEntity As KeyValuePair(Of String, ConfirmEntityInstanceInfo) In confRule.EntityInstances
Dim dr As DataRow = resultDt.NewRow()

dr("WFProfile") = wfProfileName
dr("Scenario") = scenarioName
dr("Time") = timeName
dr("RuleGroup") = confGroup.Name
dr("RuleName") = confRule.RuleName
dr("Entity") = confEntity.Value.EntityName
dr("Result") = confEntity.Value.Result
dr("Amount") = confEntity.Value.DisplayResult
dr("Info1") = confEntity.Value.Custom1
dr("Info2") = confEntity.Value.Custom2
dr("Info3") = confEntity.Value.Custom3
dr("Info4") = confEntity.Value.Custom4

resultDt.Rows.Add(dr)
Next
Next
Next

Return resultDt

You would obviously need to tweak the columns you want to expose, and I have not incorporated any filtering of the data returned that you mentioned.  Happy to assist further if needed.

Thanks,

Stuart

2 replies

SBeaverAnswer
Member
September 22, 2026

Hi Jérémy,

I believe there is a standard data source method type “ConfirmationForWorkflowUnit” which might be close to what you are loooking for.

Assuming you are looking for something more tailored, I have included below an example business rule that returns specific confirmation rule details all the way down to the entity results.

The trick is to loop all the way down from ConfirmInstanceInfo → List(Of ConfirmGroupInstanceInfo) → List(Of ConfirmRuleInstanceInfo) → KeyValuePair(Of String, ConfirmEntityInstanceInfo).

Dim wfProfileName As String = args.NameValuePairs.XFGetValue("WFProfile")
Dim scenarioName As String = args.NameValuePairs.XFGetValue("Scenario")
Dim timeName As String = args.NameValuePairs.XFGetValue("Time")

Dim wfClusterPk As WorkflowUnitClusterPk =
BRApi.Workflow.General.GetWorkflowUnitClusterPk(
si,
wfProfileName,
scenarioName,
timeName
)
Dim confInstance As ConfirmInstanceInfo =
BRApi.DataQuality.Process.GetConfirmation(
si,
wfClusterPk,
True
)
Dim resultDt As New DataTable
With resultDt.Columns
.Add("WFProfile", GetType(String))
.Add("Scenario", GetType(String))
.Add("Time", GetType(String))
.Add("RuleGroup", GetType(String))
.Add("RuleName", GetType(String))
.Add("Entity", GetType(String))
.Add("Result", GetType(Boolean))
.Add("Amount", GetType(Decimal))
.Add("Info1", GetType(String))
.Add("Info2", GetType(String))
.Add("Info3", GetType(String))
.Add("Info4", GetType(String))
End With

For Each confGroup As ConfirmGroupInstanceInfo In confInstance.Groups
For Each confRule As ConfirmRuleInstanceInfo In confGroup.Rules
For Each confEntity As KeyValuePair(Of String, ConfirmEntityInstanceInfo) In confRule.EntityInstances
Dim dr As DataRow = resultDt.NewRow()

dr("WFProfile") = wfProfileName
dr("Scenario") = scenarioName
dr("Time") = timeName
dr("RuleGroup") = confGroup.Name
dr("RuleName") = confRule.RuleName
dr("Entity") = confEntity.Value.EntityName
dr("Result") = confEntity.Value.Result
dr("Amount") = confEntity.Value.DisplayResult
dr("Info1") = confEntity.Value.Custom1
dr("Info2") = confEntity.Value.Custom2
dr("Info3") = confEntity.Value.Custom3
dr("Info4") = confEntity.Value.Custom4

resultDt.Rows.Add(dr)
Next
Next
Next

Return resultDt

You would obviously need to tweak the columns you want to expose, and I have not incorporated any filtering of the data returned that you mentioned.  Happy to assist further if needed.

Thanks,

Stuart

Member
September 23, 2026

Thank you very much for your help, SBeaver.
I was able to use your script and adapt it so that it would run across all the relevant companies!