Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Ack/Nak handling › Reply To: Ack/Nak handling
Instead of erroring the message, I have a proc with the code below that runs under TPS inbound replies that runs before our generic ACK checker proc. I look for AR’s and kill the reply before the ACK checker has a chance to validate it. So the interface ‘times out’ on the Cloverleaf side and resends the message each time an AR is encountered. There is counting logic and I email “them” and me every 5 AR’s. You can page too.
When the next AA comes in, the counter resets. This way I don’t have to worry about it, “they do!”
run {
keylget args MSGID mh
set msg [msgget $mh]
set response [vm_getHL7 $msg MSA 0 1]
if {[cequal $response AA]} {
set ARcnt 0
}
if {[cequal $response AR]} {
incr ARcnt
if {[expr $ARcnt % 5] < 1} {
set notifylist "pgmmjh@vmmc.org pgmxyz@vmmc.org interfaceengine@abc.org"
exec echo $msg | mail -s "$HciSite - ABC AR response(s) received $ARcnt" $notifylist
}
echo $module - ABC AR received - Message killedn$msgn
return "{KILL $mh}"
}
lappend dispList "CONTINUE $mh"
}