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
Alert Action using tcl
Keith McLeod
I want to be able to create an Alert action using tcl. I would like to use a tcl proc that accepts arguments. What is required to call a tclproc in the alert action location? My experimentation has allowed me to code in the tcl acttion pane with no newlines and commands separated by ';'. I have not yet been successful in using the same commands in a single proc never mind accepting an argument. What is the trick? Thanks...
Find more posts tagged with
Clovertech
Comments
Charlie Bursell
I do this all the time and pass arguments. For example, when using the Alerts Package I wrote. In the action line I do something like:
package require alerts; alerts::prototStat "%A" 1
Where the first command loads the package and the second command calls a routine in the package namespace called protoStat and passes 2 arguments. The first argument is %A which is the string that the alert engine would have displayed on the screen for this alert. The second argument is simply a flag I use within the procedure.
FWIW, you can also pass %F which is the temporary file name containing the same message as in %A. I put %A in quotes since it contains spaces and I want to be sure it is read as a single argument.
System
Originally posted by LeeAnne Kardas
srhs_alert_opening is a script that I developed to generate alerts for 1 or more I.P. Addresses and within the Alert Configurator you set it up like this:
{VALUE pstat} {SOURCE hemocare_ob_hds_r1} {MODE actual} {WITH -1} {COMP {== opening}} {FOR {nmin 5}} {WINDOW {* * 7-16 * * 1-5}} {HOST {}} {ACTION
{{exec {srhs_alert_opening hemocare_ob_hds_r1 10.0.6.105 10.0.6.115}}}}
#!/bin/sh
#
exec tcl "$0" "$@"
set curdatetime [clock seconds]
set curdate [clock format $curdatetime -format %m/%d/%Y]
set curtime [clock format $curdatetime -format %H:%M:%S]
set alertflag n
foreach element $argv {
if {[cequal $alertflag n]} {
set threadname $element
}
if {[cequal $alertflag y]} {
set alert "exec hciguimsg -error -message "$threadname: $curdate $curtime Clinical Application Interface Down. nnPlease Contact the Integ
ration Analyst On Call." -title "DEV - Protocol Error" -bell 360 -display $element:0.0 &"
eval $alert
}
set alertflag y
}