05-04-2011 08:03 AM
05-04-2011 09:02 AM
<userTask id="payment_execute" name="Execute Payment" >
<extensionElements>
<!– upon task creation the listener is called –>
<activiti:taskListener event="create" class="my.FourEyesTaskListener">
<!– here we set the id of the other task –>
<activiti:field name="fourEyesTask" stringValue="payment_approve" />
</activiti:taskListener>
</extensionElements>
</userTask>
public class FourEyesTaskListener implements TaskListener {
// injected by activiti
private String fourEyesTask;
// see http://www.activiti.org/javadocs/org/activiti/engine/delegate/DelegateTask.html
public void notify(DelegateTask delegateTask) {
// find out the user id that executed the four eyes task
String userId = ….
//
delegateTask.deleteCandidateUser(userId);
}
}
05-04-2011 02:29 PM
05-05-2011 03:09 AM
05-09-2011 05:22 AM
05-09-2011 09:46 AM
05-10-2011 03:23 AM
org.activiti.engine.impl.context.Context.getCommandContext()
.getHistoricTaskInstanceManager()
….
06-15-2011 05:07 AM
The engine API shouldn't be used from within service-tasks, execution- and tasklisteners now. If you do, it can mess up transactions/connections,
06-15-2011 05:18 AM
06-15-2011 06:03 AM
<bean id="myProcessEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
…..
<property name="beans">
<map>
<entry key="fourEyesTaskListener" value-ref="fourEyesTaskListener"/>
</map>
</property>
</bean>
<bean id="fourEyesTaskListener" class="my.FourEyesTaskListener"/>
HistoricTaskInstance instance = processEngine.getHistoryService().createHistoricTaskInstanceQuery()
.processInstanceId(delegateTask.getExecution().getProcessInstanceId())
.taskName(fourEyesTask.getExpressionText()).singleResult();
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.