Question
Scott Roth · Jun 3, 2020

Routing Rule - Syntax Error

Cache for UNIX (IBM AIX for System Power System-64) 2018.1.3 (Build 414U) Mon Oct 28 2019 11:24:02 EDT [HealthShare Modules:Core:15.032.9026 + Linkage Engine:15.032.9026]

We had an odd situation come up last night. Towards the end of the day one of my team members added a rule to an existing routing rule. When he had hit saved, he got a warning that he would overwrite someone else's changes. He hit cancel, then was able to click save. What he did not know is that there was a syntax issue in his rule that he had put in. He was missing a {  that wasn't caught till hours later. 

So a couple of questions have come up from this...

  1. Why did the system did not catch this error when he clicked Save in the Routing editor, if Save is supposed to Save/Compile the code?
  2. Why would a syntax error on the last rule of this Routing Rule cause the whole Routing Rule to not work? As my team members spent time after fixing the syntax re-sending all messages that go through the routing rule so it would get to the appropriate Operations

Thanks

Scott

0
0 107
Discussion (3)2
Log in or sign up to continue

Hi Scott,

Can you reproduce the compilation error not getting caught on save? When I try to save with a syntax error the rule set still saves, it does throw compilation errors however. Can you describe in more detail where the misplaced { was?

Re: your second question I'm not certain, but if the class failed to compile I'm not sure what kind of behavior we would expect from trying to use the rule set. Perhaps this is related to the particular state your environment was in.

I was able to replicate the issue this morning in our Test Interface engine. The syntax error was related to when typing in a when condition not putting the { after the HL7.

Clicked SAVE

Got…

Clicked OK

Got…

Clicked OK, screen went back to Business Rule Editor Screen

Click SAVE again and it repeats the process above

If I try to exit out of the Business Rule Editor I get…

If I click CANCEL it goes back to the Business Rule Editor

If I click LEAVE it takes me back out to the Production Configuration Screen

I open that Business Rule again by clicking on the

When the Business Rule Editor Opens…

The Syntax error is still appearing in the rule…

Hi Scott,

When I try and save a rule set with improper syntax it ends up saving but not compiling, which also removes the existing int code. The problem is "caught" in that a warning is shown, though it doesn't prevent you from proceeding. My guess at the rationale would be to not blow away any incomplete work - it would be a bit of an odd restriction if you could only save a rule set if the code was valid. When the compile fails the existing compiled code is removed, so the rule set is unusable.