Generate Reply NA Message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Generate Reply NA Message

  • Creator
    Topic
  • #53470
    Jon Melin
    Participant

      Hello,

      I am attempting to take an inbound message from a source system and copy most of the fields from it, and reconfigure a couple segments, and send am NA message back to the source (the original message still needs to get to the destination as well). The destination system doesn’t have the ability to generate an NA message back but the source system needs it in order to send a result back later on.

      I started by capturing each segment and manually building a message using TCL but I was having an issue splitting the segments I needed correctly (I will keep trying). I also couldn’t figure out how to still deliver the original message and send another ORM back, route reply didn’t seem to work.

      Is there a way to do this through an XLATE, or does anyone have suggestions or examples when using TCL to do this?  

      Please let me know if you have any suggestions. Thank you in advance.

    Viewing 5 reply threads
    • Author
      Replies
      • #77786
        Jim Kosloskey
        Participant

          Jon,

          Does the sending system require this exchange to be synchrounous?

          In other words are they waiting for the reply you need to make before they will send you ANY next message or can this be asynchronous?  Such that they receivie an acknowledgment from you then send the next message – then at another time the NA message arrives to the orginal sending system and then the weill send (over the original connection) some other message?

          If asynchronous can the message you are generating go to them on a different port than where you are receiving the original message or does the message need to go back on the same port it was received?

          What release of Cloverleaf?

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #77787
          Jon Melin
          Participant

            No they are not waiting for a reply before they will send another messages but they would obviously want the NA back within the shortest amount of time possible (less than a few min).

            The NA message I want the engine to generate and send back (by grabbing most of the data from the incoming ORM) is going to go to another port than the original messages that came inbound. So essentially the flow would be message inc on port 1, delivered to destination, engine creates NA message using inc message from port 1, sends NA outbound back to source on port 2.

            I have Cloverleaf 5.8.4.0.

            Thank you,

            Jon

          • #77788
            Robert Kersemakers
            Participant

              That makes things much easier, at least if I understand all.

              Create thread A to receive the message on port 1. Then route the message from thread A to thread B, which will send it to the destination system. Also route the same message from thread A to thread C, this time translating the incoming message to an NA message. Thread C will send the NA message back to the sending system on port 2.

              Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

            • #77789
              Jim Kosloskey
              Participant

                Jon,

                I would like some clarification as well regarding the sending system. Are you saying you have no acknowledgement exchange with them? In other words they are just sending one message after another without waiting for an Acknowledgment?

                Or are they waiting for an acknowledgement but not waiting for the ‘NA’?

                Based on your description Bob’s suggestion is also how I would approach the situation.

                There is another option which involves copying and overing the message which requires some Tcl and kind of hides what is going on.

                email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

              • #77790
                Jon Melin
                Participant

                  I am waiting for acks, I was saying that the source will continue to send messages (and receive acks back) even without a returning NA message I am talking about.

                  Seems like a simple enough approach, surprising I didn’t just look at it that way. Originally it was going to have to go back to the originating port, but that changed, and my approach didn’t.

                  Could I potentially use the route reply option to do this as well?

                  Thank you,

                  Jon

                • #77791
                  Jim Kosloskey
                  Participant

                    Jon,

                    OK re acks.

                    Regarding route replies unless you changed the Message Type in the metadata of the NA you create to REPLY and place it correctly it is not likely the engine would treat the message as a reply – I am not even sure that would work having never attempted that.

                    Essentially the ‘NA’ mesage is one you are creating inside Cloverleaf it is not a reply for a receiving system so the engine does not consider that a reply but rather data.

                    email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.