Client want a function: Administrator of K2.net can get all the Process Instances in the enterprise, choice some Instances then do some operation, such as redirect to others, etc. I know in K2 Server Manager we can do that, but can i use code to do that, for example, user want to do this through a asp.net page remotely, not through K2 Service Manager MMC.
I see the K2MNG object, we can use K2Manager.GetWorkListItems() to return all WorkListItem running, but K2MNG.WorkListItem has not the method Redirect just like K2ROM.WorkListItem.
So how can I do? Would someone give me some instructions, sample code will be better, thanks.
Regards,
karon
Page 1 / 1
but K2MNG.WorkListItem has not the method Redirect just like K2ROM.WorkListItem.
the method you are looking for is K2Manager.RedirectWorklistItem - this method takes as parameters a WorkListItemID and a Userame (e.g. domainusername if you are using the standard AD user manager)
Could you perhaps explain what exactly you want to do, and more specifically what you mean by 'redirect to others'?
If you want to redirect all items from a specific user to another user using K2MNG, you can retrieve a collection of the first users worklist items using the K2Manager.GetWorkListItems method and pass the first users' username as a parameter. Then loop through the worklist collection and use the RedirectWorklistItem method to redirect the worklist item from the first user to the second user.
Thanks Neilm, I omit the API K2Manager.RedirectWorklistItem(), so combined with K2Manage.GetWorkListItems(), administrator can get users' WorkListItems then do what he want to do, such redirect.
Also, what I mean "redirect to others" is the same as you guess, Redirect a users WorkListItem to other poeple. Thank you very much
Regards,
karon.
Also, what I mean "redirect to others" is the same as you guess, Redirect a users WorkListItem to other poeple. Thank you very much
Regards,
karon.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.