SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 new to SharePoint, sorry if answer to my question is obvious. I am using Custom InfoPath Task Forms in my project. For form registering, I am using next code in Feature.Template.xml:

<?xml version="1.0" encoding="utf-8" ?>

<Feature xmlns=""
     Title="Prepare workflows"       
     ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
       <Property Key="GloballyAvailable" Value="true" />
       <Property Key="RegisterForms" Value="Forms\*.xsn"/>

Also I want to use my custom FeatureReceiver (for workflow associating). But I don't know, how can I use it both (it works perfectly separately). Is any way to do it (may be, call to registration method of Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver in FeatureInstalled in my receiver?

I can try to do registration of my forms whole from the code in my feature receiver, but I think, may be there is a different, more elegant approach?

Thank you in advance.

share|improve this question
Why do you not consider to create two features? One with WorkflowFeatureReceiver and another with your custom receiver. – Kai Apr 2 '12 at 8:09
Thank you for the answer. I thought about it, but I think it is more like work-around than solution. I guess, there should be more elegant way to do it. – MikhailSP Apr 2 '12 at 8:13
up vote 1 down vote accepted

I think you can inherit your receiver from WorkflowFeatureReceiver (because it is public class) and then override FeatureActivated\FeatureDeactivating methods with your own logic. And also remove call to base.FeatureActivated if it is not desired.

share|improve this answer
Thank you! Yes, this approach works well. – MikhailSP Apr 4 '12 at 8:40

Your Answer


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.