To deploy a workflow in SharePoint you use a feature. The feature should contain an elements file which points to the workflow to deploy. Here is a sample elements.xml file:
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
<Workflow
Name=”Workflow name”
Description=”Workflow description”
Id=”GUID”
CodeBesideClass=”Namespace.Workflowclass”
CodeBesideAssembly=”ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=publicKeyToken”
StatusUrl=”_layouts/WrkStat.aspx”>
<Categories/>
<MetaData>
</MetaData>
</Workflow>
</Elements>
In the sample above you need to updated the attributes of the Workflow element to match your workflow, especially the Id, CodeBesideClass, and CodeBesideAssembly. Tools such as WSPBuilder and VSeWSS may aid in this.
Your code assembly should be installed in the global assembly cache (GAC). Upon feature activation your workflow will be available to your sites, as per your feature scope. Workflow features must be site collection scoped.
No related posts.
Posted under Administration, Developer
This post was written by furuknap on December 12, 2008
