Search in sources :

Example 1 with ManualTask

use of org.camunda.bpm.model.bpmn.instance.ManualTask in project camunda-bpmn-model by camunda.

the class ManualTaskImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ManualTask.class, BPMN_ELEMENT_MANUAL_TASK).namespaceUri(BPMN20_NS).extendsType(Task.class).instanceProvider(new ModelTypeInstanceProvider<ManualTask>() {

        public ManualTask newInstance(ModelTypeInstanceContext instanceContext) {
            return new ManualTaskImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : ManualTask(org.camunda.bpm.model.bpmn.instance.ManualTask) Task(org.camunda.bpm.model.bpmn.instance.Task) ManualTask(org.camunda.bpm.model.bpmn.instance.ManualTask) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 2 with ManualTask

use of org.camunda.bpm.model.bpmn.instance.ManualTask in project camunda-bpm-platform by camunda.

the class ListenerProcessEngineServicesAccessTest method createModelAccessTask.

protected Task createModelAccessTask(BpmnModelInstance modelInstance, Class<?> delegateClass) {
    ManualTask task = modelInstance.newInstance(ManualTask.class);
    task.setId("manualTask");
    CamundaExecutionListener executionListener = modelInstance.newInstance(CamundaExecutionListener.class);
    executionListener.setCamundaEvent(ExecutionListener.EVENTNAME_START);
    executionListener.setCamundaClass(delegateClass.getName());
    task.builder().addExtensionElement(executionListener);
    return task;
}
Also used : ManualTask(org.camunda.bpm.model.bpmn.instance.ManualTask) CamundaExecutionListener(org.camunda.bpm.model.bpmn.instance.camunda.CamundaExecutionListener)

Aggregations

ManualTask (org.camunda.bpm.model.bpmn.instance.ManualTask)2 Task (org.camunda.bpm.model.bpmn.instance.Task)1 CamundaExecutionListener (org.camunda.bpm.model.bpmn.instance.camunda.CamundaExecutionListener)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1