[opencms-dev] OpenCms-6.2.1-jBPM-3.2.1 is available for download now

Shi Yusen shiys at langhua.cn
Sat Oct 28 21:48:37 CEST 2006


Hi there,

I just finished a new OpenCms-jBPM module. Currently, you can download
it from
http://jbpm-opencms.cvs.sourceforge.net/jbpm-opencms/OpenCms-6.2.1-jBPM-3.1.2/module/. I'll put it to the download area after it's asured stable.

What's the positioning of this module?
As the jBPM founder Tom Baeyens thinks jBPM is a EAI tool and gives an
example of websale, so I think it would better to position this module
on processing various web forms. By the access definition of variables
in jBPM and powerful xml functions, you can build a web business process
easily. This is main difference between this module and the OSWorkflow
one which focuses on document approving process.

Here is the readme on setup(may miss something such as import the module
into OpenCms).

The OpenCms-jBPM module is under LGPL licence. You can download the
module and source code from
http://sourceforge.net/projects/jbpm-opencms/


Tested on Fedora 4 + MySQL 4.1.11 + Tomcat 5.5.17 + OpenCms 6.2.1


1. Import the jBPM-OpenCms module in your Administration view. Make sure
the following jars are deployed with the module:
	jbpm-3.1.2.jar
	jbpm-identity-3.1.2.jar
	jbpm-webapp-3.1.2.jar
	hibernate3.jar
	bsh-1.3.0.jar
	cglib-2.1_2jboss.jar
	antlr-2.7.5H3.jar
	jta.jar
	asm.jar
	ehcache-1.1.jar
	jdbc2_0-stdext.jar
	asm-attrs.jar


2. Config datasource:
In OpenCms workplace,
edit /system/modules/cn.langhua.opencms.jbpm/classes/hibernate.cfg.xml,
modify the datasource if necessary.
Edit ${CATALINA_HOME}/conf/context.xml, add the datasource you assigned.
For example,
	<Resource name="JbpmDS" auth="Container" type="javax.sql.DataSource"
               maxActive="10" maxIdle="3" maxWait="2000"
               username="username" password="password"
driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://localhost:3306/jbpm?autoReconnect=true"/>


3. Add jBPM servlets to web.xml
(see /system/modules/cn.langhua.opencms.jbpm/docs/web.xml).
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <display-name>OpenCms</display-name>
    <description>
        OpenCms, the Open Source Content Management System. 
        (c) 2005 Alkacon Software GmbH with contributions from the
OpenCms community.
        For more details about OpenCms, please see
http://www.opencms.org/.
        For more details about Alkacon Software GmbH, please see
http://www.alkacon.com/.    
    </description>

    <!--
        Changing the servlet name from "opencms" to something else
requires 3 changes in this file.        
        For example, to change the servlet name to "mycms" you must:
        1. Change the <context-param> called "OpenCmsServlet" from
"/opencms/*" to "/mycms/*"
        2. Change the <servlet-mapping> for "OpenCmsServlet" from
"/opencms/*" to "/mycms/*"
        3. Change the <error-page> setting for the 404 error from
"/opencms/handle404" to "/mycms/handle404"
    -->

    <context-param>
        <param-name>OpenCmsServlet</param-name>
        <param-value>/cms/*</param-value>
    </context-param>

    <context-param>
        <param-name>DefaultWebApplication</param-name>
        <param-value>ROOT</param-value>
    </context-param>    

  <filter>
    <filter-name>LogFilter</filter-name>
    <filter-class>org.jbpm.webapp.filter.LogFilter</filter-class>
  </filter>

  <filter>
    <filter-name>JbpmContextFilter</filter-name>
    <filter-class>org.jbpm.web.JbpmContextFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>LogFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter-mapping>
    <filter-name>JbpmContextFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

	<!-- 
	    Uncomment this parameter in case you change the web application
context using an application server 
	    specific deployment descriptor. E.g. in Jboss, you could use the
jboss-web.xml file to deploy opencms under the
	    context 'myopencms' but still keep the files in the folder
'opencms.war'
    <context-param>
        <param-name>WebApplicationContext</param-name>
        <param-value>myopencms</param-value>
    </context-param>
    -->

    <listener>

<listener-class>org.opencms.main.OpenCmsListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>OpenCmsServlet</servlet-name>
        <description>
            The main servlet that handles all requests to the OpenCms
VFS.  
        </description>
        <servlet-class>org.opencms.main.OpenCmsServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>OpenCmsServletErrorHandler</servlet-name>
        <description>
            The error handling servlet, also servers as trigger for
static export requests.  
        </description>

<servlet-class>org.opencms.main.OpenCmsServletErrorHandler</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>    

    <servlet-mapping>
        <servlet-name>OpenCmsServlet</servlet-name>
        <url-pattern>/cms/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>OpenCmsServletErrorHandler</servlet-name>
        <url-pattern>/opencms-errorhandler/*</url-pattern>
    </servlet-mapping>

  <!-- JbpmThreadsServlet -->
  <servlet>
    <servlet-name>JbpmThreadsServlet</servlet-name>
    <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>JbpmThreadsServlet</servlet-name>
    <url-pattern>/threads</url-pattern>
  </servlet-mapping> 

  <!-- jBPM FileServlet -->
  <servlet>
    <servlet-name>ProcessImageServlet</servlet-name>

<servlet-class>org.jbpm.webapp.servlet.ProcessImageServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ProcessImageServlet</servlet-name>
    <url-pattern>/processimage</url-pattern>
  </servlet-mapping>

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index_export.html</welcome-file>
    </welcome-file-list>

    <error-page>
        <error-code>404</error-code>
        <location>/opencms-errorhandler/handle404</location>
    </error-page>

    <error-page>
        <error-code>500</error-code>

<location>/opencms-errorhandler/system/handler/handle500.html</location>
    </error-page>

    <taglib>
        <taglib-uri>http://www.opencms.org/taglib/cms</taglib-uri>
        <taglib-location>/WEB-INF/opencms.tld</taglib-location>
    </taglib>
</web-app>


4. Add jbpm_cms.tld in WEB-INF folder.
<?xml version="1.0"?>
<!DOCTYPE taglib PUBLIC 
    "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" 
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
  <tlibversion>1.0</tlibversion>
  <jspversion>1.1</jspversion>
  <shortname>jBPM_OpenCMS tags</shortname>
  <info>jBPM_OpenCMS tags</info>
  <!-- PROCESS IMAGE -->
  <tag>
    <name>processimage</name>
    <tagclass>cn.langhua.opencms.tools.jbpm.CmsProcessImage</tagclass>
    <bodycontent>empty</bodycontent>
    <attribute> 
    	<name>task</name>       
    	<required>true</required> 
    	<rtexprvalue>true</rtexprvalue> 
    </attribute>
  </tag>
  <tag>
    <name>processimageToken</name>
    <tagclass>cn.langhua.opencms.tools.jbpm.CmsProcessImage</tagclass>
    <bodycontent>empty</bodycontent>
    <attribute> 
    	<name>token</name>       
    	<required>true</required> 
    	<rtexprvalue>true</rtexprvalue> 
    </attribute>
  </tag>
</taglib>


5. Restart Tomcat.

6. Create jBPM database tables. You can set the database parameter of
this module and put the scripts accordingly.

7. You can upload the websale.process in this folder and run it as a
sample.

If you find anything wrong in this module, please post it to this list
or to shiys at langhua.cn. TIA.

Regards,

Shi Yusen/Beijing Langhua Ltd.




More information about the opencms-dev mailing list