SDU
Personal tools

Calculating the Time when the Service Type is Stopped

From SDU

Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Abstract

This document describes the procedure followed for calculating the total time a Request was on HOLD status.

Schema Customization

Add the following custom attributes on the Call_Req table, using the Web Screen Painter:

Name Type Default Value Comments
zwait_sec Integer 0 This stores the total seconds when the status was on HOLD.
zwait_flag Integer This is a flag variable which keeps track if the previous status is HOLD
zwait_time Date This stores the Last time when the status was on HOLD


Mod and Spel Customizations

Add 2 custom files in the $NXROOT/site/mods/majic folder:

Mod File:

MODIFY cr status ON_POST_VAL set_zcrtime () 300 ;

Spel File:

cr.status::set_zcrtime(...)
{
	int curr_time;
	int time_sec;
	int wait_time;
	int temp_time;
 
	curr_time = (int) now();
	wait_time = (int) zwait_time;
	time_sec=(int) ztime_sec;
 
if (status.hold == 1 && status!="RE")
	{
 
           zwait_time=now();
	   zwait_flag=1;
}
if ((status.hold != 1 || Status == "RE") && zwait_flag==1) 		    
{
	temp_time = curr_time - wait_time;
	zwait_flag =0;
	ztime_sec= temp_time + time_sec;
 
}
 
return;
}
This page was last modified 10:47, 26 May 2009.  This page has been accessed 1,842 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers