Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to enable the full workflow cabability for Minimal Publishing Site Definition

  Asked By: Phenil    Date: May 08    Category: Sharepoint    Views: 2866

I am starting a new WCM project and I have decided to use the Minimal Publishing Site Definition, provided by Andrew Connell. After doing some testing with the minimal publishing site definition I found that it does not enable the full fledged approval workflow for the Pages document library, which is OOTB for the standard Publishing Portal.

Does anyone know if there is a feature that will activate the four workflows and attach them to the standard document libararies, such as Pages?

Or, do I need to manually activate the workflow features and use a feature receiver to attach the workflows?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Aditiya Kapale     Answered On: May 08

If that's the case, take a look at "SiteTemplates" folder inside your "TEMPLATE" folder in your 12 hive. You'll see one called BLANKINTERNET. Open it up and click on the "XML" folder and you'll see the onet.xml file, which is the site  definition. If you look at the configuration node with an ID of "0" you'll see that there are several workflow  features that get activated at the Site Collection level. (These are embedded in the "SiteFeatures" node of the XML.) Add those same features  to your own definition. You'll also need to add several feature  id that get activated at the "Web" level as well. (They needed to be added to your "WebFeatures" node in your onet.xml file.) You need to add the features that wll instantiate a Workflow Task list and a Workflow History list.

In general, rather than doing all that work, I would just suggest you use the BLANKINTERNET site definition  as your base rather than AC's, if you're having to add everything back in that he took out. Just my 2 cents.

 
Answer #2    Answered By: Cristopher Gould     Answered On: May 08

OK, I removed the stapling feature  and added the workflow  features to the SiteFeature section of the onet.xml file Below is my complete example of my site  definition.

==================================================================
WEBTEMP.PublishingMinimal.xml
==================================================================


<?xml version="1.0" encoding="utf-8" ?>
<Templates xmlns:ows="Microsoft SharePoint">
<Template Name="PublishingMinimal" ID="10001">
<Configuration ID="0"
Title="Minimal publishing  Site"
DisplayCategory="Publishing"
Hidden="FALSE"
ImageUrl="/_layouts/1033/images/PublishingSite.gif"
Description="A site for publishing Web pages  on a schedule. It includes document  and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site."
RootWebOnly="false"
SubWebOnly="true" />
<Configuration ID="1"
Title="Minimal Publishing Portal"
DisplayCategory="Publishing"
Hidden="FALSE"
ImageUrl="/_layouts/1033/images/IPPT.gif"
Description="A site for publishing Web pages on a schedule by using approval  workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site."
ProvisionAssembly="Midmark.Web.MinimalSiteDef, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d80e5863d149fff9"
ProvisionClass="Midmark.Web.MinimalSiteDef.ProvisioningEngine"
ProvisionData="SiteTemplates\\PublishingMinimal\\XML\\PortalConfig.xml"
RootWebOnly="true"
SubWebOnly="false" />
<Configuration ID="2"
Title="Minimal Publishing Site with Workflow"
Hidden="FALSE"
ImageUrl="/_layouts/1033/images/PublishingSite.gif"
Description="A site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site."
RootWebOnly="false"
SubWebOnly="true"
DisplayCategory="Publishing"
VisibilityFeatureDependency="c8f622c6-d486-49bf-9267-0561bec141d7" />
</Template>
</Templates>

==================================================================
onet.xml
==================================================================

<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/sharepoint/"
xmlns:ows="Microsoft SharePoint"
Revision="1"
ListDir="Lists"
Title="Minimal Publishing Site">
<NavBars>
<NavBar Name="SharePoint Top Navbar" ID="1002"></NavBar>
</NavBars>
<ListTemplates/>
<DocumentTemplates>
<!-- Section Omitted -->
</DocumentTemplates>
<Configurations>
<Configuration ID="-1" Name="NewWeb" />
<Configuration ID="1" Name="Provisioner" />
<Configuration ID="0" Name="PublishingMinimal"> <!-- mimicking the "Pub Site w/o Workflow" OOTB site template -->
<Lists/>
<Modules>
<Module Name="Default"/>
</Modules>
<SiteFeatures>
<Feature ID="02464C6A-9D07-4F30-BA04-E9035CF54392" /> <!-- Feature: ReviewWorkflows -->
<Feature ID="6C09612B-46AF-4B2F-8DFC-59185C962A29" /> <!-- Feature: SignaturesWorkflow -->
<Feature ID="C85E5759-F323-4EFB-B548-443D2216EFB5" /> <!-- Feature: ExpirationWorkflow -->
<Feature ID="C6561405-EA03-40A9-A57F-F25472942A22" /> <!-- Feature: TranslationWorkflow -->
<Feature ID="c8f622c6-d486-49bf-9267-0561bec141d7" /> <!-- Feature: PublishingMinimal -->
<Feature ID="7C637B23-06C4-472d-9A9A-7C175762C5C4" /> <!-- Feature: ViewFormPagesLockdown -->
</SiteFeatures>
<WebFeatures>
<Feature ID="00BFEA71-DE22-43B2-A848-C05709900100" /> <!-- Feature: CustomLists -->
<Feature ID="00BFEA71-E717-4E80-AA17-D0C71B360101" /> <!-- Feature: DocumentLibrary -->
<Feature ID="00BFEA71-52D4-45B3-B544-B1C71B620109" /> <!-- Feature: PictureLibrary -->
<Feature ID="00BFEA71-A83E-497E-9BA0-7A5C597D0107" /> <!-- Feature: TasksList -->
<Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5" /> <!-- Feature: TeamCollab -->
<Feature ID="00BFEA71-4EA5-48D4-A4AD-305CF7030140" /> <!-- Feature: WorkflowHistoryList -->

<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416"> <!-- Feature: Publishing -->
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="ChromeMasterUrl" Value="~SiteCollection/_catalogs/masterpage/PublishingMinimal.master" />
<Property Key="WelcomePageUrl" Value="$Resources:cmscore,List_Pages_UrlName;/default.aspx"/>
<Property Key="PagesListUrl" Value=""/>
<!-- To limit the web templates available to users, use the following syntax:
LCID-[templatename][#templateindex];LCID-[templatename][#templateindex];...
To include all LCID values, use an asterisk.
For example: *-PublishingMinimal#2;1033-BLANKINTERNET#2 -->
<Property Key="AvailableWebTemplates" Value="*-PublishingMinimal#0;*-PublishingMinimal#2"/>
<!-- To include multiple page layouts, separate them with a colon (:) -->
<Property Key="AvailablePageLayouts" Value="~SiteCollection/_catalogs/masterpage/Minimal.aspx"/>
<Property Key="AlternateCssUrl" Value="" />
<!-- Turning on the SimplePublishing flag means that the Approval workflow
is not required for every published page. -->
<Property Key="SimplePublishing" Value="true" />
</Properties>
</Feature>

<!-- Feature: Navigation -->
<Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="InheritGlobalNavigation" Value="true" />
<Property Key="ShowSiblings" Value="true" />
<Property Key="IncludeSubSites" Value="true" />
</Properties>
</Feature>
</WebFeatures>
</Configuration>
<Configuration ID="2" Name="PublishingMinimal"> <!-- mimicking the "Pub Site w/ Workflow" OOTB site template -->
<Lists/>
<Modules>
<Module Name="Default"/>
</Modules>
<SiteFeatures>
<Feature ID="02464C6A-9D07-4F30-BA04-E9035CF54392" /> <!-- Feature: ReviewWorkflows -->
<Feature ID="6C09612B-46AF-4B2F-8DFC-59185C962A29" /> <!-- Feature: SignaturesWorkflow -->
<Feature ID="C85E5759-F323-4EFB-B548-443D2216EFB5" /> <!-- Feature: ExpirationWorkflow -->
<Feature ID="C6561405-EA03-40A9-A57F-F25472942A22" /> <!-- Feature: TranslationWorkflow -->
<Feature ID="c8f622c6-d486-49bf-9267-0561bec141d7" /> <!-- Feature: PublishingMinimal -->
<Feature ID="7C637B23-06C4-472d-9A9A-7C175762C5C4" /> <!-- Feature: ViewFormPagesLockdown -->
</SiteFeatures>
<WebFeatures>
<Feature ID="00BFEA71-DE22-43B2-A848-C05709900100" /> <!-- Feature: CustomLists -->
<Feature ID="00BFEA71-E717-4E80-AA17-D0C71B360101" /> <!-- Feature: DocumentLibrary -->
<Feature ID="00BFEA71-52D4-45B3-B544-B1C71B620109" /> <!-- Feature: PictureLibrary -->
<Feature ID="00BFEA71-A83E-497E-9BA0-7A5C597D0107" /> <!-- Feature: TasksList -->
<Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5" /> <!-- Feature: TeamCollab -->
<Feature ID="00BFEA71-4EA5-48D4-A4AD-305CF7030140" /> <!-- Feature: WorkflowHistoryList -->

<Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416"> <!-- Feature: Publishing -->
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="ChromeMasterUrl" Value="~SiteCollection/_catalogs/masterpage/PublishingMinimal.master" />
<Property Key="WelcomePageUrl" Value="$Resources:cmscore,List_Pages_UrlName;/default.aspx"/>
<Property Key="PagesListUrl" Value=""/>
<!-- To limit the web templates available to users, use the following syntax:
LCID-[templatename][#templateindex];LCID-[templatename][#templateindex];...
To include all LCID values, use an asterisk.
For example: *-PublishingMinimal#2;1033-BLANKINTERNET#2 -->
<Property Key="AvailableWebTemplates" Value="*-PublishingMinimal#0;*-PublishingMinimal#2"/>
<!-- To include multiple page layouts, separate them with a colon (:) -->
<Property Key="AvailablePageLayouts" Value="~SiteCollection/_catalogs/masterpage/Minimal.aspx"/>
<Property Key="AlternateCssUrl" Value="" />
<!-- Turning on the SimplePublishing flag means that the Approval workflow
is not required for every published page. -->
<Property Key="SimplePublishing" Value="false" />
</Properties>
</Feature>

<!-- Feature: Navigation -->
<Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="InheritGlobalNavigation" Value="true" />
<Property Key="ShowSiblings" Value="true" />
<Property Key="IncludeSubSites" Value="true" />
</Properties>
</Feature>
</WebFeatures>
</Configuration>
</Configurations>

<!-- Standard Default.aspx Root Page -->
<Modules>
<Module Name="Default" Url="" Path="">
<File Url="default.aspx" NavBarHome="True" Type="Ghostable" />
</Module>
</Modules>

<!-- Default Publishing Page -->
<!--
<Modules>
<Module Name="Default" Url="$Resources:cmscore,List_Pages_UrlName;" Path="">
<File Url="default.aspx" Type="GhostableInLibrary" Level="Draft" >
<Property Name="Title" Value="$Resources:cmscore,IPPT_HomeWelcomePage_Title;" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/WelcomeLinks.aspx, ~SiteCollection/_catalogs/masterpage/WelcomeLinks.aspx" />
<Property Name="ContentType" Value="$Resources:cmscore,contenttype_welcomepage_name;" />
</File>
</Module>
</Modules>
-->

</Project>



After investigating the two different ways of activating the workflow features  form my minimal  publishing site definition, I think I now prefer activating the workflows  via my site definition.