#Business Rules

0 Followers · 126 Posts

Business rules are the part of InterSystems Ensemble production solution which allow nontechnical users to change the behavior of Ensemble business processes at specific decision points.

Question Thomas Haig · Oct 21

Hi all,
Recently we were experimenting with having a variable target on a routing rule and noticed some interesting behaviour, code below.

<rulename="My Rule"disabled="false"><constraintname="docCategory"value="Generic.2.3.1"></constraint><whencondition="((Document.{MSH:MessageType.triggerevent}=&quot;A43&quot;))"><sendtransform=""target="To&quot; _(pContext.Document.GetValueAt(&quot;MSH:SendingFacility&quot;))_&quot;FromServiceTCPOpr"></send></when></rule>
0
0 0
Question PaulSomebody · Oct 3

How do you assign a property in a RUL (not a DTL or BPL) from a function value?  I've tried with the package/classname, without, with .., without and even looked all the way down to the parser but still can't see how.  There is no examples and the documentation doesn't help

So this works

<assign property="RuleActionUserData" value="&quot;A01&quot;"></assign>
 

This doesn't complile

<assign property="RuleActionUserData" value="##class(SomePackage.SomeClass).EventTypeToHL7Type(Document)"></assign>

SomePackage.SomeClass extends EnsRules and the method is a classmethod and final

0
0 0
Question Scott Roth · Aug 28

I had a need for a Filter, but did not want to recreate the wheel by creating another Data Lookup Table, so instead I created a Linked Table that points to a MS SQL Table outside of IRIS.

Once I had the Linked Table, I created a Class Method Function that would query the Linked Table and return a 1 if a result came back.

0
0 0
Question Lewis Houlden · Jul 8

Hi Community

I'm working on a complex piece of rules that needs to check each OBX and evaluate if 3 of the fields match certain criteria. I've tried to achieve this using a Foreach loop, which does work, however it is not as clean as I wanted it. I was hoping I could assign temp variables inside the foreach loop to make the rules more easier to read, for example @testCode @resultText. This is not support as you can only assign inside a when condition. Before I raise this as an idea, i wondered if there was an alternative way to achieve the same thing?

0
0 0
Question Juan Mota Sanchez · May 3

Hi,

I've been working on a very basic Interoperability production in my computer. I followed one of the examples in the courses and created a TEST.FileRouterRoutingRule, but when trying to edit this rule, it takes me to the Rule Editor Login Page, where I can't get in (Not even with the _SYSTEM credentials) - Is this functionality unavailable in the community edition?

0
0 0
Question Scott Roth · Apr 9

I have a segment within a Group (grp) that needs to be validated that it is populated within the message. 

When you use a Foreach within a Business Rule how should you account for the counter in the group?

For example, Epic sends their MFN message in the following format.

MSH~MFI~[~{~MFE~STF~PRA~[~ZPR~]~[~ZLK~]~[~CER~]~[~ZMG~]~[~ZTF~]~[~ZGP~]~[~ZDD~]~}~]

so, the ZLK segment might not exist until the last MFEgrp that is in the message. I need to verify if there is an Employee ID associated with the Provider in the HL7 message before I run it through the translation.

0
0 0
Question Colin Brough · Jan 10

Is it possible to generate INFO level logging events from within a routing rule?
TRACE level events and debugging are easy enough, but we have a case where we have a rule where we want to log messages that are not routed for further processing in the event log as INFO events - in production tracing will be turned off, so TRACE level events won't be visible.

0
0 0