Thursday, March 31, 2011

Elements of type 'Workflow' are not supported at the 'Web' scope. This feature could not be installed

Recently we were working on developing custom share point workflow which basically operates on any share point list/document library. We created a feature to activate/deactivate this workflow on sites.


Initially I had given the scope of this feature as "Site" (i.e. a site collection feature), later during code review I felt that as this feature and workflow basically operates on list and does not have any kind of dependency on any other list or item on the site collection I thought making the scope of this feature as "Web" (i.e. a Site Feature) is fair enough. When I restricted the scope of this workflow feature as "Web" and tried activating I got the error as "Elements of type 'Workflow' are not supported at the 'Web' scope. This feature could not be installed".


Through this I came to know that whenever we create a feature to activate/deactivate workflow the scope it should be Site (i.e. The workflow related feature should always be a Site Collection Feature).