<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBPM 4.4 and Spring 3
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/dondragon2">Donald Walters</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/560650#560650">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>For days now I am struggling with this issue of integrating Spring 3 and JBPM 4.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Apparently the application fails each time when I try to perform an action on one of the services, such as the repository service or the execution service.</p><p>By doing form search I found out that there is a documented issue JBPM-2710.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have tried the solution as documented below.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><a class="jive-link-external-small" href="http://diversit.eu/2010/01/10/jbpm-4-3-with-spring/comment-page-1/#comment-403">http://diversit.eu/2010/01/10/jbpm-4-3-with-spring</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>still the problem persists. I tried to step through the code and I found that the issue is in the SpringTransactionIntercepter. Apparently no matter what I set in the jbpm.cfg.xml the transactionName is always null.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>JBPM CFG</p><p>===========</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><jbpm-configuration></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.default.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.tx.spring.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.jpdl.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.bpmn.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.identity.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.businesscalendar.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.console.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <import resource="jbpm.jobexecutor.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <process-engine-context></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <!-- Default command service has a Spring transaction interceptor--></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        <command-service name="newTxRequiredCommandService"></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <retry-interceptor /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <environment-interceptor policy="requiresNew" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <spring-transaction-interceptor</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">policy="requiresNew"  transaction-manager="hibernateTransactionManager" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        </command-service></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        <command-service name="txRequiredCommandService"></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <retry-interceptor /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <environment-interceptor /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">            <spring-transaction-interceptor transaction-manager="hibernateTransactionManager" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        </command-service></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    </process-engine-context></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <transaction-context></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        <transaction type="spring" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">        <hibernate-session current="true" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    </transaction-context></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><!--  <process-engine-context></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">    <string name="spring.cfg" value="workflow.cfg.xml" /></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">  </process-engine-context>--></div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"></jbpm-configuration></div><p><jbpm-configuration></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <import resource="jbpm.default.cfg.xml" /></p><p>    <import resource="jbpm.tx.spring.cfg.xml" /></p><p>    <import resource="jbpm.jpdl.cfg.xml" /></p><p>    <import resource="jbpm.bpmn.cfg.xml" /></p><p>    <import resource="jbpm.identity.cfg.xml" /></p><p>    <import resource="jbpm.businesscalendar.cfg.xml" /></p><p>    <import resource="jbpm.console.cfg.xml" /></p><p>    <import resource="jbpm.jobexecutor.cfg.xml" /></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <process-engine-context></p><p>    <!-- Default command service has a Spring transaction interceptor--></p><p>        <command-service name="newTxRequiredCommandService"></p><p>            <retry-interceptor /></p><p>            <environment-interceptor policy="requiresNew" /></p><p>            <spring-transaction-interceptor</p><p><span style="white-space: pre;"> </span>policy="requiresNew"  transaction-manager="hibernateTransactionManager" /></p><p>        </command-service></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <command-service name="txRequiredCommandService"></p><p>            <retry-interceptor /></p><p>            <environment-interceptor /></p><p>            <spring-transaction-interceptor transaction-manager="hibernateTransactionManager" /></p><p>        </command-service></p><p>    </process-engine-context></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <transaction-context></p><p>        <transaction type="spring" /></p><p>        <hibernate-session current="true" /></p><p>    </transaction-context></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p></jbpm-configuration></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Spring Config</p><p>=================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?></p><p><span><beans xmlns="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span>"</span></p><p><span>       xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></p><p><span>       xmlns:context="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/context" target="_blank">http://www.springframework.org/schema/context</a><span>"</span></p><p><span>       xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a></p><p><span>        </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/context" target="_blank">http://www.springframework.org/schema/context</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/context/spring-context-3.0.xsd" target="_blank">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a><span>"></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <context:annotation-config /></p><p>    <context:component-scan base-package="com.cavet.core.jbpm"/></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <bean id="jbpmSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"></p><p>        <property name="dataSource" ref="dataSource"/></p><p>        <property name="mappingResources"></p><p>            <list></p><p>                <value>jbpm.repository.hbm.xml</value></p><p>                <value>jbpm.execution.hbm.xml</value></p><p>                <value>jbpm.history.hbm.xml</value></p><p>                <value>jbpm.task.hbm.xml</value></p><p>                <value>jbpm.identity.hbm.xml</value></p><p>            </list></p><p>        </property></p><p>        <property name="hibernateProperties"></p><p>            <props></p><p>                <prop key="hibernate.dialect">${hibernate.dialect}</prop></p><p>                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop></p><p>                <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop></p><p>            </props></p><p>        </property></p><p>    </bean></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <bean id="hibernateTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"></p><p>        <property name="sessionFactory" ref="jbpmSessionFactory" /></p><p>        <property name="dataSource" ref="dataSource" /></p><p>    </bean></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p></beans></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Class</p><p>=============</p><p>...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  @Autowired</p><p>    @Qualifier("jbpmExecutionService")</p><p>    private ExecutionService executionService;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>executionService.startProcessInstanceByKey(name, variables); <----nothing happens here and in the spring intercepter</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Please help me in trying to resolve this. Thanks</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/560650#560650">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>