浏览 3060 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2012-08-23
下面是我的例子: <?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 name="开始工作流" id="0"> <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.OSUserGroupCondition</arg> <arg name="group">UserGroup</arg> </condition> </conditions> </restrict-to> <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 name="填写请假信息" id="1"> <external-permissions> <permission name="permA"> <restrict-to> <conditions type="AND"> <condition type="class"> <arg name="class.name">com.opensymphony.workflow.util.OSUserGroupCondition</arg> <arg name="group">UserGroup</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.AllowOwnerOnlyCondition</arg> </condition> </conditions> </restrict-to> </permission> </external-permissions> <actions> <action name="申请" id="1"> <pre-functions> <function type="class"> <arg name="class.name">com.ideamoment.function.MyApplyFunction</arg> </function> </pre-functions> <results> <unconditional-result old-status="Finished" status="Underway" step="2" owner="${caller}"/> </results> </action> </actions> </step> <step name="经理审批" id="2"> <external-permissions> <permission name="permA"> <restrict-to> <conditions type="AND"> <condition type="class"> <arg name="class.name">com.opensymphony.workflow.util.OSUserGroupCondition</arg> <arg name="group">ManagerGroup</arg> </condition> <condition type="class"> <arg name="class.name">com.opensymphony.workflow.util.StatusCondition</arg> <arg name="status">Underway</arg> </condition> </conditions> </restrict-to> </permission> </external-permissions> <actions> <action name="同意" id="2"> <pre-functions> <function type="class"> <arg name="class.name"> com.opensymphony.workflow.util.Caller </arg> </function> </pre-functions> <results> <result old-status="Finished" status="Finished" step="3" owner="${caller}"> <conditions> <condition type="beanshell"> <arg name="script"> propertySet.getInt("daycount")>5 </arg> </condition> </conditions> </result> <unconditional-result old-status="Finished" status="Underway" step="4" owner="${caller}"/> </results> </action> <action name="不同意" id="3"> <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="Finished" step="4" owner="${caller}"/> </results> </action> </actions> </step> <step name="领导审批" id="3"> <external-permissions> <permission name="permA"> <restrict-to> <conditions type="AND"> <condition type="class"> <arg name="class.name">com.opensymphony.workflow.util.OSUserGroupCondition</arg> <arg name="group">LeaderGroup</arg> </condition> <condition type="class"> <arg name="class.name">com.opensymphony.workflow.util.StatusCondition</arg> <arg name="status">Underway</arg> </condition> </conditions> </restrict-to> </permission> </external-permissions> <actions> <action name="同意" id="4"> <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="4" owner="${caller}"/> </results> </action> <action name="不同意" id="5"> <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="4" owner="${caller}"/> </results> </action> </actions> </step> <step name="审批完成" id="4"></step> </steps> </workflow> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2013-05-13
caller只是记录当前调用者,重要的是owner,指定下一个step的执行者。
|
|
返回顶楼 | |