use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.
the class CdiEventSupportBpmnParseHandler method addCreateListener.
private void addCreateListener(ActivityImpl activity) {
UserTaskActivityBehavior behavior = getUserTaskActivityBehavior(activity.getActivityBehavior());
behavior.getTaskDefinition().addTaskListener(TaskListener.EVENTNAME_CREATE, new CdiTaskListener(activity.getId(), BusinessProcessEventType.CREATE_TASK));
}
use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.
the class CdiEventSupportBpmnParseHandler method addCompleteListener.
private void addCompleteListener(ActivityImpl activity) {
UserTaskActivityBehavior behavior = getUserTaskActivityBehavior(activity.getActivityBehavior());
behavior.getTaskDefinition().addTaskListener(TaskListener.EVENTNAME_COMPLETE, new CdiTaskListener(activity.getId(), BusinessProcessEventType.COMPLETE_TASK));
}
use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.
the class CdiEventSupportBpmnParseHandler method addDeleteListener.
protected void addDeleteListener(ActivityImpl activity) {
UserTaskActivityBehavior behavior = getUserTaskActivityBehavior(activity.getActivityBehavior());
behavior.getTaskDefinition().addTaskListener(TaskListener.EVENTNAME_DELETE, new CdiTaskListener(activity.getId(), BusinessProcessEventType.DELETE_TASK));
}
use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.
the class CdiEventSupportBpmnParseHandler method addAssignListener.
private void addAssignListener(ActivityImpl activity) {
UserTaskActivityBehavior behavior = getUserTaskActivityBehavior(activity.getActivityBehavior());
behavior.getTaskDefinition().addTaskListener(TaskListener.EVENTNAME_ASSIGNMENT, new CdiTaskListener(activity.getId(), BusinessProcessEventType.ASSIGN_TASK));
}
use of org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior in project Activiti by Activiti.
the class ExecutionEntity method signal.
// methods that translate to operations /////////////////////////////////////
public void signal(String signalName, Object signalData) {
ensureActivityInitialized();
SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity.getActivityBehavior();
try {
String signalledActivityId = activity.getId();
activityBehavior.signal(this, signalName, signalData);
// If needed, dispatch an event indicating an activity was signalled
boolean isUserTask = (activityBehavior instanceof UserTaskActivityBehavior) || ((activityBehavior instanceof MultiInstanceActivityBehavior) && ((MultiInstanceActivityBehavior) activityBehavior).getInnerActivityBehavior() instanceof UserTaskActivityBehavior);
if (!isUserTask && Context.getProcessEngineConfiguration() != null && Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(ActivitiEventBuilder.createSignalEvent(ActivitiEventType.ACTIVITY_SIGNALED, signalledActivityId, signalName, signalData, this.id, this.processInstanceId, this.processDefinitionId));
}
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new PvmException("couldn't process signal '" + signalName + "' on activity '" + activity.getId() + "': " + e.getMessage(), e);
}
}
Aggregations