I have found some code in one of our applications that calls a ProcessSet.LoadInstances method. I can't find any reference to this method in the documentation, and I'm not sure what it does.
The code snippet is below, basically we just need to find a specific process instance but it seems as though there should be a more efficient way to do this.
SourceCode.K2Mng.ProcessFolders PFolders = K2M.GetProcessFolders();
foreach(SourceCode.K2Mng.ProcessFolder PF in PFolders)
{
foreach(SourceCode.K2Mng.ProcessSet ps in PF.ProcessSets)
{
ps.LoadInstances(K2M,"","","","");
foreach(SourceCode.K2Mng.ProcessInstance pi in ps.Instances)
{
if (pi.Folio.ToUpper() == folio)
{
// do stuff
}