0

This article discusses creating Visual Studio workflow with custom task forms, created in InfoPath: http://www.codeproject.com/Articles/195348/SharePoint-2010-State-Machine-Workflows-with-Custo

I've build a test workflow, following all instructions of the article, but I get this error message when trying to open the task form (that was created by InfoPath): "The specified form cannot be found.".

Do you have any idea, about what should be checked?

And secondary question: when I publish InfoPath form, does it matter where I publish it to? Can it be any location? Do I have to re-add it to Visual Studio (as Add Existing Item to Module) after every publish? Or can I just add it once to Visual Studio and later publish directly to the folder where it copied form, inside VS project folder (Projects/Project Name/Workflow/Forms/form.xsn)? What is best practice?

I will appreciate answers on how this publishing works, and hopefully some hints about why form is not being opened (not found, according to error message)? Thank you.

1
  • Answer Found: I've kept Googling and found out this: I did not specify Feature Receiver in the Workflow Properties (VS Solution Explorer). Apparently it had to be set to: Assembly: Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c Class Name: Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver After this was set, the custom form finally showed up!
    – SviFi
    Apr 2, 2012 at 17:40

2 Answers 2

2

Publish your form to network location. On the first screen select path and file name, but in the second screen (where you are prompted to specify access path leave it blank), so the result screen should look like this: enter image description here
I think this is your issue.

Do I have to re-add it to Visual Studio (as Add Existing Item to Module) after every publish? Or can I just add it once to Visual Studio and later publish directly to the folder where it copied form, inside VS project folder (Projects/Project Name/Workflow/Forms/form.xsn)?

I suppose you don't have to re-add every time you published your form to VS (if publish location is exactly the same as form path in VS).

2
  • Thank you for answer Kai. As I mentioned I've done all according to instructions, so I had exactly identical publishing report screen. One other thing came to my attention is, the article author emphasizes that URN code of the form should be taken from published form, and I noticed that it actually stays the same, in original source form and in published form. Or is it normal? (Is this only supposed to be different if file name of published form is different?)
    – SviFi
    Apr 2, 2012 at 16:52
  • 1. Thank you Kai for the answer. In my case it was a real solution. (leave access path field blank). 2. And in my case I have to re-add form to VS every time I republish it.
    – MikhailSP
    Apr 19, 2012 at 5:13
0

Answer Found: I've kept Googling and found out this:
I did not specify Feature Receiver in the Workflow Properties (VS Solution Explorer).

Apparently it had to be set to:

Assembly: Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Class Name: Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver

After this was set, the custom form finally showed up!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.