File Name
Syntax
AddEENotifyUsers ( VAL esc_type_id: INTEGER, VAL esclog: EscalationLogRecord, REF escUserList: LIST OF EscalationUserRecord )
Parameters
integer - the type of the rule pointed to by the escalation log entry
EscalationLogRecord - escalation log entry which contains the notification selections
list of EscalationUserRecord - destination list of users and groups
Returns
None
Side Effects
None
Description
Adds additional users to notify when a TCM escalation log entry is processed.
Dialog Forms Called
None
File Name
Syntax
CalculateNextDateTime( REF esclog: EscalationLogRecord )
Parameters
esclog - escalation log record
Returns
TRUE - a rules-base escalation can move to the next level FALSE - when the escalation level has reached the maximum possible value
Side Effects
None
Description
Given an escalation log record, this function uses the rules in the ESCALATION_RULES table to calculate the next date and time that an escalation notice should be sent. If the log can no longer be escalated, the function returns FALSE.
Dialog Forms Called
None
File Name
Syntax
boolRet:= ConditionIsTrue ( reference_ID, escRule );
Parameters
string - ID of the item being escalated
EscalationRuleRecord - escalation rule being tested
Returns
TRUE if the rule condition is true from reference item
Side Effects
None
Description
Given an escalation rule record and the ID of the item being escalated, this function composes an SQL query. This query is of the form 'ID=<reference_ID> AND <condition>' where <condition> is the boolean condition contained in the escalation rule. The query is then executed to determine if the target ID is selected by the rule.
Dialog Forms Called
None
File Name
Syntax
ConvertSecondsToTime ( REF days: INTEGER, REF newTime: TIME, VAL seconds: INTEGER ) Parameter: days - integer number of days newTime- time value to store new TIME seconds - integer value of seconds to be converted
Parameters
Returns
New Time value as TIME
Side Effects
None
Description
Converts seconds in integer value to TSD Script TIME value.
Dialog Forms Called
None
File Name
Syntax
ConvertTimeToSeconds ( REF days: INTEGER, REF newTime: TIME, VAL seconds: INTEGER ) Parameter: days - integer number of days newTime - time value to store new TIME seconds - integer value of seconds to be converted
Parameters
Returns
seconds value as INTEGER
Side Effects
None
Description
Converts TSD Script TIME value to seconds in integer value.
Dialog Forms Called
None
File Name
Syntax
SlaRelationType ( VAL reference_type: STRING ) Parameter: useSla - Boolean, TRUE means the SLA module is active and the dummy record should be created; FALSE means the SLA module is not on. reference_id - unique ID of the item under the SLA Term reference_type - string value that tells what data the refenernce ID relates to nextNumber - integer value that allows the SLA ID to be unique
Parameters
Returns
BOOLEAN - success or failure
Side Effects
GetNextNumber is called immediately before this routine using Counter ACTIVE_SLA.
Description
Creates a placeholder record to be scanned by the SLA monitor.
Dialog Forms Called
None
File Name
Syntax
DecrementYearDay ( REF yrDay: INTEGER, VAL isLeapDate: DATE, VAL increment: INTEGER )
Parameters
yrDay - integer initial year day value to be incremented
sLeapDate - date of the initial year day used to determine if that date is a leap year
increment - integer is the number of year days to go forward
Returns
None
Side Effects
None
Description
Subtracts decrement value from the year day while checking to make sure that the year day value is not going to previous year. If a previous year, the year value rolls to 364 or 365 and subtracts the remainder of the the decrement value.
Dialog Forms Called
None
File Name
Syntax
EscProfileAndRuleInit
Parameters
None
Returns
None
Side Effects
None
Description
Used to initialize the escalation API module. Populates the g_escProfile record from SYSTEM_PROFILE and g_ruleList from ESCALATION_RULES.
Dialog Forms Called
None
File Name
Syntax
EscTypeListInit
Parameters
None
Returns
None
Side Effects
None
Description
Used to initialize g_escTypeList. Used as part of replacement for EscAPIInit.
Dialog Forms Called
None
File Name
Syntax
GetNotifyList ( VAL esc_rule_ID: INTEGER, VAL esclog: EscalationLogRecord, REF escUserList: LIST OF EscalationUserRecord )
Parameters
integer - ID of the rule pointed to by the escalationlog entry.
If $Unknown, the log entry was generated by the default escalation system.
string - user to whom the reference item being escalated currently belongs.
This user is added to the list of users to notify if the rule has notify_owner set to true.
list of EscalationUserRecord - destination list of users and groups
Returns
None
Side Effects
None
Description
Figures out whom to notify when an escalation log entry is processed.
Dialog Forms Called
None
File Name
Syntax
IncrementYearDay ( REF yrDay: INTEGER, VAL isLeapDate: DATE, VAL increment: INTEGER )
Parameters
yrDay - integer initial year day value to be incremented
isLeapDate - date of the initial year day used to determine if that date is a leap year
increment - integer is the number of year days to go forward
Returns
None
Side Effects
None
Description
Adds increment value to the year day value while checking to make sure that the year day value is not starting a new year. If a new year is started, the year day value rolls to 1 and adds the remainder of the increment value.
Dialog Forms Called
None
File Name
Syntax
InvalidReferenceId ( VAL reference_id: STRING )
Parameters
reference_id
Returns
TRUE or FALSE
Side Effects
None
Description
Used to determine if the reference_id is pointing to a valid problem ID.
Dialog Forms Called
None
File Name
Syntax
LoadList ( VAL whdl: WINDOW, VAL select: String, VAL fieldName: String )
Parameters
whdl - window handle of the window calling the LoadList routine
select - string value that contains the select statement used to retreive the list
fieldName - string value that contains the name of the field to populate
Returns
None
Side Effects
None
Description
Loads a drop-down box from the database.
Dialog Forms Called
None
File Name
Syntax
QueryPeopleForGroup ( group_id, userList );
Parameters
String - group ID to search for members
Llist of string - list of users belonging to group
Returns
Nothing
Side Effects
None
Description
This function is used to load all members belonging to a group. It populates the List Of String reference parameter with each user ID that belongs to the group ID parameter.
Dialog Forms Called
None
File Name
Syntax
QueryUsersForGroup ( group_id, userList );
Parameters
String - group ID to search for members
Llist of string - list of users belonging to group
Returns
Nothing
Side Effects
None
Description
This function is used to load all members belonging to a group. It populates the List Of String reference parameter with each user ID that belongs to the group ID parameter.
Dialog Forms Called
None
File Name
Syntax
RequestEscalationConfig ( VAL whdl: WINDOW )
Parameters
whdl - handle of the main application window
Returns
None
Side Effects
None
Description
Procedural call to WorkWithEscalationProfile.
Dialog Forms Called
None
File Name
Syntax
ConvertTimeToSeconds ( VAL win: WINDOW, VAL id: INTEGER, VAL count: INTEGER, VAL target: STRING ) Parameter: win - window the pick list is in id - integer, pick list id to match on count - integer, number of rows in list target - string, the dlgBox to select from
Parameters
Returns
None
Side Effects
Each ID value to be matched must be defined in the recorddata type in the public section of this KB.
Description
Selects the current row in a pick list.
Dialog Forms Called
None
File Name
Syntax
SetEEStartTime ( VAL escRule: EscalationRuleRecord, REF esclog: EscalationLogRecord )
Parameters
EscalationRuleRecord - the escalation rule that is used for the specified escalation log entry
EscalationLogRecord - escalation log entry for which the start time is to be calculated.
The start date and time is updated in this record.
list of EscalationUserRecord - destination list of users and groups
Returns
None
Side Effects
None
Description
Sets the start time for escalating this TCM escalation log entry. The time is set based on the criteria in the escalation log entry and based on a particular time extracted from the object which is to be escalated.
Dialog Forms Called
None
File Name
Syntax
SetRule ( esclog, escRule );
Parameters
EscalationLogRecord - escalation log for which to set the rule
EscalationRuleRecord - escalation rule being set
Returns
None
Side Effects
None
Description
This procedure takes an esclog record and determines if any escalation rule applies to it. If a record is found to be applicable, then the record is returned. If no record is found, then the escRule is unknown. If more than one rule is applicable, then the first one found is returned. The order is by ESCALATION_RULES.SORT_ORDER.
Dialog Forms Called
None
File Name
Syntax
SlaApiInit Parameter: None
Parameters
Returns
None
Side Effects
None
Description
Intializes the relationship global list.
Dialog Forms Called
None
File Name
Syntax
SlaRelationType ( VAL reference_type: STRING ) Parameter: reference_type - string describing type of processing to be performed
Parameters
Returns
Relative_to ID from the breach_relative_to table
Side Effects
None
Description
Given a reference type, returns the relative_to ID.
Dialog Forms Called
None