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
Invalid MSI index -1
Christopher Wells
I have TCL where I am creating multiple outbound messages from a single inbound message, splitting apart FT1 / ZPA segment pairs into unique outbound messages. The proc seems to work fine for a while, but occasionally it throws an "Invalid MSI index -1" error. When this happens, I find the inbound message is in the recovery db with a message state of '5'. I remove it from the recovery db and re-send the same message from SMAT without error. This error only seems to occur when the process it is in is stopped, possibly when this TCL is in the middle of processing a message. Here is a code snippet for the message creation:
set outboundMsg [join $message_out "r"]
set mh2 [msgcreate -type data]
msgmetaset $mh2 DESTCONN $destConn
msgset $mh2 $outboundMsg
lappend dispList "CONTINUE $mh2"
Any suggestions on why this might be erroring out? Out of thousands of messages, it has only errored out in this way about 3 times. I have put it in its own process to mitigate the problem, but would like to eliminate it altogether.
Thanks for any insight anyone may have on this,
Find more posts tagged with
Clovertech
Comments
RobertKersemakers
Hi Christopher,
I read in another thread that you solved this. You really need to kill the original message when doing stuff like this.
Also, instead of a 'msgcreate' I try to use 'msgcopy' as much as possible. This way all metadata like destination etc from the original message will be copied as well.
Christopher Wells
With info from another thread, I was able to solve the issue. I am leaving this thread here and posting my solution to make it easier for others to find the solution to this particular error:
set msgData [msgget $mh]
# Kill original message:
lappend dispList "KILL $mh"
...
# create new OB message
set mh2 [msgcopy $mh]
msgmetaset $mh2 DESTCONN $destConn
msgset $mh2 $outboundMsg
lappend dispList "CONTINUE $mh2"
I have not experienced the error since making these changes.
Regards.