Camunda BPMN - Task listener vs Execution listeners

前端 未结 1 895
说谎
说谎 2021-02-20 16:47

I\'ve been using Camunda BPMN 2.0 for one of my workflow applications. In one of my service tasks, I created an execution listener at the start event and a task listener at the

1条回答
  •  旧时难觅i
    2021-02-20 17:19

    Task listeners can only be used with user tasks, since they provide callbacks when task (i.e. the task a human has to perform) state changes, cf http://docs.camunda.org/latest/guides/user-guide/#process-engine-delegation-code-task-listener

    Assuming you have a user task like

    
      
        
        
      
    
    

    When the user task is executed

    1. The execution listener is called
    2. The task listener is called

    In general, the task listener event cycle is contained between execution listener events start and end. So the cycle when a user task is executed is:

    1. ExecutionListener#start
    2. TaskListener#create
    3. TaskListener#{assignment}*
    4. TaskListener#{complete, delete}
    5. ExecutionListener#end

    0 讨论(0)
提交回复
热议问题