package com.dl.workflow.listener; import org.flowable.engine.delegate.TaskListener; import org.flowable.task.service.delegate.DelegateTask; import org.springframework.stereotype.Component; import java.util.Map; @Component public class MyTaskListener implements TaskListener { @Override public void notify(DelegateTask delegateTask) { Map variables = delegateTask.getVariables(); //根据获取到得流程变量 来调用不同得service System.out.println(delegateTask); } }