随笔 - 6  文章 - 129  trackbacks - 0
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 821534
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

1.將classes12.jar文件複製到%TOMCAT_HOME%\lib文件夾內

2.修改%TOMCAT_HOME%\conf的context.xml文件,添加數據源jdbc/oswf.
    <?xml version='1.0' encoding='utf-8'?>
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <Resource name="jdbc/oswf" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@10.240.144.25:1521:XYMES" username="alert"             password="***" maxActive="10" maxIdle="3" maxWait="10000" removeAbandonedTimeout="3" removeAbandoned="true"/>
    </Context>

3.修改osuser.xml文件
<opensymphony-user>
<provider class="com.opensymphony.user.provider.jdbc.JDBCAccessProvider">
<property name="user.table">OS_USER</property>
<property name="group.table">OS_GROUP</property>
<property name="membership.table">OS_MEMBERSHIP</property>
<property name="user.name">USERNAME</property>
<property name="user.password">PASSWORDHASH</property>
<property name="group.name">GROUPNAME</property>
<property name="membership.userName">USERNAME</property>
<property name="membership.groupName">GROUPNAME</property>
<property name="datasource">java:comp/env/jdbc/oswf</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCCredentialsProvider">
<property name="user.table">OS_USER</property>
<property name="group.table">OS_GROUP</property>
<property name="membership.table">OS_MEMBERSHIP</property>
<property name="user.name">USERNAME</property>
<property name="user.password">PASSWORDHASH</property>
<property name="group.name">GROUPNAME</property>
<property name="membership.userName">USERNAME</property>
<property name="membership.groupName">GROUPNAME</property>
<property name="datasource">java:comp/env/jdbc/oswf</property>
</provider>
<provider class="com.opensymphony.user.provider.jdbc.JDBCProfileProvider">
<property name="user.table">OS_USER</property>
<property name="group.table">OS_GROUP</property>
<property name="membership.table">OS_MEMBERSHIP</property>
<property name="user.name">USERNAME</property>
<property name="user.password">PASSWORDHASH</property>
<property name="group.name">GROUPNAME</property>
<property name="membership.userName">USERNAME</property>
<property name="membership.groupName">GROUPNAME</property>
<property name="datasource">java:comp/env/jdbc/oswf</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.
-->
<authenticator class="com.opensymphony.user.authenticator.SmartAuthenticator" />
</opensymphony-user>

4.修改osworkflow.xml文件
<osworkflow>
<persistence class="com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore">
<property key="datasource" value="jdbc/oswf"/>
<property key="entry.sequence" 
value="SELECT seq_os_wfentry.nextval FROM dual"/>
<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 seq_os_currentsteps.nextval FROM dual"/>
<!--
<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>
<factory class="com.opensymphony.workflow.loader.XMLWorkflowFactory">
<property key="resource" value="workflows.xml" />
</factory>
</osworkflow>

5.新增文件propertyset.xml文件 
<propertysets>
<propertyset name="jdbc" 
class="com.opensymphony.module.propertyset.database.JDBCPropertySet">
<arg name="datasource" value="jdbc/oswf"/>
<arg name="table.name" value="OS_PROPERTYENTRY"/>
<arg name="col.globalKey" value="GLOBAL_KEY"/>
<arg name="col.itemKey" value="ITEM_KEY"/>
<arg name="col.itemType" value="ITEM_TYPE"/>
<arg name="col.string" value="STRING_VALUE"/>
<arg name="col.date" value="DATE_VALUE"/>
<arg name="col.data" value="DATA_VALUE"/>
<arg name="col.float" value="FLOAT_VALUE"/>
<arg name="col.number" value="NUMBER_VALUE"/>
</propertyset>
</propertysets>

6.運行Tomcat.
7.訪問項目首頁.創建測試帳號信息reference data.登錄使用.


posted on 2011-12-16 16:32 Ke 阅读(533) 评论(0)  编辑  收藏 所属分类: osworkflow

只有注册用户登录后才能发表评论。


网站导航: