Announcement

Collapse
No announcement yet.

Stop processing Transformer Step

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    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

    Comment


    • #3
      you could make use of source filter.
      HL7v2.7 Certified Control Specialist!

      Comment

      Working...
      X