Search in sources :

Example 1 with DataObject

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

the class DataObjectImpl method registerType.

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

        public DataObject newInstance(ModelTypeInstanceContext instanceContext) {
            return new DataObjectImpl(instanceContext);
        }
    });
    itemSubjectRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ITEM_SUBJECT_REF).qNameAttributeReference(ItemDefinition.class).build();
    isCollectionAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_IS_COLLECTION).defaultValue(false).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    dataStateChild = sequenceBuilder.element(DataState.class).build();
    typeBuilder.build();
}
Also used : DataObject(org.camunda.bpm.model.bpmn.instance.DataObject) FlowElement(org.camunda.bpm.model.bpmn.instance.FlowElement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

DataObject (org.camunda.bpm.model.bpmn.instance.DataObject)1 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)1