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!
本文介绍了工作流开发的关键概念,包括模板、关联及实例的区别,并详细解释了如何进行高层次规划、响应工作流事件、数据绑定、任务处理等。此外还提供了部署工作流的方法以及调试技巧。
849

被折叠的 条评论
为什么被折叠?



