我正在尝试从 activiti 序列流中调用一个方法,但出现以下错误,有人可以帮我解决这个问题吗?
<sequenceFlow id="finalTask" name="finalTask" sourceRef="chargeAccount" targetRef="theEnd">
<extensionElements>
<activiti:executionListener
expression="${EscalationListener.escalate(execution, 'kermit')}"
event="end" />
</extensionElements>
</sequenceFlow>
错误:
原因:org.activiti.engine.impl.javax.el.PropertyNotFoundException:无法在 org.activiti.engine.impl.juel.AstIdentifier.eval 解析标识符“EscalationListener”(AstIdentifier.java:8
Java代码:
import org.activiti.engine.HistoryService;
import org.activiti.engine.delegate.DelegateExecution;
public class EscalationListener {
HistoryService historyService;
public void escalate(DelegateExecution execution, String otherTaskId)
throws Exception {
historyService.createHistoricTaskInstanceQuery().taskOwner(otherTaskId)
.finished();
//System.out.println("called history service" + otherTaskId);
// do some stuff with the task
}
}