SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to add a custom workflow to the WorkflowTemplates library of my web. So how does one go about creating a new SPWorkflowTemplate object and adding it to the WorkflowTemplates collection of the SPWeb object? I can only find information on associating these with lists/webs/content types

share|improve this question
What is the goal of creating a new SPWorkflowTemplate? What is that you are trying to do? – MdMazzotti Mar 17 '14 at 9:44
i'm simply trying to get familiar with the object model. my original reason was to manually add a k2 workflow that didn't want to be added the normal way (there was no option to set the workflow history and workflow tasks lists) – Nacht Mar 18 '14 at 0:17

Your Answer


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

Browse other questions tagged or ask your own question.