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
Cloverleaf
Stop Thread after receiving a NAK
System
Originally posted by ronald kalmeijer
How can I stop the thread (Status STOP) after receiving a NAK (AR) with 3 Retries.
After stopping the Thread I want to sent a mail.
Which steps must I take to solve this problem?
Ronald
Find more posts tagged with
Clovertech
Comments
jcobane1
You can do this by utilizing a proc in the 'TPS Inbound Reply' context of your outbound thread. The proc can check the reply, and if it is a NAK, write the message to the error database and send an e-mail. Attached is a proc that we have on one of our thread that does this type of logic. You can use it as a reference to develop one of your own. We also have an alert configured that if something gets written to the error database for this thread, it puts the thread "on hold".
Hope this helps.
Jim Cobane - Henry Ford Health System
checkHL7_ack_mcir.tcl
Charlie Bursell
You already have a proc that does most of what Jim says, cl_check_ack in $HCIROOT/tclprocss/recover.tcl.
Simply copy this to a name of your own choosing then simply modify the part where after three tries it sends to the Error DB. Make sure it still goes to Error DB and send your email at that point.
I would suggest you shut down the process and not the thread. If the process is busy the command may time out and the thread not stopped. Either put this thread in its own process or with other threads that are OK to go down at the same time.
As for the shutdown, I would exec a shell script in the background that would wait a couple of seconds to allow the thread to continue long enough to get message to the Error DB
System
Originally posted by ronald kalmeijer
Hi Jim,
Thanks for your tcl-script, it it very usefull.
You mentioned also an alert that puts the thread on hold. Can I have the configuration for the alert.
Ronald
System
Originally posted by ronald kalmeijer
We don't have the cl_check_ack tclproc. For that we have a validateReply60 that handle the ACK messages.
Good to know that the Thread must have his own process.
Do you have an example of the shell script? Thanks
Charlie Bursell
You should have the cl_check_ack proc. It is shipped with Cloverleaf. As I said it is in the file $HCIROOT/tclprocs/recover.tcl. I have no idea what validateReply60 does.
The shell script would be a two line script like;
sleep 2
hcienginestop -p <processname> &
System
Originally posted by ronald kalmeijer
Check, I found the proc cl_check_ack. In the Netherlands we use tclprocs from Enovation which are located in de sites.
Thanks for the script.