Routines for slamntr.kb


CalculateBreach

File Name

slamntr.kb

Syntax

CalculateBreach ( REF slaDate: DATE, REF slaTime: TIME, VAL termRec: SLATermRecord)

Parameters

slaDate - date initial record date is given, and breach date is return

slaTime - time initial record time is given, and breach time is return

Returns

modified slaDate, slaTime

Side Effects

If business hours are not found, assume none exist (they are all off hours)

Description

Determines the breach date and time for new active_sla records.

Dialog Forms Called

None


CalculateNextFire

File Name

slamntr.kb

Syntax

CalculateNextFire ( REF actSlaRec: ActiveSlaRecord, VAL seconds: INTEGER)

Parameters

actSlaRec - used to determine breach date and breach time

seconds - integer number of seconds prior to breach that the next fire should occur

Returns

modified actSlaRec (next_fire_date, next_fire_time)

Side Effects

If business hours are not found, assume none exist (they are all on hours for the case that the next fire is prior to the calendar start date).

Description

Determines the next fire date and time for new active_sla records.

Dialog Forms Called

None


LoadBusinessHours

File Name

slamntr.kb

Syntax

LoadBusinessHours ( VAL dayOfYear: INTEGER, VAL calendar_id: INTEGER, REF business_hours: STRING )

Parameters

dayOfYear - integer, year day value

calendar_id - integer, calendar ID

business_hours - string of 1's and 0's for each 15-minute interval of the day

Returns

business_hours, changed value - Boolean, success or failure

Side Effects

None

Description

Gets the string of off/on business hours for a given calendar and year day.

Dialog Forms Called

None


VerifyDateRange

File Name

slamntr.kb

Syntax

VerifyDateRange ( REF termRec: SLATermRecord, VAL refDate: DATE )

Parameters

termRec - used to find calendar_id and update the calendar_id if needed

refDate - date value to check against calendar date range

Returns

termRec - modified calendar_id in the termrec Boolean - TRUE means the record should be processed according to the SLA term

Side Effects

If the refDate is prior to the calendar start date then the record does not fit the SLA term. If there is not a next_calendar_id, then the SLA term expires. If the refDate is beyond today's date then update the term to reflect the new calendar_id.

Description

Checks the start and end date for the calendar associated with the term to see if it should roll to the next calendar because the calendar dates have expired.

Dialog Forms Called

None