Search in sources :

Example 1 with UserTaskActivityBehavior

use of org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project camunda-bpm-platform by camunda.

the class CdiEventSupportBpmnParseListener method parseUserTask.

@Override
public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
    addStartEventListener(activity);
    addEndEventListener(activity);
    UserTaskActivityBehavior activityBehavior = (UserTaskActivityBehavior) activity.getActivityBehavior();
    TaskDefinition taskDefinition = activityBehavior.getTaskDefinition();
    addTaskCreateListeners(taskDefinition);
    addTaskAssignmentListeners(taskDefinition);
    addTaskCompleteListeners(taskDefinition);
    addTaskDeleteListeners(taskDefinition);
}
Also used : TaskDefinition(org.camunda.bpm.engine.impl.task.TaskDefinition) UserTaskActivityBehavior(org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior)

Example 2 with UserTaskActivityBehavior

use of org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project camunda-bpm-platform by camunda.

the class ProcessApplicationEventParseListener method parseUserTask.

@Override
public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
    addStartEventListener(activity);
    addEndEventListener(activity);
    UserTaskActivityBehavior activityBehavior = (UserTaskActivityBehavior) activity.getActivityBehavior();
    TaskDefinition taskDefinition = activityBehavior.getTaskDefinition();
    addTaskCreateListeners(taskDefinition);
    addTaskAssignmentListeners(taskDefinition);
    addTaskCompleteListeners(taskDefinition);
    addTaskDeleteListeners(taskDefinition);
}
Also used : TaskDefinition(org.camunda.bpm.engine.impl.task.TaskDefinition) UserTaskActivityBehavior(org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior)

Example 3 with UserTaskActivityBehavior

use of org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project camunda-bpm-platform by camunda.

the class HistoryParseListener method parseUserTask.

public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
    addActivityHandlers(activity);
    if (historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_CREATE, null)) {
        TaskDefinition taskDefinition = ((UserTaskActivityBehavior) activity.getActivityBehavior()).getTaskDefinition();
        taskDefinition.addBuiltInTaskListener(TaskListener.EVENTNAME_ASSIGNMENT, USER_TASK_ASSIGNMENT_HANDLER);
        taskDefinition.addBuiltInTaskListener(TaskListener.EVENTNAME_CREATE, USER_TASK_ID_HANDLER);
    }
}
Also used : TaskDefinition(org.camunda.bpm.engine.impl.task.TaskDefinition) UserTaskActivityBehavior(org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior)

Aggregations

UserTaskActivityBehavior (org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior)3 TaskDefinition (org.camunda.bpm.engine.impl.task.TaskDefinition)3