Skip to main content

Goal:  Provide a tool to allow initiator A to redirect a submitted workitem from Person B to Person C.

  1. Web application runs under IIS pool ID of process/workflow admin.
  2. Use oK2Manager.GetProcessInstancesAll to filter on ProcessFullName and Originator -- to get Folio and ProcInstID
  3. Use oK2Connection.OpenProcessInstance(ProcInstID) to update the process data.
  4. Use oK2Manager.GetWorkListItems to filter on Activity name and Folio -- to get WorkItem.ID
  5. Use oK2Manager.RedirectWorklistItem(strWorkListItemID, strRedirectUserFQN) to redirect to Person B.

Purposes:

  1. Grant us the rights to access other's workitems.
  2. Only display items that initiator submitted.
  3. (not really relevant)
  4. Match the right workitem to get the WorkItem.ID to redirect.
  5. (no problem here)  

It seems that from #2 to #4 I have to search via Folio to get to the WorkItem.ID.   Is this the only way to do it?

The activity has a maximum of 2 slots, so the user could change one or both slots' destinations.   The user wouldn't necc. know the destination to search on (available destination users is provided to us in step #4).

Unfortunately I can't think of any other way with K2Manager.  You could possibly investigate using the reporting FilterService webservice, but I'm not sure that will be any less work than using the GetWorkListItems() method.

Reply