Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Coded Workflow

SharePoint 2007

Specifies a Windows Workflow Foundation (WF) workflow that references an assembly for the workflow’s implementation.

Real World Example

A developer wants a workflow-enabled list that has complex processing requirements. She develops a coded workflow using the WF Workflow Designer and packages it as a feature for installation in the SharePoint environment.

Technical Details

A coded workflow is composed of a workflow .xml file, workflow assembly, and potentially various ASPX files or Microsoft Office InfoPath forms used during execution of the workflow. Coded workflows use the complete workflow capabilities of the WF.

WF supports multiple workflow-authoring styles, such as sequential, state machine, and data-driven. The sequential style is straightforward and useful for repetitive, predictable operations that are always the same. The state machine workflow style consists of a set of event-driven states. The data-driven style relies on data to determine whether or not certain activities are run based on a local data state. All of these workflow-authoring styles are supported in a coded workflow.

The following is an example from the Translation coded workflow feature included in Microsoft Office SharePoint Server 2007, which includes both ASPX forms and InfoPath forms references.

<Workflow Name="$Resources:Translation_Title;" Description="$Resources:Translation_Description;" Id="B4154DF4-CC53-4C4F-ADEF-1ECF0B7417F6" CodeBesideClass="Microsoft.Office.Workflow.XlateWorkflow" CodeBesideAssembly="Microsoft.Office.Workflow.Routing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"  TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160" AssociationUrl="_layouts/XlateWfAssoc.aspx" InstantiationUrl="_layouts/IniWrkflIP.aspx" ModificationUrl="_layouts/ModWrkflIP.aspx">
      <Modification_Format><my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD"></my:myFields></Modification_Format>
<!-- Used for clearing status field for placeholder docs when auto-initiated -->

You can develop coded workflows by using the WF Workflow Designer, which is part of Windows Workflow Foundation Extensions for Visual Studio 2005. Developers can use the WF Workflow Designer to graphically define workflow activities and set the order in which to execute those activities.

A good overview of the Windows Workflow foundation as used in Office SharePoint Server 2007 and Windows SharePoint Services 3.0 is presented in the whitepaper Understanding Workflow in Microsoft Windows SharePoint Services and the 2007 Microsoft Office System (Chappell, 2006).

Support Details

Coded workflow assemblies must be installed in the global assembly cache to function. This allows the code to run with full trust and as such should be carefully examined to determine security threats. Also, because workflows are server-side code, they should be reviewed for performance concerns.

Community Additions

© 2015 Microsoft