use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaTaskListener in project camunda-bpmn-model by camunda.
the class AbstractUserTaskBuilder method camundaTaskListenerClass.
/**
* Add a class based task listener with specified event name
*
* @param eventName - event names to listen to
* @param fullQualifiedClassName - a string representing a class
* @return the builder object
*/
public B camundaTaskListenerClass(String eventName, String fullQualifiedClassName) {
CamundaTaskListener executionListener = createInstance(CamundaTaskListener.class);
executionListener.setCamundaEvent(eventName);
executionListener.setCamundaClass(fullQualifiedClassName);
addExtensionElement(executionListener);
return myself;
}
use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaTaskListener in project camunda-bpm-platform by camunda.
the class TaskListenerProcessEngineServicesAccessTest method createModelAccessTask.
protected Task createModelAccessTask(BpmnModelInstance modelInstance, Class<?> delegateClass) {
UserTask task = modelInstance.newInstance(UserTask.class);
task.setId("userTask");
CamundaTaskListener executionListener = modelInstance.newInstance(CamundaTaskListener.class);
executionListener.setCamundaEvent(TaskListener.EVENTNAME_CREATE);
executionListener.setCamundaClass(delegateClass.getName());
task.builder().addExtensionElement(executionListener);
return task;
}
Aggregations