Search in sources :

Example 1 with CancelEventDefinition

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

the class CancelEventDefinitionImpl method registerType.

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

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

Example 2 with CancelEventDefinition

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

the class TransactionModels method makeCancelEvent.

protected static void makeCancelEvent(BpmnModelInstance model, String eventId) {
    ModelElementInstance element = model.getModelElementById(eventId);
    CancelEventDefinition eventDefinition = model.newInstance(CancelEventDefinition.class);
    element.addChildElement(eventDefinition);
}
Also used : ModelElementInstance(org.camunda.bpm.model.xml.instance.ModelElementInstance) CancelEventDefinition(org.camunda.bpm.model.bpmn.instance.CancelEventDefinition)

Aggregations

CancelEventDefinition (org.camunda.bpm.model.bpmn.instance.CancelEventDefinition)2 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementInstance (org.camunda.bpm.model.xml.instance.ModelElementInstance)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1