Skip to main content

Can anyone help me with some .NET code?...


I had functionality in a previous K2 2003 / ASP.NET application that allowed the Admin to redirect worklist items from 1 user to another by selecting the user's current worklist item from a listbox, then selecting the user to redirect to, and then submitting.  The form used K2ROM and would do a


RedirectWorklistItem(destID, newUserID)


I can't seem to figure out the equivalent in Blackpearl.  Can anyone help?


Thanks!!

 


As this is for the administrator, I believe you should be referring to the K2MNG API and not K2ROM API.


The equivalent for the K2MNG API would be the SourceCode.Workflow.Management API.  Here's a sample I got from somebody else.


SourceCode.Workflow.Management.WorkflowManagementServer oServer = new SourceCode.Workflow.Management.WorkflowManagementServer("myk2server", 5555);

oServer.Open();

SourceCode.Workflow.Management.WorklistItems oItems = oServer.GetWorklistItems("%currentUser", "", "", "", "", "", "");

for (int i = 0; i < oItems.Count; i++)

    if (oItems.ProcInstID == iMyProcInstID) 
    { 
        oServer.RedirectWorklistItem(oItems.Actioner.Name, txtNewDestUser.Text, oItems.ProcInstID, oItems.ActInstDestID, oItems.ID); 
        return; 
    }
}


Thank you very, very much...This is what I was looking for!!


Reply