We are using SourceCode.Workflow.Management.WorkflowManagementServer.GetWorklistItems(new DateTime(1900, 01, 01), DateTime.Now, "", "", "", "", ""); to get a list of *all* WorklistItems for a workflow, which we then want to filter and build a list of 'current' or 'open' WorklistItems from.
An important function of the filtering process is to look at datafield values on the process instance. We hope to do this by opening a connection to port 5252 and using SourceCode.Workflow.Client.Connection.GetProcessInstance(WorkflowManagementServer.ProcInstId) to return a SourceCode.Workflow.Client.ProcessInstance, which can then be interrogated for proper value(s).
[Important note: Since SourceCode.Workflow.Management.WorklistItem does not look like SourceCode.Workflow.Client.WorklistItem, and it doesn't have same 'business' instance data SourceCode.Workflow.Client.WorklistItem has, we are also needing for business reasons to build lists of SourceCode.Workflow.Client.WorklistItems with SourceCode.Workflow.Management.WorklistItem as the 'driver'.]
The problem is SourceCode.Workflow.Client.Connection.GetProcessInstance(WorkflowManagementServer.ProcInstId) throws an exception that the 'Process instance is not found'. I know this not to be the case as I can see the process instance via a custom report and can see it in the Workspace. Any ideas why GetProcessInstance() is not working? What is best way to debug our issue?
TIA,
Curtis