沉睡森林@漂在北京

本处文章除注明“转载”外均为原创,转载请注明出处。

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  152 随笔 :: 4 文章 :: 114 评论 :: 0 Trackbacks
 

憋了几天,终于出来了一点东西。下面是流程图和我写的xml文件。总的来说,对OSWorkflow还是不能算清楚。重点在设计方面疑问还很多。

 

流程图:

XML文件:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.6//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">

<workflow>

    <initial-actions>

       <action id="100" name="开始通知书质检发送流程">

           <pre-functions>

              <function type="class">

                  <arg name="class.name">com.opensymphony.workflow.util.Caller</arg>

              </function>

           </pre-functions>

           <results>

              <unconditional-result old-status="Finished" status="Underway" step="1" owner="${caller}"/>

           </results>

       </action>

    </initial-actions>

   

    <steps>

   

       <step id="1" name="提交质检">

           <actions>

              <action id="1" name="提交质检文本">

                  <restrict-to>

                     <conditions type="AND">

                         <condition type="class">

                            <arg name="class.name">com.opensymphony.workflow.util.OSUserGroupCondition</arg>

                            <arg name="group">zj_hyz</arg>

                         </condition>

                     </conditions>

                  </restrict-to>

                  <pre-functions>

                     <function type="class">

                         <arg name="class.name">com.example.baopi.func.TiJiaoZhiJianFunction</arg>

                     </function>

                  </pre-functions>

                  <results>

                     <unconditional-result old-status="Finished" status="Underway" step="2" owner="zj_zjy1"/>

                  </results>

              </action>

           </actions>

       </step>

      

      

       <step id="2" name="质检处理">

           <actions>

              <action id="2" name="质检员处理">

                  <restrict-to>

                     <conditions type="AND">

                         <condition type="beanshell">

                            <arg name="script">true</arg>

                         </condition>

                         <condition type="class">

                            <arg name="class.name">com.opensymphony.workflow.util.StatusCondition</arg>

                            <arg name="status">Underway</arg>

                         </condition>

                         <condition type="class">

                            <arg name="class.name">com.opensymphony.workflow.util.OSUserGroupCondition</arg>

                            <arg name="group">zj_zjy</arg>

                         </condition>

                     </conditions>

                  </restrict-to>

                  <pre-functions>

                     <function type="class">

                         <arg name="class.name">com.example.baopi.func.ZhiJianChuLiFunction</arg>

                     </function>

                  </pre-functions>

                  <results>

                     <unconditional-result old-status="Finished" status="Underway" step="3" owner="zj_hyz1"/>

                  </results>

              </action>

           </actions>

       </step>

      

      

       <step id="3" name="合议组针对质检修改稿的处理">

           <actions>

              <action id="3" name="合议组处理">

                  <pre-functions>

                     <function type="class">

                         <arg name="class.name">com.example.baopi.func.ZhiJianFanHuiFunction</arg>

                     </function>

                     <function type="class">

                         <arg name="class.name">com.opensymphony.workflow.util.Caller</arg>

                     </function>

                  </pre-functions>

                  <results>

                     <result old-status="Finished" status="Underway" step="5"  owner="zj_hyz1" >

                         <conditions type="AND">

                            <condition type="beanshell">

                                <arg name="script">

                                propertySet.getInt("opinion")==2

                                </arg>

                            </condition>

                         </conditions>

                     </result>

                     <unconditional-result old-status="Finished" status="Underway" step="5" owner="zj_cz1"/>

                  </results>

              </action>

           </actions>

       </step>

 

       <step id="5" name="处长处理">

           <actions>

              <action id="5" auto="true" name="处级报批">

                  <pre-functions>

                     <function type="beanshell">

                         <arg name="script">

                                System.out.println("处长处理...");

                            </arg>

                     </function>

                  </pre-functions>

                  <results>

                     <result old-status="Finished" status="Underway" step="6"  owner="zj_bz1" >

                         <conditions type="AND">

                            <condition type="beanshell">

                                <arg name="script">

                                propertySet.getInt("opinion")==2

                                </arg>

                            </condition>

                         </conditions>

                     </result>

                     <unconditional-result old-status="Finished" status="Finished" step="1" owner="zj_hyz1"/>

                  </results>

              </action>

           </actions>

       </step>

      

      

       <step id="5" name="部级处理">

           <actions>

              <action id="5" auto="true" name="部级处理">

                  <pre-functions>

                     <function type="beanshell">

                         <arg name="script">

                                System.out.println("部级处理...");

                            </arg>

                     </function>

                  </pre-functions>

                  <results>

                     <unconditional-result old-status="Finished" status="Finished" step="1" owner="zj_hyz1"/>

                  </results>

              </action>

           </actions>

       </step>          

 

       <step id="15" name="通知书发送处理">

           <actions>

              <action id="15" auto="true" name="发送通知书">

                  <pre-functions>

                     <function type="beanshell">

                         <arg name="script">

                                System.out.println("通知书发送...");

                            </arg>

                     </function>

                  </pre-functions>

                  <results>

                     <unconditional-result old-status="Finished" status="Finished" step="16" owner="zj_hyz1"/>

                  </results>

              </action>

           </actions>

       </step>

      

       <step id="16" name="flow over">

       </step>

      

    </steps>

</workflow>

 

 

 

posted on 2008-10-07 20:28 王总兵 阅读(250) 评论(0)  编辑  收藏 所属分类: Workflow

只有注册用户登录后才能发表评论。


网站导航: