flowable中的processEngineConfiguration配置

本文详细介绍了Flowable流程引擎的配置方法,包括数据源设置、邮件服务器配置、事件监听器及特定类型事件监听器的定义等。通过具体示例展示了如何在Spring环境中配置StandaloneProcessEngineConfiguration。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<bean id="processEngineConfiguration" class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="databaseSchemaUpdate" value="true" />
<property name="asyncExecutorActivate" value="false" />
<property name="mailServerHost" value="mail.my-corp.com" />
    <property name="mailServerPort" value="5025" />

<!--增加事件监听器配置,对于任何事件发送通知时,所使用的bean实现org.flowable.engine.delegate.event.FlowableEventListener-->
<property name="eventListeners">      
<list>         
<bean class="org.flowable.engine.example.MyEventListener" />      
</list>    
</property>

<!-- 发送某些类型的事件时通知,entry key的值为org.flowable.engine.delegate.event.FlowableEventListener实例的列表 -->
<!-- <property name="typedEventListeners">
      <map>
        <entry key="JOB_EXECUTION_SUCCESS,JOB_EXECUTION_FAILURE" >
          <list>
            <bean class="org.flowable.engine.example.MyJobEventListener" />
          </list>
        </entry>
      </map>
    </property> -->


<!-- Adding listeners to process definitions -->
<process id="testEventListeners">
<extensionElements>
<flowable:eventListener class="org.flowable.engine.test.MyEventListener" />
<flowable:eventListener delegateExpression="${testEventListener}" throwEvent="error" events="JOB_EXECUTION_SUCCESS,JOB_EXECUTION_FAILURE" />
</extensionElements>
</process>

  </bean>
Flowable的可选配置有以下几项: 1. 在flowable.cfg.xml文件中必须包含一个id为’processEngineConfiguration’的bean,其class可以有四个选择,分别对应四个环境。 2. 配置邮件服务器是可选的。Flowable支持在业务流程中发送电子邮件。要真正发送电子邮件,需要有效的SMTP邮件服务器配置。 3. 历史配置也是可选的。可以选择是否记录全部的历史数据,包括流程实例、任务、变量等。 4. Flowable允许选择您的选择的日志实施,所有日志记录(包括Flowable、Spring、MyBatis等)通过SLF4J路由。 这些可选配置可以根据具体的需求来进行配置和调整,以满足不同业务流程的要求。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [flowable学习(Ⅱ) ----Flowable的流程引擎配置](https://blog.youkuaiyun.com/weixin_44122500/article/details/91816621)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Flowable入门系列文章9 - 基本配置三](https://blog.youkuaiyun.com/qq_30739519/article/details/120506786)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值