OSWorkFlow工作流中文手册

试用了一下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="Start Workflow">
			<results>
				<unconditional-result old-status="Finished"
					status="Queued" step="1" />
			</results>
		</action>
	</initial-actions>
	<steps>
		<step id="1" name="First Draft">
			<actions>
				<action id="1" name="Start First Draft">
					<restrict-to>
					    <conditions>
					      <condition type="class">
					        <arg name="class.name">
					          com.opensymphony.workflow.util.StatusCondition</arg>
					        <arg name="status">Queued</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>
				<action id="2" name="Finish First Draft">
					<restrict-to>
					  <conditions type="AND">
					    <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>			
					<results>
						<unconditional-result old-status="Finished"
							status="Queued" step="2" />
					</results>
				</action>
			</actions>
		</step>
		<step id="2" name="finished" />
	</steps>
</workflow>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值