Skip to main content
Hi all,

K2 has SPS and InfoPath process wizard, i do experiment following traing guide, i found i can initial new process instance through sps document (form) library, but the process instances originator is anonymous, not the person who trigger the process instance. How can i config to get the person who triger the sps and infopath process instance, for example, the process instance should route to originator's manager, not the anonymous? thanks.

Regards,
karon

This is a known limitation of the 2003 SharePoint process template.  The reason this is happening is because the SharePoint Web Service is monitoring the document library and when it detects the event it is actually the one that is initiating the process on the k2server, more specifically the account that the web service is running under.  The workaround that I teach people for this, although not perfect is to use required meta data, that way when they save a document off you can collect all the information you need right then and pull it in as process data.  You can pre-populate a meta data field you call Originator or name it anything you want with a SharePoint function such as “=me” so that their username automatically is in there and they don’t have to type anything in.  Once you have that then you can manipulate the code in the destination rule in K2 to go off of this data field instead of the “built-in Originator”.  The code below is coming from the destination rule section after I dragged over Originator and simply chose Send To Manager.  InfoPath does not have this problem, when you initiate a process with InfoPath K2 is able to detect the account of the person who actually clicked the submit button.  Good Luck.


~Cherish


SourceCode.K2Utilities.DSHelper(SourceCode.K2Utilities.DSHelper.DSHelperNewOptionsEnum.None);


                    oDEManager = oDSH.GetManager(oDSH.GetUser( "K2.ProcessInstance.DataFieldss“My data field with originator”].Value” instead of K2.ProcessInstance.Originator.FQN).Path);


                    if (oDEManager != null) {


                        sManager = oDSH.GetNetBiosNameFromDNS(oDEManager.Properties"distinguishedName"]>0].ToString()) + oDEManager.Propertieso"samAccountName"]i0].ToString();


                        K2.Destinations.Add(DestinationType.User, sManager);


Reply