The process of creating content type based workflows is sometimes daunting for the SharePoint professional because it requires a number of steps and the order of those steps is critical.
In this tutorial, we have a Content Type Hub defined for our farm and a team site in which we want to use a content type hierarchy to manage our content. For a specific hierarchy of content types, we want to have a specific workflow available to process the content. We don’t want to have this workflow apply to other content types in the library, only specific types of content.
This example steps through the manual process of workflow creation using SharePoint Designer and standard SharePoint administrative features. Obviously, the process can be automated or packaged into features to expedite the publication of the workflow to multiple sites.
Let’s start with our assumptions:
- the Content Type hierarchy has been defined in our Hub
- the target team site has been created
The Content Type hierarchy that we have created is as follows:
- Enterprise Document
- Equipment Operation Manuals and Specifications
For this exercise, we will be associating our workflow with the Administration content type and subsequently applying the workflow to the child content type, Equipment Operation Manuals and Specifications.
Step 1: Create workflow at the Content Type Hub
This will be a reusable workflow that is associated to our parent content type (because we want to work with specific columns of that content type).
Assign Workflow to highest level content type
When creating the workflow, ensure that you have selected the content type to associate to the workflow. If you don’t select a content type, the specific columns will not be available to the workflow.
Step 2: Define the content of the workflow
In our sample workflow, we are only going to manipulate specific column values. I would anticipate that your workflow will be much more complex than this.
Save and Publish the workflow
The workflow must be saved and published. This will make the workflow available in our Content Type Hub.
Step 3: Export the Workflow to install into our target team site
Because the Content Type Hub only publishes the workflow association and not the workflow itself, we must package and install the workflow into our team site. This involves saving the workflow as a portable template (in the form of a WSP).
The Workflow is saved in the Site Assets library in the content type hub (where we created the content type)
Navigate to the Site Assets library and download a copy of the workflow
Save the WSP to a local location on the drive
Step 4: Install the workflow in the target site
Navigate to the site where the workflow is to be used.
Go to Site Settings > Solutions
Upload the solution to the site
Once uploaded, select Activate
Navigate to site settings (in the target site)
Go to the Site Actions area and select Manage Site Features
The Activated workflow solution will now appear as a site feature. Activate this feature
Step 5: Associate the Workflow to the Content Type Parent
Go back to the Content Type Hub and navigate to the content type that you want to associate to the workflow
Select Workflow Settings
We are going to add the new workflow to the Parent Content Type, Administration
Configure the options that you want for the workflow.
IMPORTANT: Make sure that you select “Yes” for the “Add this workflow to all content types that inherit from this content type?”
In the Workflow Admin Screen, select “Update all content types that inherit from this type with these workflow settings
Step 6: Publish the updated content type
Now we need to publish the content type and the changes back out to our subscribing sites
Navigate back to the content type (parent)
Select the manage publishing
If the content type has been previously published, you will need to republish it
Step 7: Publish the Content Type
Once the Publish/Republish has been selected go to Central Admin and run the Content Type Hub and Content type Subscriber jobs
Step 8: Validate the Target Site Configuration
Once the publishing jobs have completed, navigate to your target site and assign the content types to a library.
Once you import content and assign to one of your content types, you will then be able to use the workflows
Select an item and workflows
You will see the workflow assigned to the content in the target library
Hopefully you have found this post useful and can easily see where you can apply this process to your environment and applications.