use of org.camunda.bpm.model.bpmn.instance.Resource in project camunda-bpmn-model by camunda.
the class ResourceImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Resource.class, BPMN_ELEMENT_RESOURCE).namespaceUri(BPMN20_NS).extendsType(RootElement.class).instanceProvider(new ModelTypeInstanceProvider<Resource>() {
public Resource newInstance(ModelTypeInstanceContext instanceContext) {
return new ResourceImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
resourceParameterCollection = sequenceBuilder.elementCollection(ResourceParameter.class).build();
typeBuilder.build();
}
Aggregations