Have you had a look at the server time? Try writing out the date to the console first. I had trouble in the past with date formats. I first convert the dates then it worked. I do not trust DateTime.Now()
Write out the dates to display in the console to make sure that it is the dates you expect:
DateTime DateTime = new DateTime(2006,3,24,0,0,0);
Console.WriteLine(DateTime);
Console.WriteLine(DateTime.Now);
thanks for reply but I already tested it... but you put doubt in my mind and I will recheck it...
Jsut to be sure, can anyone confirm that K2.SetEscalationRule(StartEscDate,0,0,0,0,0) and K2.SetEscalationRule(StartEscDate) do the same thing?
The SetEscalationRule sets the Escalation to fire any number of days, minutes and seconds after a specific date and time past in as the first parameter.
public void SetEscalationRule(
DateTime date,
int Days,
int Hours,
int Minutes,
int Seconds,
int Repeats
);
Look at the OR in the following example:
Example ([Visual Basic])
Public Function MyFunction(ByVal K2 As KO.EscalationRuleContext) As Boolean
Dim myK2ActivityInstance As KO.ActivityInstance
Dim myK2ProcessInstance As KO.ProcessInstance
Dim myK2StringTable As KO.StringTable
Dim DateTime As DateTime = "6/19/2003 12:00:00 AM"
Dim Days As Integer = 1
Dim Hours As Integer = 0
Dim Minutes As Integer = 0
Dim Seconds As Integer = 0
'Set the Escalation
K2.SetEscalationRule(Days, Hours, Minutes, Seconds, 0)
'OR
K2.SetEscalationRule(DateTime, Days, Hours, Minutes, Seconds, 0)
'OR
K2.SetEscalationRule(DateTime)
End Function
You are using the C# Overload method witch should make no difference:
[C#]
public void SetEscalationRule(
DateTime date
);
SetEscalationRule(DateTime) Method
//Or
SetEscalationRule(DateTime,0,0,0,0) Method
// Is the same
Hope this helps.
Hi, I will test this and give you feedback. If I find the same problem, I will let Labs know about immediately. Thanks.