web stats
Stop processing Transformer Step - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2017, 06:19 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default Stop processing Transformer Step

vers:3.4.2.8129

Hello all,
I may be missing something basic here, but is there a way to conditionally process javascript transformer steps (but continue to process subsequent ones)?

Use case:
Message can come in from multiple sources, we only want to execute a transform iff it comes from a specific source.

We can put the entire transformer into a if conditional, but I feel like there's a way to quit out of the transformer thread but continue processing subsequent transformers.

I tried:
Code:
var source = 'FOO';
channelMap.put('debug1','before break');
if (source == 'FOO') {return;}
channelMap.put('debug2','after break');
and in a subsequent transform step:
Code:
channelMap.put('debug3','next transformer');
But I only was able to set debug1, not debug2 or 3.

"break;" and "continue;" also don't work as far as I can tell.

Is this possible or am I stuck putting all of our code into a bunch of conditional if statements?
Reply With Quote
  #2  
Old 04-28-2017, 06:24 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

Here's a sample channel with what I'm talking about.

I'd like to be able to set debug1 and debug3 but not debug2.
Attached Files
File Type: xml _Dev - AKK test channel 2.xml (15.8 KB, 4 views)
Reply With Quote
  #3  
Old 04-28-2017, 07:44 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

you could make use of source filter.
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 06:15 AM.


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