On the SharePoint root I created a site collection reuseable workflow. The workflow should be triggered when a new item of content type news page is created in the pages library. The workflow works, but I want to associate the workflow to the pages library when new site is created (as each site contains a pages library where editors can add news pages).
I already have a Visual Studio project including a web template. In the web template there is a feature ID activating the Nintex Workflow feature. I only need to bind the workflow to the pages library, but I can't find how to do that...
Anyone able to help me?
Thanks in advance,
Its not exactly what you looking for, but we have the same requirement, and solved it using the
If your content type is a site content type created at the site collection level and you have already added your reusable workflow to the site content type, it sounds like you just need to add your content type to the pages library of the newly created site. I'm not a developer so I can't tell you how to do that in your visual studio project.
If you were creating the site using a Nintex workflow, you could use the 'Call web service' action to call the 'Lists.asmx' service and use the 'ApplyContentTypeToList' method to add the content type to the pages library after the site is created. You would then need to configure the Web service message in the SOAP editor like so:
<?xml version="1.0" encoding="utf-8"?>
Obviously you would need to fill in your own webUrl and contentTypeId. You can find the contentTypeId of your content type by following the instructions in this post: How to find the ID for associated content type when adding a page layout?
You may be able to call the 'Lists.asmx' web service in your code.
I hope this helps.