Search in sources :

Example 1 with Task

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

the class TaskImpl method registerType.

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

        public Task newInstance(ModelTypeInstanceContext instanceContext) {
            return new TaskImpl(instanceContext);
        }
    });
    /**
     * camunda extensions
     */
    camundaAsyncAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC).namespace(CAMUNDA_NS).defaultValue(false).build();
    typeBuilder.build();
}
Also used : Task(org.camunda.bpm.model.bpmn.instance.Task) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) Activity(org.camunda.bpm.model.bpmn.instance.Activity) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

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