<html><head><title>OSWorkflow Running the Example App</title></head><body><ulclass="star"><li>Up to <ahref="Documentation.html">Documentation</a></li><li>Back to <ahref="Requirements.html">Requirements</a></li><li>Forward to <ahref="Persistence_Options.html">Persistence Options</a></li></ul><pclass="paragraph"></p>Note that as of version 2.5, the example war application should deploy on most web containers with no external configuration required. The example app now uses memory persistence, so no datasources need to be configured. The instructions below apply for those wishing to configure a persistent store. In order to explore the example workflow, it is recommended that you first deploy the example war as-is, without any persistence.<pclass="paragraph"></p>OSWorkflow comes with a very simple example application to help you get started with understanding the concepts OSWorkflow is based upon. The example application can run on any servlet container. The following guides have been provided courtesy of Ed Yu and Egor Kobylkin. If your application server is
not listed, read one of the guides below as a starting point. Installation
should be very similar.
<ulclass="star"><li><spanclass="nobr"></img><ahref="#orion">Orion</a></span></li><li><spanclass="nobr"></img><ahref="#jrun">JRun</a></span></li><li><spanclass="nobr"></img><ahref="#tomcat40">Tomcat 4.0.x</a></span></li><li><spanclass="nobr"></img><ahref="#tomcat41">Tomcat 4.1.x</a></span></li></ul><h3class="heading-1">Orion <aname="orion"></a><ahref="Running_the_Example_App#orion.html"title="Permalink to orion"></img></a><spanclass="nobr"></img><ahref="#top">top</a></span></h3><pclass="paragraph"></p><divclass="wikicode"><pre>This is a quick stab on how to deploy osworkflow_example.war on Orion 1.5.4 or later.<pclass="paragraph"></p>Setting up persistence
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;It is important to properly configure pooled datasource <spanclass="java&#45;keyword">for</span> good performance.<pclass="paragraph"></p>For Orion 1.5.4+, the add the following to file config/data&#45;sources.xml
to properly configure pooled datasource required by OSWorkflow:<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql Pooled Datasource &#45;&#45;&#62;&#60;data&#45;source
class=<spanclass="java&#45;quote">"com.evermind.sql.DriverManagerDataSource"</span> name=<spanclass="java&#45;quote">"NoPoolPostgresql"</span> location=<spanclass="java&#45;quote">"jdbc/NoPoolDefaultDS"</span> xa&#45;location=<spanclass="java&#45;quote">"jdbc/xa/NoPoolDefaultXADS"</span> connection&#45;driver=<spanclass="java&#45;quote">"org.postgresql.Driver"</span> username=<spanclass="java&#45;quote">"name"</span> password=<spanclass="java&#45;quote">"pass"</span> url=<spanclass="java&#45;quote">"jdbc:postgresql://hostname:port/dbname"</span> inactivity&#45;timeout=<spanclass="java&#45;quote">"30"</span> /&#62;&#60;data&#45;source
class=<spanclass="java&#45;quote">"com.evermind.sql.OrionPooledDataSource"</span> name=<spanclass="java&#45;quote">"PooledPostgresql"</span> location=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> pooled&#45;location=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> xa&#45;location=<spanclass="java&#45;quote">"jdbc/xa/DefaultXADS"</span> source&#45;location=<spanclass="java&#45;quote">"jdbc/NoPoolDefaultDS"</span> connection&#45;driver=<spanclass="java&#45;quote">"org.postgresql.Driver"</span> username=<spanclass="java&#45;quote">"name"</span> password=<spanclass="java&#45;quote">"pass"</span> url=<spanclass="java&#45;quote">"jdbc:postgresql://hostname:port/dbname"</span> inactivity&#45;timeout=<spanclass="java&#45;quote">"30"</span> /&#62;<pclass="paragraph"></p>&#60;!&#45;&#45; Oracle Pooled Datasource &#45;&#45;&#62;&#60;data&#45;source
class=<spanclass="java&#45;quote">"oracle.jdbc.pool.OracleDataSource"</span> name=<spanclass="java&#45;quote">"Default"</span> location=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> xa&#45;location=<spanclass="java&#45;quote">"jdbc/xa/DefaultXADS"</span> ejb&#45;location=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> connection&#45;driver=<spanclass="java&#45;quote">"oracle.jdbc.driver.OracleDriver"</span> username=<spanclass="java&#45;quote">"name"</span> password=<spanclass="java&#45;quote">"pass"</span> url=<spanclass="java&#45;quote">"jdbc:oracle:thin:@hostname:port:SID"</span> inactivity&#45;timeout=<spanclass="java&#45;quote">"30"</span> /&#62;<pclass="paragraph"></p>In addition, modify the osworkflow.xml to reflect how to access sequence
objects <spanclass="java&#45;keyword">for</span> your database.<pclass="paragraph"></p>To use postgresql as the backend database, execute the file tables_postgres.sql
against the database and make sure the following is defined in the file
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_wfentry')"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_currentsteps')"</span>/&#62;<pclass="paragraph"></p>To use oracle as the backend database, execute the file tables_oracle.sql
against the database and make sure the following is defined in the
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Oracle sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_wfentry.nextval FROM dual"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_currentsteps.nextval FROM dual"</span>/&#62;<pclass="paragraph"></p>WAR Deployment
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;Make a directory under the server home (e.g. C:&#111;rion&#111;swf), pleace the file
osworkflow_example.war file under it.<pclass="paragraph"></p>Modify file config/application.xml and add the following line in:<pclass="paragraph"></p>&#60;web&#45;module id=<spanclass="java&#45;quote">"oswf"</span> path=<spanclass="java&#45;quote">"../oswf/osworkflow_example.war"</span> /&#62;<pclass="paragraph"></p>Modify file config/<spanclass="java&#45;keyword">default</span>&#45;web&#45;site.xml and add the following line in:<pclass="paragraph"></p>&#60;web&#45;app application=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">default</span>"</span> load&#45;on&#45;startup=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span> name=<spanclass="java&#45;quote">"oswf"</span> root=<spanclass="java&#45;quote">"/oswf"</span> /&#62;<pclass="paragraph"></p>Finally go to <spanclass="nobr"></img><ahref="http://localhost/oswf">&#104;ttp://localhost/oswf</a></span> to access the sample application.<pclass="paragraph"></p>You can also deploy the ear example application, which uses EJB persistence
rather than the in&#45;memory persistence that the example war webapp uses.</pre></div><h3class="heading-1">JRun <aname="jrun"></a><ahref="Running_the_Example_App#jrun.html"title="Permalink to jrun"></img></a><spanclass="nobr"></img><ahref="#top">top</a></span></h3><pclass="paragraph"></p><divclass="wikicode"><pre>This is a quick stab on how to deploy osworkflow_example.war on JRun4.<pclass="paragraph"></p>Setting up persistence
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;It is important to properly configure pooled datasource <spanclass="java&#45;keyword">for</span> good performance.<pclass="paragraph"></p>For JRun4, it is pretty easy to configure pooled datasource when defining JDBC
resources using the JMC. Startup the admin server and the <spanclass="java&#45;keyword">default</span> server and
then use JMC to define a JDBC datasource <spanclass="java&#45;keyword">for</span> your database within the <spanclass="java&#45;keyword">default</span>server(port 8100). Keep the checkbox clicked <spanclass="java&#45;keyword">for</span> pool connection when adding
in the datasource. Make sure to verify the datasource after adding it in.<pclass="paragraph"></p>JNDI Name jdbc/DefaultDS
Driver <spanclass="java&#45;object">Class</span> Name org.postgresql.Driver
URL jdbc:postgresql://hostname:port/dbName
Description OSWorkflow example Postgresql database.
Pool Connections X
Pool Statements X
Native Results X
User Name user
Password pass
Verify Password pass pass<pclass="paragraph"></p>JNDI Name jdbc/DefaultDS
Driver <spanclass="java&#45;object">Class</span> Name oracle.jdbc.pool.OracleDataSource
URL jdbc:oracle:thin:@hostname:port:SID
Description OSWorkflow example Oracle database.
Pool Connections X
Pool Statements X
Native Results X
User Name user
Password pass
Verify Password pass pass<pclass="paragraph"></p>In addition, modify the osworkflow.xml to reflect how to access sequence
objects <spanclass="java&#45;keyword">for</span> your database.<pclass="paragraph"></p>To use postgresql as the backend database, execute the file tables_postgres.sql
against the database and make sure the following is defined in the file
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_wfentry')"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_currentsteps')"</span>/&#62;<pclass="paragraph"></p>To use oracle as the backend database, execute the file tables_oracle.sql
against the database and make sure the following is defined in the
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Oracle sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_wfentry.nextval FROM dual"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_currentsteps.nextval FROM dual"</span>/&#62;<pclass="paragraph"></p>WAR Deployment
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;To deploy osworkflow_example.war, place the file under the directory
servers/<spanclass="java&#45;keyword">default</span> after setting up the persistence mechanism outlined above.
Restart the <spanclass="java&#45;keyword">default</span> server (port 8100).<pclass="paragraph"></p>Finally, go to <spanclass="nobr"></img><ahref="http://localhost:8100/osworkflow_example">&#104;ttp://localhost:8100/osworkflow_example</a></span> to
access the sample application.</pre></div><h3class="heading-1">Tomcat 4.0.x <aname="tomcat40"></a><ahref="Running_the_Example_App#tomcat40.html"title="Permalink to tomcat40"></img></a><spanclass="nobr"></img><ahref="#top">top</a></span></h3><ulclass="star"><li><spanclass="nobr"></img><ahref="#tomcat41">Tomcat 4.1.x</a></span></li></ul><divclass="wikicode"><pre>README&#45;Tomcat.txt
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;This is a quick stab on how to deploy osworkflow_example.war on Tomcat 4.0.X.<pclass="paragraph"></p>Setting up persistence
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;It is important to properly configure pooled datasource <spanclass="java&#45;keyword">for</span> good performance.<pclass="paragraph"></p>Unfortunately, there is no good documentation on how to setup Tyrex in Tomcat
4.0 and compounded by the fact that Tyrex will be deprecated begining in Tomcat
version 4.1, there is no good way to improve performance under Tomcat 4.0.
Nonetheless, there are documentation on how to configure Oracle pooled
datasource factory in Tomcat 4.0.X. Refer to the urls
<spanclass="nobr"></img><ahref="http://www.apachelabs.org/tomcat&amp;#45;user/20020&amp;#91;3&amp;#45;7&amp;#93;.mbox/threads.html,">&#104;ttp://www.apachelabs.org/tomcat&amp;#45;user/20020&amp;#91;3&amp;#45;7&amp;#93;.mbox/threads.html,</a></span><spanclass="java&#45;keyword">try</span> it out and let me know <spanclass="java&#45;keyword">if</span> you are successful. I've also attempted to
use the LE version of Tomcat 4.0.4 (jakarta&#45;tomcat&#45;4.0.4&#45;LE&#45;jdk14.&#42;) without
any luck (NPE), whereas the full version works fine <spanclass="java&#45;keyword">for</span> me.<pclass="paragraph"></p>Please read the WAR Deployment section below and then come back here.<pclass="paragraph"></p>It is important to copy the osworkflow_example.war into TOMCAT_HOME/webapps
and startup and shutdown the server before making the modifications to
TOMCAT_HOME/conf/server.xml to include:<pclass="paragraph"></p>&#60;!&#45;&#45; OSWorkflow Example Context &#45;&#45;&#62;&#60;Context path=<spanclass="java&#45;quote">"/osworkflow_example"</span> docBase=<spanclass="java&#45;quote">"osworkflow_example"</span> debug=<spanclass="java&#45;quote">"0"</span> reloadable=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span> crossContext=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span>&#62;&#60;Resource name=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> auth=<spanclass="java&#45;quote">"Container"</span> type=<spanclass="java&#45;quote">"javax.sql.DataSource"</span>/&#62;&#60;ResourceParams name=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span>&#62;&#60;parameter&#62;&#60;name&#62;user&#60;/name&#62;&#60;value&#62;user&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;password&#60;/name&#62;&#60;value&#62;pass&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;driverClassName&#60;/name&#62;&#60;!&#45;&#45; Oracle &#45;&#45;&#62;&#60;value&#62;oracle.jdbc.driver.OracleDriver&#60;/value&#62;<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql
&#60;value&#62;org.postgresql.Driver&#60;/value&#62;&#45;&#45;&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;driverName&#60;/name&#62;&#60;!&#45;&#45; Oracle &#45;&#45;&#62;&#60;value&#62;jdbc:oracle:thin:@hostname:port:SID&#60;/value&#62;<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql
&#60;value&#62;jdbc:postgresql://hostname:port/dbName&#60;/value&#62;&#45;&#45;&#62;&#60;/parameter&#62;&#60;/ResourceParams&#62;&#60;/Context&#62;&#60;/Host&#62;&#60;/Engine&#62;&#60;/Service&#62;<pclass="paragraph"></p>Make sure your JDBC driver is in TOMCAT_HOME/common/lib. For oracle, you may
need to rename classes12.zip into classes12.jar <spanclass="java&#45;keyword">for</span> it to work.<pclass="paragraph"></p>In addition, modify the osworkflow.xml to reflect how to access sequence
objects <spanclass="java&#45;keyword">for</span> your database.<pclass="paragraph"></p>To use postgresql as the backend database, execute the file tables_postgres.sql
against the database and make sure the following is defined in the file
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Postgresql sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_wfentry')"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_currentsteps')"</span>/&#62;<pclass="paragraph"></p>To use oracle as the backend database, execute the file tables_oracle.sql
against the database and make sure the following is defined in the
osworkflow.xml:<pclass="paragraph"></p>&#60;!&#45;&#45; Oracle sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_wfentry.nextval FROM dual"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_currentsteps.nextval FROM dual"</span>/&#62;<pclass="paragraph"></p>WAR Deployment
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;To deploy osworkflow_example.war, place it under the directory
TOMCAT_HOME/webapps, startup and shutdown the server. Then set up the
persistence mechanism as outlined above. Next, modify the server.xml file to
configure the data source as outlined above.<pclass="paragraph"></p>Finally, restart the server. Then, go to <spanclass="nobr"></img><ahref="http://localhost:8080/osworkflow_example">&#104;ttp://localhost:8080/osworkflow_example</a></span>to access the sample application.</pre></div><pclass="paragraph"></p><hrclass="line"></hr><h3class="heading-1">Tomcat 4.1.x <aname="tomcat41"></a><ahref="Running_the_Example_App#tomcat41.html"title="Permalink to tomcat41"></img></a><spanclass="nobr"></img><ahref="#top">top</a></span></h3>&#60;Egor Kobylkin egor.kobylkin@o2.com&#62;This is a quick stab on how to deploy osworkflow_example.war on Tomcat 4.1.x. (tested on 4.1.27)<pclass="paragraph"></p>To deploy osworkflow_example.war, place it under the directory
TOMCAT_HOME/webapps, startup and shutdown the server. (Ignore if you have already done it)<pclass="paragraph"></p><iclass="italic">Note that to run the demonstration there is no necessity to create a persistent store - the demonstration will run without it provided that the Tomcat server is not shut down</i><pclass="paragraph"></p><bclass="bold">Setting up persistence</b><pclass="paragraph"></p>Put jboss-j2ee.jar into TOMCAT_HOME/common/endorsed (get it from JBoss.org) to enable EJB lookup.<pclass="paragraph"></p>Next you have to make modifications to
TOMCAT_HOME/conf/server.xml to include:
<divclass="wikicode"><pre>&#60;!&#45;&#45; OSWorkflow JNDI JDBC Data Source Example. egor.kobylkin@o2.com &#45;&#45;&#62;<pclass="paragraph"></p>&#60;Context path=<spanclass="java&#45;quote">"/osworkflow_example"</span> docBase=<spanclass="java&#45;quote">"osworkflow&#45;2.6.0&#45;dev&#45;example"</span> debug= <spanclass="java&#45;quote">"99"</span> reloadable=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span> crossContext=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span><pclass="paragraph"></p>verbosity=<spanclass="java&#45;quote">"DEBUG"</span>&#62;&#60;!&#45;&#45; debug level is set to paranoid, to know what is happening,
turn it off once you <spanclass="java&#45;keyword">do</span> not need it &#45;&#45;&#62;<pclass="paragraph"></p>&#60;Logger className=<spanclass="java&#45;quote">"org.apache.catalina.logger.FileLogger"</span> prefix=<spanclass="java&#45;quote">"OSWorkflow."</span> suffix=<spanclass="java&#45;quote">".log"</span> timestamp=<spanclass="java&#45;quote">"<spanclass="java&#45;keyword">true</span>"</span>/&#62;&#60;!&#45;&#45; put log4j.jar into TOMCAT_ROOT/webapp/osworkflow&#45;2.6.0&#45;dev&#45;example/WEB&#45;INF/lib
<spanclass="java&#45;keyword">if</span> you want to use it <spanclass="java&#45;keyword">for</span> logging
&#45;&#45;&#62;<pclass="paragraph"></p>&#60;Resource name=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> auth=<spanclass="java&#45;quote">"Container"</span> type=<spanclass="java&#45;quote">"javax.sql.DataSource"</span>/&#62;&#60;!&#45;&#45; name=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span> is used in other components of the
Example App, <spanclass="java&#45;keyword">do</span> not change it here! &#45;&#45;&#62;<pclass="paragraph"></p>&#60;ResourceParams name=<spanclass="java&#45;quote">"jdbc/DefaultDS"</span>&#62;&#60;parameter&#62;&#60;name&#62;factory&#60;/name&#62;&#60;value&#62;org.apache.commons.dbcp.BasicDataSourceFactory&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;driverClassName&#60;/name&#62;&#60;value&#62;oracle.jdbc.driver.OracleDriver&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;url&#60;/name&#62;&#60;value&#62;jdbc:oracle:thin:@yourserver.com:port:SID&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;username&#60;/name&#62;&#60;value&#62;your_database_user_name_here&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;password&#60;/name&#62;&#60;value&#62;your_password_here&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;maxActive&#60;/name&#62;&#60;value&#62;20&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;maxIdle&#60;/name&#62;&#60;value&#62;10&#60;/value&#62;&#60;/parameter&#62;&#60;parameter&#62;&#60;name&#62;maxWait&#60;/name&#62;&#60;value&#62;&#45;1&#60;/value&#62;&#60;/parameter&#62;&#60;/ResourceParams&#62;&#60;/Context&#62;<pclass="paragraph"></p>&#60;!&#45;&#45; OSWorkflow JNDI Data Source &#45;&#45;&#62;</pre></div><pclass="paragraph"></p>Some documentation on how to configure JNDI / JDBC data sources:
<ulclass="star"><li><spanclass="nobr"></img><ahref="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html">&#104;ttp://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html</a></span></li><li><spanclass="nobr"></img><ahref="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html">&#104;ttp://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html</a></span></li></ul><pclass="paragraph"></p>Make sure your JDBC driver is in TOMCAT_HOME/common/lib. For oracle, you may
need to rename classes12.zip into classes12.jar for it to work.
For Oracle9 DB use only the JDBC thin driver of version 9 or higher.<pclass="paragraph"></p>In addition, modify the osworkflow.xml to reflect how to access sequence
objects for your database. <ahref="Persistence_Options.html">Persistence Options</a>Description of the entries in osworkflow.xml: <spanclass="nobr"></img><ahref="http://www.opensymphony.com/osworkflow/api/com/opensymphony/workflow/spi/jdbc/JDBCWorkflowStore.html">&#104;ttp://www.opensymphony.com/osworkflow/api/com/opensymphony/workflow/spi/jdbc/JDBCWorkflowStore.html</a></span><pclass="paragraph"></p>To use postgresql as the backend database, execute the file tables_postgres.sql
against the database and make sure the following is defined in the file
osworkflow.xml:
<divclass="wikicode"><pre>&#60;!&#45;&#45; Postgresql sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_wfentry')"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT nextVal('seq_os_currentsteps')"</span>/&#62;</pre></div>To use oracle as the backend database, execute the file tables_oracle.sql
against the database (watch out for the missing comma in the file) and make sure the following is defined in the osworkflow.xml file:
<divclass="wikicode"><pre>&#60;!&#45;&#45; Oracle sequence access &#45;&#45;&#62;&#60;property key=<spanclass="java&#45;quote">"entry.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_wfentry.nextval FROM dual"</span>/&#62;&#60;property key=<spanclass="java&#45;quote">"step.sequence"</span> value=<spanclass="java&#45;quote">"SELECT seq_os_currentsteps.nextval FROM dual"</span>/&#62;</pre></div><pclass="paragraph"></p>Finally, restart the server. Then, go to <spanclass="nobr"></img><ahref="http://localhost:your_port/osworkflow_example">&#104;ttp://localhost:your_port/osworkflow_example</a></span> to access
the sample application.</body></html>