06-15-2011 09:21 AM
event (required): the type of task event on which the task listener will be invoked. Possible events are
- create: occurs when the task has been created an all task properties are set.
- assignment: occurs when the task is assigned to somebody. Note: when process execution arrives in a userTask, first an assignment event will be fired, before the create event is fired. This might seem an unnatural order, but the reason is pragmatic: when receiving the create event, we usually want to inspect all properties of the task including the assignee.
- complete: occurs when the task is completed and just before the task is deleted from the runtime data.
<userTask id="verifyReport" name="verify the report">
<extensionElements>
<activiti:taskListener event="create" delegateExpression="${fourEyesTaskListener}">
<activiti:field name="fourEyesTask" stringValue="createReport"/>
</activiti:taskListener>
</extensionElements>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>ROLE_EDIT</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
06-15-2011 09:29 AM
protected void handleAssignments(TaskEntity task, ActivityExecution execution) {
if (taskDefinition.getAssigneeExpression() != null) {
task.setAssignee((String) taskDefinition.getAssigneeExpression().getValue(execution));
}
….
06-15-2011 09:52 AM
06-16-2011 03:25 AM
<process id="FourEyesExample">
<startEvent id="begin"/>
<sequenceFlow id="flow1" sourceRef="begin" targetRef="createReport"/>
<userTask id="createReport" name="create the report">
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>ROLE_CREATE</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="createReport" targetRef="end"/>
<endEvent id="end"/>
</process>
06-16-2011 03:29 AM
06-16-2011 04:20 AM
… when process execution arrives in a userTask, first an assignment event will be fired, before the create event is fired.
06-16-2011 04:23 AM
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.