where does infopath email event retrieve the link url ?

  • 14 September 2005
  • 3 replies
  • 1 view

Badge +1
Hello,

I am currently testing K2 out and have built a workflow that emails users to iteratively approve a change request infopath form.

The problem I am having is that in the email event, it automatically attaches a link to the infopath form for the user to interact with. (HTTP InfoPath URL: )
This link contains the server name rather than the virtual server url it needs to be. Also, we are testing sharepoint over https, so what I really need to know is where could I modify this link. How can I make this change to affect K2 globally.

Thanks in advance,
eric

3 replies

Badge +11
I assume you're talking about an 'InfoPath Activity Event'. In K2.net Studio, right-click on the event and select Properties. On the Event Item, click the 'Generate Code' button, select the 'Use Code' radio button and click the 'Edit Code' button. In the code behind, specifically at the end of the 'SendDocURL' function, you'll see 2 method calls:
K2.AddWorklist("ASP",FileURL)
SMTPFunction(K2,FileURL,"InfoPath Document URL")

It is the 'FileURL' variable which needs to be changed. The 'FileURL' is built from:
FileURL = strWorkSpaceURL + strDocLib + FileName

and the 'strWorkSpaceURL' is made up from:
strWorkSpaceURL = K2.ProcessInstance.DataFields("K2DWSPath").Value

So, the 'K2DWSPath' process datafield should be changed to point to your Virtual Server.

Hope this helps,
Ockert
Badge +1
Ockert,

Thanks for your help...I actually saw that as well when tryign to identify the source. I would actually like to change the datafield if possible. (inside a Data table or configuration file) The reason is if I make specific code changes for this step then I will have to do it at every single step that I email which in this case is every step of the workflow.

Isn't there a way I could modify this record [K2DWSPath] inside a configuration or a K2 datatable? I would think it should be editable given that it is listing the server name instead of virtual server URL, and would not be useful out of the network.


Thanks!
Eric

=========================================

UPDATE:

Nevermind, I think I have found it. Under the Process properties...There is a section called data fields that allows you to edit the values, and K2DWSPath is listed as a field there as well.

Thanks for your help.
Badge +11
Hi Eric,

Absolutely!!

'K2DWSPath' is a process datafield which is of course editable. Right-click on your process (any blank space on the canvas) and select Properties. Go to DataFields and edit the value for 'K2DWSPath' directly in K2.net Studio. You'll just have to thoroughly test the process as I'm not 100% sure what other modules and functions depend on this datafield value.

Keeping the value in a separate data table or config file would also not make a lot of sense since the code generated by the Event template will always be the same and then you'll also have to manually change every occurence.

Hope this helps,
Ockert

Reply