1 / 19

Porting SPD Workflow to VS.NET (400 level)

IBP200. Porting SPD Workflow to VS.NET (400 level). Todd Bleeker CSA Mindsharp. SPD Workflow Advantages. Easy to create and maintain robust solutions Wizard based interface; similar to the Outlook Rules and Alerts Wizard No code required

keola
Download Presentation

Porting SPD Workflow to VS.NET (400 level)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IBP200 Porting SPD Workflowto VS.NET (400 level) Todd Bleeker CSA Mindsharp

  2. SPD Workflow Advantages • Easy to create and maintain robust solutions • Wizard based interface; similar to the Outlook Rules and Alerts Wizard • No code required • Correlation tokens, content types, and forms are all auto-generated • Works on both WSS-only and MOSS lists • Installs without IT involvement • Automatic version management; including workflow already in progress

  3. SPD Workflow Limitations • Hardwired to a single list instance which cannot be associated with other lists • Very difficult to copy or move • Constructed from a finite subset of activities determined by the SharePoint farm • Sequential only, no state machine • Auto-generated forms cannot be customized • Compiled at runtime • Require SPD to maintain

  4. VS.NET Workflow Templates • Associated with any list in the site collection • Activated as a site collection feature • Constructed from an infinite set of activities determined by the developer • Both sequential and state machine available • Forms can be altered and MOSS workflows can utilize InfoPath forms • Compiled into an assembly at design time and deployed as infrastructure, not content

  5. The Idea: Prototype, Then Port • End users create their own workflow • Better understand the impact new workflow will have on staff • Tweak the workflow over and over until refined • Far better than a requirements document • Then port the SPD workflow to VS.NET • Leverage some of their work • Activate the resulting workflow feature in any site collection • Associate the resulting workflow template with any list/content type in the site collection

  6. Tasks to do inside of SPD • Create a workflow. Even better, have a workflow created for you • Eliminate unused variables (if identifiable) • Understand each step’s purpose • The steps will provide milestone-like markers • This will be very helpful • Identify forms and content types • Test the workflow • Publish the SPD workflow files to a working file system location

  7. Create, Demo, and Publish SPD Workflow Todd C. Bleeker CSA Mindsharp demo

  8. Anatomy of an SPD Workflow • Workflow1.xoml • C# rooted XOML (not XAML activated) • Workflow1.xoml.rules • CodeDom conditions • Workflow1.xoml.wfconfig.xml • Association values • Workflow.aspx Pages • Initiation and Task forms • No Association or Modification forms

  9. Required WorkflowDataFields • <ns0:WorkflowDataField Name="__list" Type="System.String" • Name="__item" Type="System.Int32" Name="__context" Type="WorkflowActions.WorkflowContext" • Name="__initParams"Type="Workflow.SPWorkflowActivationProperties" • Name="__workflowId" Type="System.Guid" • />

  10. WorkflowDataFields Set From Initiation Form • <ns0:ApplyActivation __Context="{ActivityBindROOT,Path=__context}" x:Name="ID2" __WorkflowProperties= "{ActivityBindROOT,Path=__initParams}" />

  11. WorkflowDataFields Set From OnWorkflowActivation • __context = new WorkflowContext(); • __context.Initialize(__initParams); • __list = • __initParams.List.ToString(); • __item = __initParams.ItemId; • __workflowId = __initParams.WorkflowId;

  12. Explore the Exported SPD Workflow Files Todd C. Bleeker CSA Mindsharp demo

  13. Technical Workflow Approaches • Purely code based • VS.NET typically uses these • Fully XAML-based, no code solutions • SPD uses these • No-compilation-needed • Non-technical people like business analysts can design workflows • Partially code / partially XAML based • Best of both • Code, markup, designer

  14. Move XOML from SPD File to VS.NET Project Todd C. Bleeker CSA Mindsharp demo

  15. Get the Steps and Code • Paul Schaeflein’s Blog:http://MindsharpBlogs.com/Paul

  16. Post Event DVD brought to you courtesy of:

  17. SUBMIT AN EVALUATION For a chance to win an 8GB ZUNE! Submit evaluations on MySPC www.MicrosoftSharePointConference.com

  18. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related