As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<br>@Named<br>@Stateless<br>public class EscalationListener {<br><br> @Inject<br> HistoryService historyService;<br><br> public void escalate(DelegateExecution execution, String otherTaskId)<br> throws Exception {<br><br> HistoricTaskInstance task = historyService<br> .createHistoricTaskInstanceQuery()<br> .processInstanceId(execution.getProcessInstanceId()).<br> .taskDefinitionKey(otherTaskId).singleResult();<br><br> // do some stuff with the task<br> }<br>}<br>
<br><sequenceFlow id="flow13" name="" sourceRef="boundarytimer1" targetRef="servicetask2"><br> <extensionElements><br> <activiti:executionListener event="take" expression="#{escalationListener.escalate(execution, 'usertask2')}"></activiti:executionListener><br> </extensionElements><br></sequenceFlow><br>