Announcement

Collapse
No announcement yet.

Access to channelMap in postprocessor

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

  • Access to channelMap in postprocessor

    Hi,

    I have a channel with a post processing script. From this script I can read channelMap but if I want to store something in it does not appear in the dashboard. Is it normal or is it a bug?

    Thanks in advance!

    Ignacio
    --
    Ignacio

  • #2
    Not sure what you mean by it not appearing on the dashboard. Do you mean a logger statement?
    I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
    http://www.linkedin.com/pub/david-rothbauer/5/923/518
    codeismydrug.wordpress.com
    hl7coders.wordpress.com

    Test all my code suggestions prior to implementation

    Comment


    • #3
      No, in Mappings tab (on Dashboard), when you select the message.
      --
      Ignacio

      Comment


      • #4
        Oh! I refer to that as the message browser...hence the confusion.

        I'm pretty sure this is working by design as the post-processor script kicks in after the message leaves the channel (and the details written into the the browser tabs).

        If you want to see what the value is, the quick way is to use one of these statements:

        Code:
        logger.error('This is what my variable says: ' + $(variable));
        
        logger.debug('This is what my variable says: ' + $(variable));
        
        logger.info('This is what my variable says: ' + $(variable));
        That you use will depend on what your logging level is set at. (I set mine on my appliance, not sure where to set it on a non-appliance).

        You'll find these statements appear on the server log.

        Just some tips for using logger statements (learned from experience);

        I will throw my channel name, and where it resides in the logger statement (so I can go take it out if it gets annoying).
        If I have a lot of statements (as in I'm trying to figure out why something isn't working), I will put a logger statement at the start of the section I'm working on identifying the channel and location (to save me putting it in at each line)
        I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
        http://www.linkedin.com/pub/david-rothbauer/5/923/518
        codeismydrug.wordpress.com
        hl7coders.wordpress.com

        Test all my code suggestions prior to implementation

        Comment


        • #5
          Thanks, but the problem is that the keys i put on postprocessor it does not show on mapping tab.

          I attached an example of the problem. It's a simple channel with a javascript reader and one destination. I put two keys on channelMap, one on destination (called var1) and other on postprocessor (called var2).

          Like you can see in screenshot attached: var1 it shows on mapping but var2 not.

          Cheers.

          Ignacio.
          Attached Files
          --
          Ignacio

          Comment


          • #6
            Right, if var2 is mapped in the post-processor its being established after this message is written to the dashboard, hence, there is no var2 variable at this time.

            You need to use a logger statement to write it to the server log if you need to see it after the message goes through.
            I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
            http://www.linkedin.com/pub/david-rothbauer/5/923/518
            codeismydrug.wordpress.com
            hl7coders.wordpress.com

            Test all my code suggestions prior to implementation

            Comment


            • #7
              Thanks Bostad for your replies and advices.
              --
              Ignacio

              Comment


              • #8
                How to create & send acknowledgment in POSTPROCESSOR

                How to create & send acknowledgment in POSTPROCESSOR? Please share sample javascript code thanks

                Comment

                Working...
                X