TRXID determination in XML?

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TRXID determination in XML?

  • Creator
    Topic
  • #48321
    David Gordon
    Participant

    Hello everyone,

    We are just getting geared up to do our first XML translations.  We are using CL5.4 on AIX and the first hurdle is this:  How do we do a TRXID determination for XML documents?   You can select XML as a TRXID type, but there are no options.

    Are we missing something, or should we be using FRL as the type, and then using a TCL proc to parse out the value we want?

    Thanks,

Viewing 4 reply threads
  • Author
    Replies
    • #58322
      David Gordon
      Participant

      So, I guess no one knows then?

    • #58323

      It is my understanding that you could write a simple tclproc to parse out the trixid data. Here is a simple example from the Level 2 class.

      trxFrl.tcl

      Code:

      ######################################################################
      # Name: trxFrl
      # Purpose:
      # UPoC type: trxid
      # Args: msgId = message handle
      # Returns: The message’s transaction ID
      #
      # Notes:
      # The message is both modify- and destroy-locked — attempts to modify
      # or destroy it will error out.
      #

      proc trxFrl { mh } {
         set trxId trxid ;# determine the trxid

         set msg [msgget $mh]
         set transType [string range $msg 8 13]
         echo Transaction Type: $transType

         return $trxId ;# return it
      }

      Then, whatever is returned by $trxId is the value(s) used for routing.

      -- Max Drown (Infor)

    • #58324
      Barry Sheesley
      Participant

      Here is what I did to determine the Trx id in XML:

      On the Inbound tab of the thread, make the “Trx id determination Format” Fixed Record Layout (frl).  Then click the Edit button and make the Offset parameter range large enough to encompass the data in the message that will allow you to determine the message type. This range is zero based so I set mine from 0 to 500.

      On the Route Messages tab, add a new route.  For the Name parameter, key a “wildcard” text string that will allow you to determine the Trx id.  For example, I was looking for the string in the XML so I entered .*.* as the Name parameter.  Note the period at the front of the string. I’m not sure why that is necessary but it did not work without it.  Make sure the Wild Card Route checkbox is checked.

      Finally, add a new route detail for your wild card route. This is handled just like any other route detail.  For mine, I used an Xlate.  My actual translation script uses the XML schema even though I defined it as FRL for the sake of routing.

      Just to give credit where it’s due, I did get help from Charlie Bursell and the Quovadx support team in getting this to work.

      Hope this helps.

    • #58325

      Side note: the .* means “one or more of any character. I believe a * all by itself would just mean match on the “*” character.

      -- Max Drown (Infor)

    • #58326
      David Gordon
      Participant

      Ah, that’s clever.  Too bad the actual XML TRXID isn’t actually documented or referenced anywhere…

      Thanks for the advice!

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10