Announcement

Collapse
No announcement yet.

[MirthConnect3] Javascript Reader does not work anymore

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

  • [MirthConnect3] Javascript Reader does not work anymore

    Hi,

    I am currently testing MC3. We previously used MC2.2.3 and everything worked like a charm

    Now I imported my channel to MC3 and it seems it doesn't work anymore.

    Only script I've entered in the source screen seems to run. Filters and Transformers are completely ignored.

    Why is that? Was there a drastic change in design from MC2 to MC3?

    kind regards

  • #2
    Originally posted by gkittlaus View Post
    Hi,

    I am currently testing MC3. We previously used MC2.2.3 and everything worked like a charm

    Now I imported my channel to MC3 and it seems it doesn't work anymore.

    Only script I've entered in the source screen seems to run. Filters and Transformers are completely ignored.

    Why is that? Was there a drastic change in design from MC2 to MC3?

    kind regards
    Hard to troubleshoot without the channel in question...
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      Hey, sorry to let you wait.
      I cannot attach the real one because of the whole environment but I have created a very plain example.

      Attached you'll find a channel which simply does a logger.info() in the source filters, transformers and also in the destinations.

      As you will see it will only print the logger.info text from the main source window.

      Everything in my original channel is done by javascript. The filters, the transformations.
      Am I missing something?

      EDIT: So I got the source filter working. I simply set it to RAW data. But it won't proceed with my source transformer and my whole destination.

      EDIT: sorry, my bad, I am still not used to the new dashboard :-\ how ever. when I defined a variable in MC2 in the source filter or transformer with
      Code:
      bla = 'blubb'
      this variable was available in the whole channel. Now it's pointing out, that the variable was not declared.
      Do I have to put the variables which I have declared in the source in a channel map to make them available in the destinations?
      Attached Files
      Last edited by gkittlaus; 03-07-2014, 12:21 AM.

      Comment


      • #4
        Everything appears to be working as expected. The issue is that you're not returning anything from your JavaScript Reader. If you want to dispatch a message (or list of messages) to the channel, you need to return something.

        Originally posted by gkittlaus View Post
        when I defined a variable in MC2 in the source filter or transformer with
        Code:
        bla = 'blubb'
        this variable was available in the whole channel. Now it's pointing out, that the variable was not declared.
        Do I have to put the variables which I have declared in the source in a channel map to make them available in the destinations?
        I tested this out in 2.2.3 and it does not work, as expected. You cannot define a variable in one script and expect to use it in an entirely different script. That's what the variable maps (connector/channel/global channel/global) are for. You're likely misunderstanding what you did in 2.x. If you post your original 2.x channel here it would be easier to troubleshoot.
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment


        • #5
          sorry to give you headache with this. I was wrong with the scope of variables.
          I got it to run anyway with some testings and switching the data to RAW data.

          It appears that my problem was the stricter parsing according to the datatype of MC3 compared to MC2.

          Comment

          Working...
          X