Search in sources :

Example 6 with UserTaskActivityBehavior

use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.

the class AddListenerUserTaskParseHandler method executeParse.

protected void executeParse(BpmnParse bpmnParse, UserTask userTask) {
    super.executeParse(bpmnParse, userTask);
    ScopeImpl scope = bpmnParse.getCurrentScope();
    ProcessDefinitionImpl processDefinition = scope.getProcessDefinition();
    ActivityImpl activity = processDefinition.findActivity(userTask.getId());
    SimulatorParserUtils.setSimulationBehavior(scope, userTask);
    UserTaskActivityBehavior userTaskActivity = (UserTaskActivityBehavior) activity.getActivityBehavior();
    userTaskActivity.getTaskDefinition().addTaskListener(eventName, taskListener);
}
Also used : ProcessDefinitionImpl(org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl) ActivityImpl(org.activiti.engine.impl.pvm.process.ActivityImpl) UserTaskActivityBehavior(org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior) ScopeImpl(org.activiti.engine.impl.pvm.process.ScopeImpl)

Aggregations

UserTaskActivityBehavior (org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior)6 ActivitiException (org.activiti.engine.ActivitiException)1 MultiInstanceActivityBehavior (org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior)1 PvmException (org.activiti.engine.impl.pvm.PvmException)1 SignallableActivityBehavior (org.activiti.engine.impl.pvm.delegate.SignallableActivityBehavior)1 ActivityImpl (org.activiti.engine.impl.pvm.process.ActivityImpl)1 ProcessDefinitionImpl (org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl)1 ScopeImpl (org.activiti.engine.impl.pvm.process.ScopeImpl)1