infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
getting message from within an xlate call or copy in the pre
System
Originally posted by Bob Schmid
drawing a blacnk - I would ike to do something like a msgget from within the preproc code inside the xlate
so I have $xlateId........ so is there an analogous "msgget" in xpm ?
Find more posts tagged with
Clovertech
Comments
Keith McLeod
Look up your xpm commands. I don't recall there being an xpmmsgget. Or are you just after the metadata in which case you would use xpmmetaget $xlateId
returns keys that you can get information on the message back...
System
Originally posted by Bob Schmid
gotta be away to get ahold of entire message for making decisions via string and / regexp commands
Jim Kosloskey
I think in one of the later releases (perhaps 6.2) there is an option to have the message stored in the metadata (probably User Data).
If you are not on one of those releases then a simple proc either tps Inbound or pre-xlate could do the same.
Once in the User Data Metadata field, you could capture the message inside an Xlate Proc from the User Data metadata field.
Jim Kosloskey
Here is the issue though I think:
If you do anything to the message I don't think it will be reflected in what the Xlate sees as the message is already parsed.
So the most useful thing I think one could do is to just search the message for some string or such but changing the message at this point I don't think will accomplish anything.
Keith McLeod
Can you provide an example of what you are trying to accomplish.
Rob Abbott
Hi Bob
Best way to do this is to have a pre-xlate (or elsewhere) UPoC that puts the message content in USERDATA.
Then you can use xpmmetaget on USERDATA to retrieve the original message content.
There's also a check box in on the route properties that will do this storage for you (Store original message in metadata for downstream processing) -- this was added in 6.1 or 6.2.
System
Originally posted by Bob Schmid
:idea:
wonder why there isn't an xpmmsgget....but yes....we can work with Rob's suggested solution.
Thanks folks!
Always fruitful!
Jim Kosloskey
Also note now your message will be approximately 2 times the size (message plus metadata).
Should you go this route I would suggest you consider a post Xlate Proc to remove the User Data to shrink the message size for Cloverleaf.
I am not sure what you are attempting but I can't think of too many reasons this would be useful inside an Xlate. Most condition checking, string manipulation, etc. can be accomplished with less impact either natively within the Xlate with no Tcl or in the Xlate with little additional Tcl.
So if you would share what you are doing I would be enlightened to understand a reason to do this.