Specifications
Example: Develop a Text-Based Transaction Rule
representatives to log into Remedy. (Because the customer service
representatives interface with the customer, any delays for them translate into
longer support calls for the customer. You have decided that you do not need
to monitor the login times for other users.) All support representatives' login
names begin with CS_. So you define a transaction that involves the user
typing "CS_" (and other letters) in the Login User Name field, followed by
clicking OK.
Based on information collected in an event log file, the transaction definition
for CS_Login begins as follows:
transaction "CS_Login"
module "CS_Login"
{
# Remedy (aruser.exe) starts and creates the login window
#
Event "StartAruserProcess" Process Start { ExecutableName="aruser" }
Event "StartAruserWindow" Windows Start { ExecutableName="aruser" }
Event "CreateLoginWindow" Windows Create { Title="Login" }
Event "SetTitleLogin" Windows SetTitle { Title="Login - Remedy User" }
#
Now you need to add event specifications that recognize when users type
"CS_" or "cs_" in the Username field of the Login window, indicating that they
are customer service representatives. Because users may be typing in
uppercase or lowercase, you need to use choice statements to cover both
cases.
#
# All customer service login names begin with CS_
# so check for the user typing CS_
# after the login window is created
#
# For login name, type uppercase C or lowercase c
#
Choice
{
Event "Type_C" Windows KeyPress { Key=67 } # uppercase C
Event "Type_c" Windows KeyPress { Key=99 } # lowercase c
}
# For login name, type uppercase S or lowercase s
#
Choice
{
Event "Type_S" Windows KeyPress { Key=83 } # uppercase S
Event "Type_s" Windows KeyPress { Key=115 } # lowercase s
}
# Type an underscore
98 BTStudio Administration Guide