Source

osworkflow / docs / JDBCWorkflowFactory.html

<html>
    <head>
        <title>OSWorkflow - 
        JDBCWorkflowFactory
         </title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <p><b>com.opensymphony.workflow.loader.JDBCWorkflowFactory</b> is an alternative factory, that allows you to store your workflow definitions in a JDBC database instead of putting them into the xml files.</p>
<h2><a name="JDBCWorkflowFactory-ThesefeaturesareplannedforJDBCWorkflowFactory%2Cbutnotyetimplemented%3A">These features are planned for JDBCWorkflowFactory, but not yet implemented:</a></h2>
<ol>
	<li>versioning support</li>
	<li>find alternative to storing xml directly</li>
	<li>delete function</li>
</ol>


<p>It requires some configuration to get it running:</p>
<h3><a name="JDBCWorkflowFactory-osworkflow.xml%3A"><a name="JDBCWorkflowFactory-osworkflow.xml"></a> osworkflow.xml:</a></h3>
<div class="code"><div class="codeContent">
<pre class="code-java">&lt;osworkflow&gt;
  &lt;persistence class=<span class="code-quote">"com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore"</span>&gt;
    &lt;arg name=<span class="code-quote">"foo"</span> value=<span class="code-quote">"bar"</span>/&gt;
    ...
  &lt;/persistence&gt;
  &lt;factory class=<span class="code-quote">"com.opensymphony.workflow.loader.JDBCWorkflowFactory"</span>&gt;
  &lt;/factory&gt;
&lt;/osworkflow&gt;</pre>
</div></div>
<h3><a name="JDBCWorkflowFactory-JDBCDatabase%3A"><a name="JDBCWorkflowFactory-JDBCDatabase"></a> JDBC Database:</a></h3>

<p>Example create table script for HSQLDB:</p>
<div class="code"><div class="codeContent">
<pre class="code-java">CREATE CACHED TABLE OS_WORKFLOWDEFS (WF_DEFINITION BINARY,WF_NAME VARCHAR(256) NOT NULL PRIMARY KEY)</pre>
</div></div>

                    			    </td>
		    </tr>
	    </table>
    </body>
</html>