Hi Karen,
If you want to execute your script every time a particular thread receives a messages, then alerts are not the way to go.
You should insert a tcl-proc into the ‘TPS Inbound Data’ of that thread. The tcl-proc will look something like this:
######################################################################
# Name: execute_script
# Purpose: Execute script.
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode (”start”, “run” or “time”)
# MSGID message handle
# ARGS user-supplied arguments:
#
#
# Returns: tps disposition list:
#
#
proc execute_script { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
exec
lappend dispList “CONTINUE $mh”
}
shutdown {
# Doing some clean-up work
}
default {
error “Unknown mode ‘$mode’ in execute_script”
}
}
return $dispList
}
where is the path and the name of the script.
That should do the trick. Just be careful: if the script can return an error, then you need to take care of that in the tcl-proc.
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands