Developing Workflows in VS: Part 7 - Summary and Final Thoughts

 

 

You might feel a little intimidated; there’s a lot to think about and understand.  But don’t worry!  Like I said before, there are just a few key things to really get your head around, and once you can see how they all fit together, the world of workflow will unfold before your eyesJ (or at least make a little more sense;)).  The key takeaways are this: 

1)      Understand the difference between Template, Association, and Instance. The docs will make a lot more senseJ.  Instances come from associations, which come from templates defined by a workflow.xml. 

2)      A little high-level planning of not just the workflow, but its surrounding lists and items, can go a long way.

3)      A workflow can only respond to events that are registered through workflow services.  You must use the SharePoint activities (i.e. the workflow service APIs) to create your items if you want to register your workflow for events on those items.

4)      Data binding with forms is one of the most confusing parts of workflow development.  Just remember:

a.       Your form pages call an OM function that wakes up a workflow via the workflow service.  Each function calls the host, which takes your form data parameter and passes it into the corresponding workflow event receiver activity.

b.      Forms can be either aspx or InfoPath (hosted in an aspx page).   But InfoPath provides benefits, such as client integration, easy authoring, and no code.

c.       If you use IP forms, use the names of your controls to refer to those values inside your workflow (i.e. the data  uses the same schema as your form)

d.      Follow the checklist of steps for InfoPath forms to set them up for data submission.

e.      Tasks are different from the other workflow objects, in how form data is saved (directly to the task instead of into the workflow), how data is received inside the workflow (an SPWorkflowTaskProperties object instead of a string), and how it is defined in the workflow.xml (a content type rather than a page).

5)      When you’re ready to deploy a workflow, fill out a feature.xml and workflow.xml, then use stsadm to install it (the VS templates help automate this).

6)      Debug your workflow by attaching to a live server.  Use breakpoints and the ULS logs to figure out what’s wrong.

Use this guide with the samples in the ECM Starter Kit, which are meant to build on concepts.  Start with HelloWorld to understand InfoPath forms and correlation basics, then move on to Modifications or Replicator.  Developing workflows just takes a little practice, so take it one step at a time. 

Anyway, thanks for reading!  I hope this has been helpful!  I've attached to this entry the full guide doc for this series, which includes a few extra charts and diagrams.   Good luck, and happy workflow everyone! 

發佈了19 篇原創文章 · 獲贊 1 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章