万风之丘 2016-12-29 10:23 采纳率: 0%
浏览 3316
已结题

activiti和spring2.5整合,引擎创建出现异常

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource"/><!-- 数据库 -->
        <property name="transactionManager" ref="transactionManager"/><!--事务管理  -->
        <property name="databaseSchemaUpdate" value="true"/><!-- 数据库表自动匹配创建、更新 -->
        <!-- <property name="transactionsExternallyManaged" value="true" />  -->
        <property name="expressionManager">
            <bean class="com.yonder.util.SpringExpressionManagerFactoryBean">
                    <property name="processEngineConfiguration" ref="processEngineConfiguration"></property>  
            </bean>
        </property>
</bean>

<!-- 创建流程引擎对象 -->
<bean id="processEngine" factory-bean="processEngineConfiguration" factory-method="buildProcessEngine">
    <property name="processEngineConfiguration" ref="processEngineConfiguration"/>
</bean>

<!-- 创建各个service -->
<!-- 流程定义部署相关的service  代码创建:processEngine.getRepositoryService()-->
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService"/>
<!-- 与正在执行的流程实例和流程对象相关的service -->
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />  
<!-- 与正在执行的对象相关的service -->
<bean id="wfTaskService" factory-bean="processEngine" factory-method="getTaskService" /> 
<!-- 与历史信息 -->
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />  

出现的异常:如下
Error creating bean with name 'processEngine' defined in class path resource [activiti-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'processEngineConfiguration' of bean class [org.activiti.engine.impl.ProcessEngineImpl]: Bean property 'processEngineConfiguration' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
求大神解决。。

  • 写回答

4条回答 默认 最新

  • 68号小喇叭 2016-12-29 13:36
    关注

    用 <!-- Spring表达式支持 -->





    可以吗?

    评论

报告相同问题?