Skip to main content

We are running the latest version of K2 Blackpearl - K2 4.5 (4.10060.1.1200).  I am trying to use ZoneCalculateEvent to get the due date for an item, taking into account working hours, special dates and exception dates specified on the K2 server. But for some reason both special dates and exception dates are ignored.  Thanks in advance for any ideas houghts!


 


 


 


 


 


 


 


 




WorkflowManagementServer



 



 



cnnWMS = new WorkflowManagementServer();



cnnWMS.Open();


 



cnnWMS.ZoneLoad(cnnWMS.ZoneGetDefault());


 



 



 



 




newDueDate = cnnWMS.ZoneCalculateEvent(



 



new DateTime(Year, Month, 1), new TimeSpan(0,48, 0, 0));




 


 

Has there been any update/progress on this?


I am looking at doing something very similar with this.   If anyone has any alternatives or work arounds, would be happy to hear more about them.


I think this might have been fixed in a later update of the product.  Please update to the latest update and test again.


 


Thanks!
frikkie


I've actually also been testing against version 1350 on a PoC server; in the version that we have in Production its using 1230, which won't change anytime soon (maybe ever - not my call).


I read in the help that the fix that they have completed is for setting up a Zone through code, not reading from that Zone.  Previous version neither reading or writing worked.  Now just the reading part doesn't work.  The API doesn't allow you to interrogate this section at all, with the only thing being exposed is the method being utilized at the moment: ZoneCalculateEvent.  This currently does not take into account the Special or Exception dates, just the working hours selected in the Zone.


It's not too bad, but defeats the purpose of having them really, as the only thing it does is not escalate during a special date.  But for the purpose of setting a Due Date to take into account Working Hours and Working Days, its not so good.


Has anyone managed to find a solution to this?  Has anyone found a backdoor way of iterating through the Special & Exception Dates?  My next avenue is probably going to be creating a SmartObject that goes through the Database that stores these dates, which I am hesitant to do for obvious reasons, but not sure I know of another way. 


Any thoughts would be much appreciated.  I currently have a K2 Ticket open to see if that brings about any further clarity/ideas to this issue.


Reply