Due to several projects, I have been troubled by the process, I decided to learn about workflow, and I learned that OsWorkflow is a lightweight and extremely flexible workflow engine (please visit: http: // Www.opensymphony.com/osworkflow, so it is to learn. Torting an afternoon, finally run the coming of Example. My test environment: WinXP Tomcat4.1.30 Oracle8.05 JDK1.4.2. First, download https://osworkflow.dev.java.net/files/Documents/635/4647/ositeflow-2.7.0.zip. After decompression, copy OSWORKFLOW-2.7.0-Example.War to Tomcat's WebApp, start Tomcat, access http://localhost/osworkflow-2.7.0-example, everything is very easy. OsWorkflow provides a variety of persistence mechanisms MemoryStore (Default), Serializables, JDBCStore, OFBIZSTORE, and more. Since the downloaded EXAMPLE is in order to facilitate the initiator to run the program as soon as possible, MemoryStore is used. Oh, the actual system will not let the data stay in memory. Change to JDBCStore to try. 1. Modify Tomcat's Sever.xml, add:
Resource name = "jdbc / mydb" auth = "container" type = "javax.sql.datasource" />
factory name> org.apache.commons.dbcp.basicDataSourceFactory value> parameter> driverclassname Name> Oracle.jdbc.driver.Oracledriver value> parameter> URL name> jdbc: Oracle: Thin: @ 127.0.0.1: 1521: Orcl Value> parameter> username name> Oswf value> parameter> password name> Oswf value> Parameter> maxactive name> 20 value> parameter> maxidle name> 10 value> parameter> maxwait name> -1 value> parameter> resourceparams>
Context> 2, modify web-inf / classes / OSWORKFLOW.XML (red part is modified according to your database) < Property key = "step.id" value = "id" />
/> persistence>
factory> osworkflow> 3, in Web-INF / CLASSES propertyset.xml protyset> printsters> 4, modification Osuser.xml under Web-Inf / Classes
OS_USER property> OS_GROUP property> OS_MEMBERSHIP property> USERNAME property> pASSWORDHASH property> GROUPNAME property> USERNAME property> GROUPNAME property> java: comp / env / jdbc / mydb property> provider> OS_USER property> OS_GROUP property> OS_MEMBERSHIP property> USERNAME property> Passwordhash < / Property> GROUPNAME property> USERNAME property> GROUPNAME property> Java: Comp / Env / JDBC / MYDB Property> <
/ Provider> OS_USER property> OS_GROUP property > OS_MEMBERSHIP property> USERNAME property> pASSWORDHASH property> GROUPNAME property> USERNAME property> GROUPNAME property> java :! comp / env / jdbc / mydb property> provider> <- Authenticators can take properties just like providers.This smart authenticator should work for 'most' cases - it dynamically looks up the most appropriate authenticator for the current Server. -> opensymphony-user> 5, running the SRC / ETC / DEPL in the download package in SQL-PLUS Oyment / jdbc / oracle.sql 6, start Tomcat 7, OK.