Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In SP Designer, I copied a globally reusable workflow in order to make it only reusable (not global) so I can save it as a template solution .wsp to move it to another farm. The problem is that the copied workflow (before I save it as a template) has lost the task fom fields and the task form InfoPath rules. Is there a way not to lose these fields and rules ?

share|improve this question
    
Hello Mignea. I have the same problem. Have you found any way to do it? –  MikhailSP Jul 21 '12 at 21:39
add comment

2 Answers 2

Simply copying the workflow definition .xoml file is not enough. Every single time you design a workflow with SharePoint Designer it creates also a new Content Type with a connection to the InfoPath forms too and so on... (to understand exactly what happens you need to have a look at the file system via SPD - this article explains it clearly http://microsoftsharepointandbeyond.blogspot.com/2010/01/exporting-sharepoint-2010-workflow-into.html).

Do publish the workflow and use the Save as Template to export the .wsp. Once you have the solution package you can delete the workflow from the site. Alternatively you could opt for import the solution package into Visual Studio 2010 which gives you the opportunity to make changes to either the form names, content types and even the workflow itself (see here http://www.pascalbonheur.com/2010/01/export-a-sharepoint-designer-workflow-to-visual-studio-in-sharepoint-2010/)

share|improve this answer
    
Thnaks for the reply. I do a "copy and modify" command Sharepoint Designer, i don't make a raw copy of the xoml file. The problem is that i have to make a new copy of the workflow because the inital workflow is "global" and i cannot make a "save as template "on it.Migrating the workflow trough .wsp works fine, the problem is that the workflow that i save as a template has lost form task fields and rules. –  Mihnea Niculescu May 17 '12 at 17:56
    
Are you referring about any of the OOTB (e.g. approval?) because these are really behaving bad when re-imported, particularly due to the Duration field (experienced a lot of issues with that!). On the other hand, global workflows have no connection whatsoever with any fields, but the UI is generated due to the workflow variables and parameters. –  C. Marius - MVP May 17 '12 at 18:28
    
The workflow is using the Start Approval Task, which is sort of OOTB (comes with some behavioues and fields), and has been heavily modified (added pages of code, impersonation steps etc). I deleted the Duration field, don't use it. I created several custom task form fileds and rules. The feilds has been renamed and the rules has disaspeared from the form. I dont's remember if when i started writting it I copied it from the OOTB approval or started from 0. Maybe the good practice is to work only on reusable workflows and to make only a global one as a copy if needed. –  Mihnea Niculescu May 18 '12 at 7:02
add comment

Thanks to Gennady Vanin, who helped me to find a solution.

To reconnect InfoPath form we can use the next approach:

1. Export source files of the form. Open form in InfoPath designer. And because we can't republish it to the different place using wizard (its type is a Workflow form), we should Export source files (from the menu File\Publish) to some folder. After this step we received a set of files, one of which is "manifest.xsf".

2. Close InfoPath designer.

3. Correct URLs in manifest.xsf Open "manifest.xsf" in a text editor. Find all URL related to the first site collection and replace it with new URLs linked to new site collection. Save the file. Hint: If you don't know the URL to publish in new site collection, you can open autogenerated form from it in the same manner (look at URLs in its manifest.xsf).

4. Publish changed form. Open InfoPath designer, open corrected manifest.xsf in it and publish it (by pressing the publish button for example).

5. Hurray! The form is deployed to the new place!

You should repeat this steps for all custom InfoPath task forms in your workflow.

If somebody needs more detailed description, I could add screenshots.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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