Export Reusable workkflow attached to a content type to another site collection
Posted on 2011-09-14
I am at a bit of a loss on how I should go about this.
I have a reusable workflow attached to a content type (it's a published form as a content type called customer cup.xsn) Obviously has several columns.
So hear is what we did. We created a reusable workflow, attached it the customer cup content type at creation, then added our steps to the workflow inc logic, picking up the columns from the content type and using them in the workflow. After that we saved and published the workflow. We then hit the associate with content type button in the ribbon, which allowed us to atttach the workflow to the customer cup content type via the browser. So far so good. We tested the workflow and all was well. We even attached the content type to other form libraries and the workflow followed and worked ok. All good.
Now here is the issue, we exported the workflow, and imported to solutions gallery of a different site collection. We re-published the form as the same content type as the source site to the new site collection (to form server templates library). We activated the solution in the new site collection and activated the feature. Now, when we open the workflow in SP Designer it's there, but the scope it now set to all, instead of the customer cup content type. Also, we cannot associate it to any content type via the ribbon in SP Designer. We are thinking that when we published the content type to the new site collection the content type gets a new ID, thus the workflow association to the content type in the new site is broken?
Also, in the new site the site columns of the customer cup content type are visible in the site columns gallery. However, you cannot add them/not visible when trying to add them to the workflow via the associtation column button in the ribbon in SP Designer. This is again, probably due to them column being associated with the content type that the workflow cannot pick up. We also cannot associate the workflow to any other content type in the new site collection.
So we tried creating a new reusable workflow, setting content type at creation to all, and adding all the content type site columns in as associtation columns. Now when we import to the new site collection all the columns appear in the workflow. However, if we publish the workflow and attach the workflow to the form library, the workflow will add the assoication columns to the library(what it should do). What we fear is when we publish the form (as a content type to the site) then attach the content type to the form library, the library will have two sets of columns. One set from the worflow (that has the associate columns) attached to the library and the other from the content type.
This will cause problems on targeting the form columns for workflow purposes?
So million dollor question is, how do you export a reusable workflow to another site collection/form library that is attached to a content type?