com.opensymphony.workflow.loader.JDBCWorkflowFactory is an alternative factory, that allows you to store your workflow definitions in a JDBC database instead of putting them into the xml files.

These features are planned for JDBCWorkflowFactory, but not yet implemented:

  1. versioning support
  2. find alternative to storing xml directly
  3. delete function

It requires some configuration to get it running:

osworkflow.xml:

<osworkflow>
  <persistence class="com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore">
    <arg name="foo" value="bar"/>
    ...
  </persistence>
  <factory class="com.opensymphony.workflow.loader.JDBCWorkflowFactory">
  </factory>
</osworkflow>

JDBC Database:

Example create table script for HSQLDB:

CREATE CACHED TABLE OS_WORKFLOWDEFS (WF_DEFINITION BINARY,WF_NAME VARCHAR(256) NOT NULL PRIMARY KEY)