Business Rules

Syndicate content 12 

Does anyone have experience in creating a Business Routing Rule using Exists function?

 

I've used the comma delimited 'In' function, but I would like more manageability. Entering and remove items from a look up table would be much easier to manage then changing the comma delimited string.

Messages go to error state.

Any help would be appreciated.

This is my first post, so if I am doing anything wrong please let me know.

0   0 1
0

comments

57

views

0

rating

I successfully got everything in this guide to work:  https://community.intersystems.com/post/ensemble-rabbitmq-java-client-qu...

I am now using the information I gained from this guide along side with this guide:

https://www.rabbitmq.com/tutorials/tutorial-one-spring-amqp.html

 

I am running into an issue though. In the RabbitMQ guide I just posted, they have a "Receive message" functionality. I use that alongside with the SendMsg from Ensemble method in the InterSystems guide. The issue I have is the message I receive looks like "[B@2c421093(byte[21])" instead of "Hello from Ensemble!"

Last answer 4 March 2019 Last comment 5 March 2019
0   0 2
82

views

0

rating

Hi All,

Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.

But the problem is the request is in XML Format and also response is in XML format.

Example :

https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>

and in Response 

<?xml version="1.0" encoding="UTF-8"?>
<CSLookupResponse>
    <ZipCode ID="0">
        <Zip5>20024</Zip5>
        <City>WASHINGTON</City>
        <State>DC</State>
    </ZipCode>
</CSLookupResponse&gt

Last answer 24 January 2019 Last comment 24 January 2019
0   0 2
99

views

0

rating

Hi, all.

I know this is basic, and I think I have done this before, but I haven't been successful this time.

In a Routing Rule, I would like to take the value of MSH:9.2, see if that value does NOT exist in a lookup table, and ultimately return out of the rule if true.

So, if my message is an "A05", but "A05" is not in a particular lookup table, then it evaluates to 1, and I execute my action of "Return" and the rule ceases processing.

Is there something incorrect with my sample code below?

..DoesNotIntersectList(HL7.{MSH:9.2}, "ValidAdt.lut") 

Thank you in advance for any insight!

Bill

0   0 2
0

comments

81

views

0

rating

Hi,

I need to route a message synchronously to multiple targets using a routing rule.

In IRIS I built a general routing rule set, made up of a couple of rules. For one Rule in particular, and based on a common condition, I want to send the incoming message to 2 different targets. (no transformation is used)

I can select, in the single SEND action, multiple target names, or, I can create consecutive SEND actions, one after the other, each sending to their specific target.

The issue I have is that I want to do this routing synchronously, and only send the document to the second target, after the first target has finished processing (returns some response).

I know that - rather than using a routing rule, I can use a Business Process, however, I was hoping to avoid that if I can.

Any ideas how to send synchronously from a generic routing rule ?

Thanks - 

Steve 

Last answer 21 November 2018
0   0 1
0

comments

74

views

0

rating

I created a  record map and my DTL works fine. I would like to query one of the values in my input record mapped class. How would I do that? I've tried request.Field1, document.Field1 and can't see to get my rule to work. Any help would be appreciated. Thanks.

Last answer 20 October 2017 Last comment 1 November 2018
0   0 2
157

views

0

rating

 

Hi,

 

Any idea how to reference Header and Body properties of a message in a Routing rule?

 

I know how to address HL7 and AlertText – but I don’t know how to reference Header and Body properties directly!

(I want to do this because addressing properties directly is quicker than searching the text of the message.)

0   2 2
0

comments

188

views

0

rating

Hi,

The context of the rule set contains an ArrayOfDT(I've also tried Collection.ArrayOfDataTypes).

I need to access an element using its key in the rule set using the assign function. I've tried everything I can think of and searched the documentation, but can't find anything. It is probably very obvious.

Can you please help?

Last answer 25 October 2018
0   0 0
0

comments

86

views

0

rating

Does anyone know how to loop through a segment that is part of an ordered set in a Business Rule and if one of about 10 possible values exist in any of the iterations of the segemnt:field I then allow the message to be skipped?

It seems like it should be fairly simple, but i am having a difficult time figuring this out. The Contains function only allow for one value to be identified. I have tried the intersectsList and while I think I have it formatted correctly i believe it only allows for 4 values to be verified. 

Last answer 14 September 2018 Last comment 25 September 2018
0   0 3
140

views

0

rating

Hi,

I have a routing rule that calls some utility classmethods, but for some reason the compiled version insists on linking to a utility function in a different package.

The call to 'SendToEaling(HL7)' in  isn't compiling to a call to the LNWTIEPackage as expected:

##class(LNWTIEPackage.RoutingRules.Utility).SendToEaling((pContext.HL7))

but is instead becoming a call to the LNWDeploy package

##class(LNWDeploy.RoutingRules.Utility).SendToEaling((pContext.HL7))

Specifically 

<assign property="@SendToEaling" value="SendToEaling(HL7)"></assign>

 gets compiled to

set tTempVars("SendToEaling")=##class(LNWDeploy.RoutingRules.Utility).SendToEaling((pContext.HL7))

Any ideas what could be causing this?

Kind regards,

Stephen

RoutingRule

Last answer 7 September 2018 Last comment 6 September 2018
0   1 2
111

views

0

rating

I would like to examine the contents of my OBX-5 field and not route the message if it contains alphabetic characters. I've tried various combinations of the Match and Contains functions, with no luck. Should I be using the COS ? operator or plaini regular expressions?

e.g.

OBX-5 Contains "\D"

OBX-5 Contains "?.A"

OBX-5 Contains "[A-Z]"

Last answer 10 July 2018 Last comment 10 July 2018
0   0 3
229

views

0

rating

Routing Rule Usage -

Can we use Functions and Methods with multiple parameters and refer objects by reference as parameters inside Routing rule ?

How do we handle DB related workflows in Business Rules ?
How can we perform Response object based handling in Business Rules ?
Can we try by extending methods with Ens.Util.FunctionSet and pass in the Context object from the rule as a parameter for certain functions ? 
Can we split the Business Operations into methods that can be used from the routing rules and create the message route request flow ?

My understanding - Inside a rule we can refer only to the properties inside a Context object . 
 

Thank you.

Last comment 22 May 2018
0   0 2
0

answers

163

views

0

rating

Hi All,
      I need to route a file based on its type in Ensemble Production. But I don't want to write a Business Process code to achieve this. Am using FilePassThroughService to get a file.
     There are two FilePassthrough operations for different type of files.

Last answer 15 March 2017 Last comment 8 February 2018
0   0 4
436

views

0

rating

I am currently trying to add a condition to a routing rule that uses the %Source property of a routing rule.  Unfortunately I am getting compile errors when I use the "%", and if I get PROPERTY DOES NOT EXIST if I try and use any of field. I have tried referencing the messages as "Message." , "Record.",  "FullRecordMapClassName." , "Document." . Does anyone know how to reference the properties of a record map in a routing rule, or if it is even possible? Thanks!

Last answer 13 January 2018 Last comment 24 January 2018
0   0 4
276

views

0

rating

I have an interface that does not send me specific ID's, so I am scanning the AIL3.2 (Text) field for certain characters. The Routing rule is getting pretty big with all the OR statements. Is there a way that I can define what I am searching for in the data lookup table, and not have to scan the whole field that it does by default? Is there a way that I can simplify this

Last answer 18 January 2018 Last comment 18 January 2018
0   0 2
253

views

0

rating

I've inherited a business service that takes a large XML document with repeating elements, extracts them via %XML.Reader and chunks them into separate persistent objects for delivery to a EnsLib.MsgRouter.RoutingEngine-based routing rule. Unfortunately, the lack of GetValueAt() for the message's class leaves me without much in the way of complex decision-making options.

I've hacked together a rather inefficient mechanism for getting at what I need by using %XML.Adaptor's  XMLExportToString() and EnsLib.EDI.XML.Document's ImportFromString() method to extract things like child node counts and such. This seems incredibly wasteful.

Is there a more streamlined way to "clone" a simple XML-Enabled %Persistent object as one of type EnsLib.EDI.XML.Document?

Thanks ...

Last answer 11 January 2018 Last comment 12 January 2018
0   0 2
214

views

0

rating

On the "General" tab of the Rule Editor there's a field called "Production Name".  The doc says (my emphasis):

The name of the production in which you expect to use this routing rule.

Does anyone know where this value is used?

Is it safe to set this field blank?

Last answer 29 November 2017 Last comment 29 November 2017
0   0 3
122

views

0

rating

I am calling a business rule from one of my business processes and I noticed that when the business rule reports an error that the business process calling that rule just stops without any errors. Resultingly it fails to trigger the scope - catch-all construction that is surrounding the business rule. I know that it is possible to view the errors in business rules in the business rules log, but I really like to push an error message to Ens.Alert or something similar when my business rules report an error. How do I achieve that?

 

Last answer 27 November 2017
0   0 1
0

comments

109

views

0

rating

Hi,

 

In my routing rules I'd like to work with multiple rulesets. When running the proces, it only seems to execute the first ruleset.

Is it possible to have multiple rulesets active in the same business rule, or is there another way to not have to jam all rules in the same ruleset?

Thanks in advance,

Joost Houwen

Last answer 2 August 2017 Last comment 2 August 2017
+ 1   0 2
214

views

+ 1

rating

Hopefully a simple question.

Using the Rule Editor, I can open a routing rule and easily define an 'effectiveBegin' and 'effectiveEnd' date.  I want to utilize this date feature for a "sub-rule" (i.e. rule #1) but not the entire routing rule therefore impacting all other rules. I also do not want to split and create a brand new routine rule just to send the message to the target business process.  It would be ideal to keep it contained within this single routing class that was created.

 

In "Rule Set #1", is it possible to have a "Rule #1" defined that can either use a 'send' action or 'delegate' action to direct the message to "Rule Set #2" so that I can easily define an 'effectiveBegin' and 'effectiveEnd' date ahead of time? I want to create a new rule, ahead of time, in preparation for a future interface. 

 

 

Last comment 12 July 2017
0   0 3
0

answers

407

views

0

rating

Dear All,

I would like to block ADT_A18 and ADT_A47 HL7 2.3 messages with an empty MRG:1 field.

This is to prevent my current HL7 ADT router (Business process) sending blank Merges downstream.

I've attempted to create a business rule where this would return out the business role process.  However the messages still loop though the other rules.

 

Any advice would be great.

 

Kind Regards

 

Stuart

Last answer 29 June 2017 Last comment 29 June 2017
0   0 2
263

views

0

rating