Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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="http://schemas.microsoft.com/sharepoint/"
     Title="Prepare workflows"       
     ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
     ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
   <Properties>
       <Property Key="GloballyAvailable" Value="true" />
       <Property Key="RegisterForms" Value="Forms\*.xsn"/>
   </Properties>
 </Feature>

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

1 Answer 1

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

 
discard

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.