Skip to main content

I am trying to grab the URL to InfoPath to place in an email event. Based on the criteria I cannot use the send to destination users. I know in K2.net 2003 you can grab K2DWSPath and drop it into the email event. Does anyone know how to do this in blackpearl? I need to figure this out with either no code or a very very minimal amount. Preferrebly none..client doesn't want code.


 Either that or the ability to name the form in the form library to a particular name.

Hi Cory.


I think you have a couple options.  If you are willing to write a small amount of code you can go into the code for the InfoPath Client Event and add it there.  Specifically, right click on the desired event and select View Code.  This will open the XOML view, where you can then double click on the addWorklist WF activity.  Where you'll see the AddWorklist method where the second parameter is the URL to the form.


Alternatively, you should be able to put a Email Event immediately before the InfoPath client event and build out the URL manually in the body of the email.  You should already know the SharePoint site URL and Document Library as they are set in the InfoPath client event wizard (Advanced Mode).  If you have used Environment Library settings (or process data field or SmartObject values) it will make this a bit easier.  As for the actual file name, you can find the structure in the InitializeData method within the INfoPath client event (view code as outlined above).  You will see where the _fileName variable is set.  You will need to rebuild these components into the Email Server event body, by dragging them out from the Workflow Context Browser tab of the K2 Object Browser.  In regards to Serial Number there is no context reference to that, but the format is ProcInstID + "_" + ActivityInstanceDestinationID.  I believe these should both be available via the Context Browser.


HTH.


Thanks Bob. This worked.

I'm having the same issue but Im a little new to all this.  Everything works fine if I build my string with the destination users name hard coded in i.e Domain_UserName (acme_jdoe).  As soon as I try to use the destination user name from the context browser so its dynamic it returns it in the form of DomainUserName and that kills the link.  In the code it uses


k2.ActivityInstanceDestination.User.Name.Replace("/", "_").Replace(""", "_")


to properly format it.  How did you replicate that in the bodiy of the message without using code?


Reply