xlate question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf xlate question

  • Creator
    Topic
  • #52401
    Michael Hertel
    Participant

      I have a friend who sent me this question:

      Quote:


      I have a xlate question. I know you do not do xlates but I thought I will ask you.

      This is what I am trying to accomplish:

      I have an inbound thread which has an xlate and then an outbound thread

      a) I need to hit a database to bring back a value, insert the value in my message and send it off.

      b) So I know how to connect to a database, send a Select query like

    Viewing 0 reply threads
    • Author
      Replies
      • #74062
        Jim Kosloskey
        Participant

          The ODBC work can be done right inside the Xlate.

          So the mrn and docid are available to the proc via xlateInVals.

          If, for some reason this is needed to be done post-Xlate what I would do rather than using Tcl Global variables (could be an issue with multi-threading if needed) is to use the USERDATA Metadata field to put the mrn and docid for each message (do this in the Xlate). Then in the post Xlate proc get the information out of the USERDATA Metadata.

          Be aware there are plenty of questions to consider like what if connectivity cannot be achieved – what do you do with the message in flight, how do you stop the flow (or do you want to stop the flow) if this lack of connectivity might continue?

          There are other considerations as well – it is best to think them all through and this is whether this is done with Xlate or not.

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

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