Question
· Nov 5

How to manipulate a business rule through SQL or APIs?

Hi Guys,

 

I'm helping a partner to integrate IRIS to their project. They want to integrate Rules in there system.

For testing I built a simple rule as below:

/// 
Class Test.TestRule Extends Ens.Rule.Definition
{

Parameter RuleAssistClass = "Ens.Rule.GeneralBusinessRuleAssist";

XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule" ]
{
<ruleDefinition alias="" context="EnsLib.HL7.Service.Standard" production="">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<comment text="ForTest"></comment>
<assign property="a" value="1"></assign>
<return>1</return>
</ruleSet>
<ruleSet name="" effectiveBegin="" effectiveEnd="">
</ruleSet>
</ruleDefinition>
}

}

Then save and compiled the rule.

 

I have some questions about managing rules from a 3rd party application.

1. list the rules made in their application

I only find SQL querying on %Dictionary.ClassDefinition that may list the rules.

I also find existing persistent classes such as Ens.Rule.RuleDefinition but there is no record stored in the according table. 

I wonder whether there is a more specific way to list existing rules through SQL query or ObjectScript API calls?

 

2. How can they integrate the UI managing a specific ruls though http calls?

For example, if they listed existing rules, selected the rule Test.TestRule in THEIR UI and lunched IRIS management portal with rule editor.

With the url such as http://localhost:52880/ui/interop/rule-editor/index.html?$NAMESPACE=FHIRSERVER, it may lead to the editor while is there more parameter to the url so that Test.TestRule can be open by the eiditor for editing? 

 

Thanks

Product version: IRIS 2024.1
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2024.2 (Build 247U) Tue Jul 16 2024 09:29:04 EDT [Health:8.1.2]
Discussion (3)2
Log in or sign up to continue