详解DCworkflow
详解DCworkflow
http://www.315ok.org/blogfolder/152
http://www.315ok.org/logo.png
详解DCworkflow
详解DCworkflow
UsageTo see an example, after installing DCWorkflow, using the "Contents"tab of your portal_workflow instance add a "CMF default workflow (rev 2)"instance.
Developing a workflowThis tool is easiest to use if you draw a state diagram first. Yourdiagram should have:
On the "States" tab, add a state with a simple ID for each state onyour diagram. On the "Transitions" tab, add a transition with a simpleID for each group of arrows that point to the same state and havesimilar characteristics. Then for each state choose which transitionsare allowed to leave that state.
Variables are useful for keeping track of things that aren't very wellrepresented as separate states, such as counters or information aboutthe action that was last performed. You can create variables that getstored alongside the workflow state and you can make those variablesavailable in catalog searches. Some variables, such as the reviewhistory, should not be stored at all. Those variables are accessiblethrough the getInfoFor() interface.
Worklists are a way to make people aware of tasks they are requiredto perform. Worklists are implemented as a catalog query that putsactions in the actions box when there is some task the user needs toperform. Most of the time you just need to enter a state ID,a role name, and the information to put in the actions box.
You can manage all of the actions a user can perform on an object bysetting up permissions to be managed by the workflow. Using the"Permissions" tab, select which permissions should be state-dependent.Then in each state, using the "permissions" tab, set up therole to permission mappings appropriate for that state.
Finally, you can extend the workflow with scripts. Scripts can beExternal Methods, Python Scripts, DTML methods, or any other callableZope object. They are accessible by name in expressions. Scriptsare invoked with a state_change object as the first argument; seeexpressions.stx.
Once you've crafted your workflow, you hook it up with a content typeby using the portal_workflow top-level "Workflows" tab. Specify theworkflow name in the target content type's box.
DCworkflow相关文档,下载地址:http://dl.dbank.com/c0kfwwfa0l
Developing a workflowThis tool is easiest to use if you draw a state diagram first. Yourdiagram should have:
- States (bubbles)
- Transitions (arrows)
- Variables (both in states and transitions)
On the "States" tab, add a state with a simple ID for each state onyour diagram. On the "Transitions" tab, add a transition with a simpleID for each group of arrows that point to the same state and havesimilar characteristics. Then for each state choose which transitionsare allowed to leave that state.
Variables are useful for keeping track of things that aren't very wellrepresented as separate states, such as counters or information aboutthe action that was last performed. You can create variables that getstored alongside the workflow state and you can make those variablesavailable in catalog searches. Some variables, such as the reviewhistory, should not be stored at all. Those variables are accessiblethrough the getInfoFor() interface.
Worklists are a way to make people aware of tasks they are requiredto perform. Worklists are implemented as a catalog query that putsactions in the actions box when there is some task the user needs toperform. Most of the time you just need to enter a state ID,a role name, and the information to put in the actions box.
You can manage all of the actions a user can perform on an object bysetting up permissions to be managed by the workflow. Using the"Permissions" tab, select which permissions should be state-dependent.Then in each state, using the "permissions" tab, set up therole to permission mappings appropriate for that state.
Finally, you can extend the workflow with scripts. Scripts can beExternal Methods, Python Scripts, DTML methods, or any other callableZope object. They are accessible by name in expressions. Scriptsare invoked with a state_change object as the first argument; seeexpressions.stx.
Once you've crafted your workflow, you hook it up with a content typeby using the portal_workflow top-level "Workflows" tab. Specify theworkflow name in the target content type's box.
DCworkflow相关文档,下载地址:http://dl.dbank.com/c0kfwwfa0l