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
KILL $mh help
mike brown
I have this tcl script that is leaving a instance of the message in the RDB when it processes the message through the engine. I know I need a KILL $mh, but where I need this KILL the problem.
I tried to put it in several places in the tcl script, but it either stops the message totally or it keeps leaving one in the RDB with no destination.
any help appreciated, tcl script below. thanks in advance
Stuck in RDB Source dest
11:33:29 [0.0.3784014] P D N 5120 1 1320 coldfd_ftp_adm_
11:08:34 [0.0.3783837] P D N 5120 1 1320 coldfd_ftp_adm_
11:25:48 [0.0.3783922] P D N 5120 1 1320 coldfd_ftp_adm_
############################################################
# Name: x_sms_coldfeed_frl_oru_shift1
# Purpose:
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
#
Find more posts tagged with
Clovertech
Comments
RobertKersemakers
Hi Mike,
At the end of your proc, you do an
if {[cequal $new 1]} {
On TRUE, you CONTINUE the message, but nothings happens when this condition is FALSE, so the message gets stuck. I think you need to use an ELSE with this IF to KILL the message if the condition is not met.
mike brown
I am now confused, i added the else to my proc :
if {[cequal $new 1]} {
set newmsg ""
set new "0"
append newmsg $mshr
append newmsg $pidr
append newmsg $orcr
append newmsg $obxlst
set mh [msgcreate]
msgset $mh $newmsg
lappend dispList "KILL $mh"
lappend dispList "CONTINUE $newmsg"
set obxlst ""
} else {
lappend dispList "KILL $mh"
}
}
}
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
now i get this in my testing tool ROUTE TEST :
Output going to stdout
INBOUND TPS PROCS
PROC=x_sms_coldfeed_frl_oru_adm ARGS=
RUNNING INBOUND TPS IN START MODE
DONE STARTING INBOUND TPS
ADMISSION ASSESSMENT ---
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :WARN/0: UNNAMED_TID:10/07/2009 12:14:29] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[tps :tps :
In my TPS TEST I get this
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
[0:TEST] 'x_sms_coldfeed_frl_oru_adm ' returned bogus strMsgId 'message0' -- ignored
any ideas... I have seen these errors mentioned in CL before but no answers..
System
Originally posted by Robert Milfajt
What I see is that you are trying to CONTINIE $newmsg, which is the actual message and not a message handle.
You are using mh to be both your new message handle and your existing message handle. I believe you need to use another variable, like new_mh for your new message handle. Then you would just CONTINUE $new_mh and KILL $mh.
Hope this helps,
RobertKersemakers
Robert is right, I overlooked the 'set mh [msgcreate]'.
You either use the current mh to put the new message in ('msgset $mh $newmsg' without a msgcreate) and CONTINUE this message, or you create a new messagehandle ('set new_mh [msgcreate]'), CONTINUE this new_mh and KILL the mh.
This probably explains though what you are doing in your IF: creating a new message. But you still need to handle (either KILL or CONTINUE) your current message.
Charlie Bursell
If you use msgcreate here it will probably blow up on you. Since there is no meta data the engine does not know how to treat the message.
Use msgcopy instead to maintain the meta data.
set newMh [msgcopy $mh]
msgset $newMh $data
lappend displist "CONTINUE $newMh" "KILL $mh"
or whatever
mike brown
Thanks Robert and Robert and Charlie, I understand it now, I am working on it as this comes to you. your help is greatly appreciated.. thanks again
mike