web stats
3.7.1 destination filter issue (possible bug) - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2019, 11:41 PM
relyas relyas is offline
What's HL7?
 
Join Date: Dec 2018
Posts: 2
relyas is on a distinguished road
Default 3.7.1 destination filter issue (possible bug)

Dear Support,

I suspect there's a bug with destination filter system. The following is the issue I encountered:

In the destination filter I had 2 steps (the 1st was a rule builder with 'equal to' condition, and the 2nd was javascript). I had the first step disabled using the the enable/disable checkbox while having the second step enabled. When deploying the channel, deploy failed and I received the following error:

Code:
ERROR  (com.mirth.connect.server.transformers.JavaScriptFilterTransformer:79): Filter/Transformer error
java.lang.Exception: com.mirth.connect.server.MirthJavascriptTransformerException: 
SCRIPT SOURCE:
	xxx
SOURCE CODE:
	
1264:      }
1265: }
1266: 
1267: return false;
1268: }function doFilter() { phase[0] = 'filter'; return ( && (filterRule1() == true)); }
1269: function doTransform() { phase[0] = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase[0]);
1270: 
1271: 
1272: tmp['MSH']['MSH.7']['MSH.7.1'] = validate(msg['currentdate'].toString(), '', new Array());
LINE NUMBER:
	1268
LINE SOURCE:
	}function doFilter() { phase[0] = 'filter'; return ( && (filterRule1() == true)); }
DETAILS:
	syntax error

	at com.mirth.connect.server.util.javascript.JavaScriptUtil.compileAndAddScript(JavaScriptUtil.java:670)
	at com.mirth.connect.server.transformers.JavaScriptFilterTransformer.initialize(JavaScriptFilterTransformer.java:72)
	at com.mirth.connect.server.transformers.JavaScriptFilterTransformer.<init>(JavaScriptFilterTransformer.java:58)
	at com.mirth.connect.server.controllers.DonkeyEngineController.createFilterTransformerExecutor(DonkeyEngineController.java:1407)
	at com.mirth.connect.server.controllers.DonkeyEngineController.createDestinationConnector(DonkeyEngineController.java:1493)
	at com.mirth.connect.server.controllers.DonkeyEngineController.createChannelFromModel(DonkeyEngineController.java:1172)
	at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.doDeploy(DonkeyEngineController.java:1791)
	at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.execute(DonkeyEngineController.java:1775)
	at com.mirth.connect.server.channel.ChannelTask.call(ChannelTask.java:67)
	at com.mirth.connect.server.channel.ChannelTask.call(ChannelTask.java:16)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.mirth.connect.server.MirthJavascriptTransformerException:
I suspect the line in bold is where this issue is happening, the first rule is disabled yet '&&' is added after a blank causing a syntax error and preventing the channel from being deployed.

The first error is followed by the following error:

Code:
ERROR  (com.mirth.connect.server.channel.ErrorTaskHandler:25): com.mirth.connect.donkey.server.DeployException: Error initializing JavaScript Filter/Transformer

	at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.doDeploy(DonkeyEngineController.java:1793)
	at com.mirth.connect.server.controllers.DonkeyEngineController$DeployTask.execute(DonkeyEngineController.java:1775)
	at com.mirth.connect.server.channel.ChannelTask.call(ChannelTask.java:67)
	at com.mirth.connect.server.channel.ChannelTask.call(ChannelTask.java:16)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.mirth.connect.server.transformers.JavaScriptInitializationException: Error initializing JavaScript Filter/Transformer
Thanks for your time.
Reply With Quote
  #2  
Old 08-06-2019, 08:30 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 861
agermano is on a distinguished road
Default

I thought I remember seeing this as already reported, but I can't find it now. You can open a bug report at http://www.mirthcorp.com/community/issues/browse/MIRTH

It uses the same credentials as the forums.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation