use of org.camunda.bpm.model.bpmn.instance.Operation in project camunda-bpmn-model by camunda.
the class OperationImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Operation.class, BPMN_ELEMENT_OPERATION).namespaceUri(BPMN20_NS).extendsType(BaseElement.class).instanceProvider(new ModelTypeInstanceProvider<Operation>() {
public Operation newInstance(ModelTypeInstanceContext instanceContext) {
return new OperationImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build();
implementationRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_IMPLEMENTATION_REF).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
inMessageRefChild = sequenceBuilder.element(InMessageRef.class).required().qNameElementReference(Message.class).build();
outMessageRefChild = sequenceBuilder.element(OutMessageRef.class).qNameElementReference(Message.class).build();
errorRefCollection = sequenceBuilder.elementCollection(ErrorRef.class).qNameElementReferenceCollection(Error.class).build();
typeBuilder.build();
}
Aggregations