美文网首页
camunda问题

camunda问题

作者: 追风还是少年 | 来源:发表于2024-07-07 22:07 被阅读0次
image.png

如果没有收到支付回调,通过timer 主动查询支付结果
报错信息如下:


image.png

org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${getTransferPayStatusHandler}. Cause: Cannot resolve identifier 'getTransferPayStatusHandler'

通过配置jobExecutorDeploymentAware属性为true解决了

<process-application
        xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <process-archive>
        <process-engine>default</process-engine>
        <properties>
            <property name="isDeleteUponUndeploy">false</property>
            <property name="isScanForProcessDefinitions">true</property>
            <property name="jobExecutorDeploymentAware">true</property>
        </properties>
    </process-archive>

</process-application>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                         http://www.springframework.org/schema/beans/spring-beans.xsd
                         http://www.springframework.org/schema/context
                         http://www.springframework.org/schema/context/spring-context-2.5.xsd" >

  <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
    <property name="targetDataSource">
      <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
        <property name="driverClass" value="com.mysql.jdbc.Driver" />
        <property name="url" value="${spring.datasource.url_jdbc}" />
        <property name="username"  value="${spring.datasource.username}"/>
        <property name="password" value="${spring.datasource.password}" />
      </bean>
    </property>
  </bean>
  
 <context:component-scan base-package="au.com.foxtel" /> 



  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
  </bean>

  <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
      <property name="processEngineName" value="default" />
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
      <property name="jobExecutorAcquireByPriority" value="true" /> 
      <property name="producePrioritizedJobs" value="true" />
       <property name="jobExecutorDeploymentAware" value="true" />
     <!--  <property name="jobExecutorPreferTimerJobs" value="true"></property> -->
    <property name="deploymentResources" value="classpath*:*.bpmn" />
  </bean>

  <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>

  <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
  <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
  <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
  <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
  <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
   <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />

  <context:annotation-config /> 

 
  
  
 <!-- <context:component-scan base-package="au.com.foxtel"></context:component-scan>   -->
  
<!-- <bean id="propertyLocations"
        class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <value>classpath:/config.properties</value>
            </list>
        </property>
    </bean> 

     <bean id="projectProperties"
        class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations" ref="propertyLocations" />
        <property name="ignoreResourceNotFound" value="true" />
    </bean>
    <bean id="placeholderConfig"
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="properties" ref="projectProperties" />
        <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
        <property name="searchSystemEnvironment" value="true" />
        <property name="ignoreUnresolvablePlaceholders" value="true" />
    </bean> --> 

</beans>

参考官方文档:
https://docs.camunda.org/manual/7.21/user-guide/process-engine/the-job-executor/

相关文章

网友评论

      本文标题:camunda问题

      本文链接:https://www.haomeiwen.com/subject/cbdocjtx.html