直接跳到内容
本页目录

作者:wacxhs
更新于:6/27/2023

流程生命周期

流程生命周期描述了从流程创建到结束一系列的过程。

生命周期图示

图示

基于生命周期实现的插件,若您在应用中配置日志级别为INFO,可在启动日志中看到下面一段日志,该日志描述了插件执行顺序

2023-06-13 15:53:26.705  INFO 38877 --- [           main] c.d.bpm.engine.plugin.BpmPluginExecutor  : ab bpm plugin execute order: BpmVariablePlugin -> BpmNodeSkipPlugin -> BpmNodeUserPlugin -> BpmTaskAgencyPlugin -> EnsureCandidatePlugin -> SignPlugin -> BpmGlobalEventPlugin -> NodeMessagePlugin -> BpmCarbonCopyPlugin -> BpmReminderPlugin -> NodeExplainPlugin -> BpmInstanceEndEventPlugin -> BpmNodeEventPlugin

流程实例运行过程中,也有插件的执行日志,该日志级别为DEBUG,若您设置的INFO,需要单独设置插件的输出级别

application.yml

logging:
  level:
    com:
      bpm:
        engine:
          plugin: DEBUG

示例日志

2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓【流程启动】插件执行开始↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmVariablePlugin】Begin
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmVariablePlugin】End 耗时:0ms 
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【EnsureCandidatePlugin】Begin
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【EnsureCandidatePlugin】End 耗时:0ms 
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmGlobalEventPlugin】Begin
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmGlobalEventPlugin】End 耗时:0ms 
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【NodeMessagePlugin】Begin
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【NodeMessagePlugin】End 耗时:1ms 
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmCarbonCopyPlugin】Begin
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ==>【1668529579840913408】执行插件【BpmCarbonCopyPlugin】End 耗时:0ms 
2023-06-13 15:53:26.705 DEBUG 38877 --- [nio-8080-exec-4] c.d.bpm.engine.plugin.BpmPluginExecutor  : ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑【流程启动】插件执行完毕↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

有关如何扩展流程插件请参考流程插件扩展

流程生命周期 has loaded