Home > Database > Mysql Tutorial > OSWorkFlow深入浅出(2)

OSWorkFlow深入浅出(2)

WBOY
Release: 2016-06-07 15:00:55
Original
1322 people have browsed it

1、配置描述 在开始编写第一个OSWorkFlow之前,我们先来看看OSWorkFlow的配置,OSWorkFlow的最基本配置有,OSWorkFlow的最基本配置有三个,第一个用来配置OSWorkFlow的数据持久策略,流程引擎的清单文件,如下所示第一个是OSWorkFlow的主配置文件,这个文件

1、配置描述

在开始编写第一个OSWorkFlow之前,我们先来看看OSWorkFlow的配置,OSWorkFlow的最基本配置有,OSWorkFlow的最基本配置有三个,第一个用来配置OSWorkFlow的数据持久策略,流程引擎的清单文件,如下所示第一个是OSWorkFlow的主配置文件,这个文件名字保持不变,不要轻易去改变,因为osworkflow框架会在classpath下根据文件名寻找该文件。

2、osworkflow主配置文件

2.1、配置文件如下所示

<strong><osworkflow>
	<persistence class="com.opensymphony.workflow.spi.memory.MemoryWorkflowStore"></persistence>
	<factory class="com.opensymphony.workflow.loader.XMLWorkflowFactory">
		<property key="resource" value="workflows.xml"></property>
	</factory>
</osworkflow></strong>
Copy after login
2.2、配置文件说明

3、osworkflow流程的清单文件

<workflows>
    <workflow name="first" type="resource" location="helloworld.xml"></workflow>
</workflows>
Copy after login

4、helloworld.xml工作流配置,这是我们的重中之重,在这里我们将提前泄露下一章中helloworld的流程配置

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

<workflow>
	<initial-actions>
		<action id="100" name="Start Workflow">
			<results>
				<unconditional-result old-status="Finished" status="Underway" step="1"></unconditional-result>
			</results>
		</action>
	</initial-actions>
	<steps>
		<step id="1" name="HELLOWORLD1">
			<actions>
				<action id="1" name="helloWorld action1">
					<results>
						<unconditional-result old-status="Finished" status="UnderWay" step="2"></unconditional-result>
					</results>
				</action>
			</actions>
		</step>
		<step id="2" name="HELLOWORLD2">
			<actions>
				<action id="2" name="helloWorld action2" finish="true">
					<results>
						<unconditional-result old-status="Finished" status="UnderWay" step="2"></unconditional-result>
					</results>
				</action>
			</actions>
		</step>
	</steps>
</workflow>
Copy after login

5、疑问:

5.1、接下来将该如何表演,如何才能让上述的配置文件生效?他能做什么呢?


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template