Announcement

Collapse
No announcement yet.

Blocking sending messages when any exception occured

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

  • Blocking sending messages when any exception occured

    I am using mirth version 3.4.2.8129


    My channel source will read from the database and destination will construct message to sent to one tcp port.


    In the channel destination tab i created one destination named as ADT_A01. Inside the destination i created several steps as seen in the attachment.

    In script i am catching the exception.


    how to block sending messages if any exception catch occured? .
    Attached Files
    Last edited by prakashjoy; 10-23-2019, 05:30 AM.

  • #2
    I would set a flag in the exception then in the filter, filter based on that flag.

    Comment


    • #3
      I believe
      Code:
      throw('insert message here')
      will "ERROR" the message and stop it.

      -= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
      -= [email protected]
      -= Mirth Connect (Advanced)-certified
      -= Gold member of HL7.org
      -= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines

      Comment


      • #4
        Exception

        I made the changes and the message


        catch(e){
        logger.error("catch-error -> DEST-ADT_A01->TRFM-STEP-INITPROCS -> " + e);
        //db script for updating tje failed status
        throw('PROC ERR')

        }


        Here If the destination is catches its not going to next destinations.
        Thank you

        How to access message constructed from previous destinations from other destinations.

        Comment


        • #5
          "How to access message constructed from previous destinations from other destinations."

          If you mean "FOR other destinations", you can use something like {d4.message} (the d4 refers to the destination #) or you can save the message into a channelMap using the transformer.

          -= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
          -= [email protected]
          -= Mirth Connect (Advanced)-certified
          -= Gold member of HL7.org
          -= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines

          Comment


          • #6
            My channel i have few destinations as below.

            Destination-1 - Constructing message and send to one ip address and port.

            Destination 2 - Writing the messages constructed in Destination-1 to a file.

            How can i achieve this using javascript.

            Comment


            • #7
              Destination-1 - Constructing message send to one ip address and port.

              Destination 1 transformer - Constructing message and Writing the messages constructed in Destination-1 to a file.

              transformer...

              Construct message and write message. msg = constructed message.

              Comment

              Working...
              X