This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
An object reference error is thrown when configuring the Out of Office functionality.
If the K2 Server database's name was changed from the default and then later Out Of Office is set, this will cause an object reference error when the RemoveOrphans() method is called from within the SourceCode.WorkFlow.Runtime.Management.
The following error message or an error message similar to one below has been known to occurr.
SourceCode.Workflow.Management.WorklistShare worklistShare = new SourceCode.Workflow.Management.WorklistShare();
worklistShare.ShareType = SourceCode.Workflow.Management.ShareType.OOF;
worklistShare.StartDate = DateTime.MinValue;
worklistShare.EndDate = DateTime.MinValue;
and the Type is added as follows:
SourceCode.Workflow.Management.WorkType workType = new SourceCode.Workflow.Management.WorkType(worklistType);
workType.WorklistCriteria.Platform = "ASP";
workType.Destinations.Add(new SourceCode.Workflow.Management.Destination("K2:" + newDestinationUserAccount, SourceCode.Workflow.Management.DestinationType.User));
This Hotfix is contained within the latest K2 blackpearl 0807 Update. Install the update package to resolve the error.
The latest K2 blackpearl 0807 Update is available as an independent installation package which can be found here: https://portal.k2.com/downloads/bp/default.aspx