bc:mysql://localhost:3306/osworkflow?autoReconnect=true</value>
</parameter>
</ResourceParams>
</Context>
osworkflow的mysql数据库配置(2)
时间:2011-01-16
2:配置osworkflow.xml(在WEB-INF\classes目录下),内容如下:
<osworkflow>
<persistence class="com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore">
<!-- For jdbc persistence, all are required. -->
<property key="datasource" value="jdbc/DefaultDS"/>
<property key="entry.sequence"
value="select count(*) + 1 from os_wfentry"/>
<property key="entry.table" value="OS_WFENTRY"/>
<property key="entry.id" value="ID"/>
<property key="entry.name" value="NAME"/>
<property key="entry.state" value="STATE"/>
<!--
<property key="step.sequence" value="select sum(c1) from
(select 1 tb, count(*) c1 from os_currentstep
union select 2 tb, count(*) c1 from os_historystep)"/>
-->
<property key="step.sequence" value="select sum(c1) + 1 from (select 1 as
tb, count(*) as c1 from os_currentstep union select 2 as tb, count(*) as c1
from os_historystep) as TabelaFinal" />
<property key="step.sequence.increment" value="INSERT INTO OS_STEPIDS (ID) values (null)"/>
<property key="step.sequence.retrieve" value="SELECT max(ID) FROM OS_STEPIDS"/>
<property key="history.table" value="OS_HISTORYSTEP"/>
<property key="current.table" value="OS_CURRENTSTEP"/>
<property key="historyPrev.table" value="OS_HISTORYSTEP_PREV"/>
<property key="currentPrev.table" value="OS_CURRENTSTEP_PREV"/>
<property key="step.id" value="ID"/>
<property key="step.entryId" value="ENTRY_ID"/>
<property key="step.stepId" value="STEP_ID"/>
<property key="step.actionId" value="ACTION_ID"/>
<property key="step.owner" value="OWNER"/>
<property key="step.caller" value="CALLER"/>
<property key="step.startDate" value="START_DATE"/>
<property key="step.finishDate" value="FINISH_DATE"/>
<property key="step.dueDate" value="DUE_DATE"/>
<property key="step.status" value="STATUS"/>
<property key="step.previousId" value="PREVIOUS_ID"/>
</persistence>
</osworkflow>
3:增加propertyset.xml(在WEB-INF\classes目录下),内容如下:
<propertysets>
<propertyset name="jdbc" class="com.opensymphony.module.propertyset.database.JDBCPropertySet">
<arg name="datasource" value="jdbc/DefaultDS"/>
<arg name=&qu
|