管理

OSWorkFlow工作流中文手册

Posted on 2009-08-20 11:37  lzhdim  阅读(1061)  评论(0)    收藏  举报

试用了一下osworkflow开源工作流框架,感觉很好用,而且非常灵活,极易上手,架构也很清晰,非常不错,在网上备份个中文手册,以便不时之需。

如定义一个起草文件->编写草稿->完成草稿的XML文件如下:

Xml代码
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.6//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">  
  3. <workflow>  
  4.     <initial-actions>  
  5.         <action id="100" name="Start Workflow">  
  6.             <results>  
  7.                 <unconditional-result old-status="Finished"  
  8.                     status="Queued" step="1" />  
  9.             </results>  
  10.         </action>  
  11.     </initial-actions>  
  12.     <steps>  
  13.         <step id="1" name="First Draft">  
  14.             <actions>  
  15.                 <action id="1" name="Start First Draft">  
  16.                     <restrict-to>  
  17.                         <conditions>  
  18.                           <condition type="class">  
  19.                             <arg name="class.name">  
  20.                               com.opensymphony.workflow.util.StatusCondition</arg>  
  21.                             <arg name="status">Queued</arg>  
  22.                           </condition>  
  23.                         </conditions>  
  24.                     </restrict-to>  
  25.                     <pre-functions>  
  26.                       <function type="class">  
  27.                         <arg name="class.name">  
  28.                           com.opensymphony.workflow.util.Caller  
  29.                         </arg>  
  30.                       </function>  
  31.                     </pre-functions>                                    
  32.                     <results>  
  33.                         <unconditional-result old-status="Finished"  
  34.                             status="Underway" step="1" owner="${caller}" />  
  35.                     </results>  
  36.                 </action>  
  37.                 <action id="2" name="Finish First Draft">  
  38.                     <restrict-to>  
  39.                       <conditions type="AND">  
  40.                         <condition type="class">  
  41.                           <arg name="class.name">  
  42.                             com.opensymphony.workflow.util.StatusCondition  
  43.                           </arg>  
  44.                           <arg name="status">Underway</arg>  
  45.                         </condition>  
  46.                         <condition type="class">  
  47.                           <arg name="class.name">  
  48.                             com.opensymphony.workflow.util.AllowOwnerOnlyCondition  
  49.                          </arg>  
  50.                         </condition>  
  51.                       </conditions>  
  52.                     </restrict-to>              
  53.                     <results>  
  54.                         <unconditional-result old-status="Finished"  
  55.                             status="Queued" step="2" />  
  56.                     </results>  
  57.                 </action>  
  58.             </actions>  
  59.         </step>  
  60.         <step id="2" name="finished" />  
  61.     </steps>  
  62. </workflow> 
osworkflow中文手册.rar
Copyright © 2000-2022 Lzhdim Technology Software All Rights Reserved