protected static Attribute<Boolean> camundaAsyncAttribute;
protected static Attribute<Boolean> camundaExclusiveAttribute;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SubProcess.class, BPMN_ELEMENT_SUB_PROCESS)
.namespaceUri(BPMN20_NS)
.extendsType(Activity.class)
.instanceProvider(new ModelTypeInstanceProvider<SubProcess>() {
public SubProcess newInstance(ModelTypeInstanceContext instanceContext) {
return new SubProcessImpl(instanceContext);
}
});
triggeredByEventAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_TRIGGERED_BY_EVENT)
.defaultValue(false)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
laneSetCollection = sequenceBuilder.elementCollection(LaneSet.class)
.build();
flowElementCollection = sequenceBuilder.elementCollection(FlowElement.class)
.build();
artifactCollection = sequenceBuilder.elementCollection(Artifact.class)
.build();
/** camunda extensions */
camundaAsyncAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC)
.namespace(CAMUNDA_NS)
.defaultValue(false)
.build();
camundaExclusiveAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_EXCLUSIVE)
.namespace(CAMUNDA_NS)
.defaultValue(true)
.build();
typeBuilder.build();
}