我想從activiti序列流中調用一個方法,但是我得到下面的錯誤,有人可以幫我解決這個問題嗎?錯誤 - 試圖使用executionListener時無法解析標識符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無法解析標識 'EscalationListener' 。 AstIdentifier.eval(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
}
}