Search in sources :

Example 16 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class HumanTaskImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(HumanTask.class, CMMN_ELEMENT_HUMAN_TASK).namespaceUri(CMMN11_NS).extendsType(Task.class).instanceProvider(new ModelTypeInstanceProvider<HumanTask>() {

        public HumanTask newInstance(ModelTypeInstanceContext instanceContext) {
            return new HumanTaskImpl(instanceContext);
        }
    });
    performerRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_PERFORMER_REF).idAttributeReference(Role.class).build();
    /**
     * camunda extensions
     */
    camundaAssigneeAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ASSIGNEE).namespace(CAMUNDA_NS).build();
    camundaCandidateGroupsAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CANDIDATE_GROUPS).namespace(CAMUNDA_NS).build();
    camundaCandidateUsersAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CANDIDATE_USERS).namespace(CAMUNDA_NS).build();
    camundaDueDateAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DUE_DATE).namespace(CAMUNDA_NS).build();
    camundaFollowUpDateAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FOLLOW_UP_DATE).namespace(CAMUNDA_NS).build();
    camundaFormKeyAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FORM_KEY).namespace(CAMUNDA_NS).build();
    camundaPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_PRIORITY).namespace(CAMUNDA_NS).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    planningTableCollection = sequenceBuilder.elementCollection(PlanningTable.class).build();
    planningTableChild = sequenceBuilder.element(PlanningTable.class).minOccurs(0).maxOccurs(1).build();
    typeBuilder.build();
}
Also used : HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask) Task(org.camunda.bpm.model.cmmn.instance.Task) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) HumanTask(org.camunda.bpm.model.cmmn.instance.HumanTask) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 17 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class PlanFragmentImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(PlanFragment.class, CMMN_ELEMENT_PLAN_FRAGMENT).namespaceUri(CMMN11_NS).extendsType(PlanItemDefinition.class).instanceProvider(new ModelTypeInstanceProvider<PlanFragment>() {

        public PlanFragment newInstance(ModelTypeInstanceContext instanceContext) {
            return new PlanFragmentImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    planItemCollection = sequenceBuilder.elementCollection(PlanItem.class).build();
    sentryCollection = sequenceBuilder.elementCollection(Sentry.class).build();
    typeBuilder.build();
}
Also used : PlanItemDefinition(org.camunda.bpm.model.cmmn.instance.PlanItemDefinition) 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) PlanFragment(org.camunda.bpm.model.cmmn.instance.PlanFragment)

Example 18 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class PlanItemImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(PlanItem.class, CMMN_ELEMENT_PLAN_ITEM).namespaceUri(CMMN11_NS).extendsType(CmmnElement.class).instanceProvider(new ModelTypeInstanceProvider<PlanItem>() {

        public PlanItem newInstance(ModelTypeInstanceContext instanceContext) {
            return new PlanItemImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME).build();
    planItemDefinitionRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_DEFINITION_REF).idAttributeReference(PlanItemDefinition.class).build();
    entryCriteriaRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_ENTRY_CRITERIA_REFS).namespace(CMMN10_NS).idAttributeReferenceCollection(Sentry.class, CmmnAttributeElementReferenceCollection.class).build();
    exitCriteriaRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERIA_REFS).namespace(CMMN10_NS).idAttributeReferenceCollection(Sentry.class, CmmnAttributeElementReferenceCollection.class).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    itemControlChild = sequenceBuilder.element(ItemControl.class).build();
    entryCriterionCollection = sequenceBuilder.elementCollection(EntryCriterion.class).build();
    exitCriterionCollection = sequenceBuilder.elementCollection(ExitCriterion.class).build();
    typeBuilder.build();
}
Also used : CmmnElement(org.camunda.bpm.model.cmmn.instance.CmmnElement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) PlanItem(org.camunda.bpm.model.cmmn.instance.PlanItem) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 19 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class PlanItemOnPartImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(PlanItemOnPart.class, CMMN_ELEMENT_PLAN_ITEM_ON_PART).extendsType(OnPart.class).namespaceUri(CMMN11_NS).instanceProvider(new ModelTypeInstanceProvider<PlanItemOnPart>() {

        public PlanItemOnPart newInstance(ModelTypeInstanceContext instanceContext) {
            return new PlanItemOnPartImpl(instanceContext);
        }
    });
    sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF).idAttributeReference(PlanItem.class).build();
    exitCriterionRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERION_REF).idAttributeReference(ExitCriterion.class).build();
    sentryRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SENTRY_REF).namespace(CMMN10_NS).idAttributeReference(Sentry.class).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    standardEventChild = sequenceBuilder.element(PlanItemTransitionStandardEvent.class).build();
    typeBuilder.build();
}
Also used : PlanItemOnPart(org.camunda.bpm.model.cmmn.instance.PlanItemOnPart) 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)

Example 20 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class RelationshipImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Relationship.class, CMMN_ELEMENT_RELATIONSHIP).namespaceUri(CMMN11_NS).extendsType(CmmnElement.class).instanceProvider(new ModelTypeInstanceProvider<Relationship>() {

        public Relationship newInstance(ModelTypeInstanceContext instanceContext) {
            return new RelationshipImpl(instanceContext);
        }
    });
    typeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TYPE).required().build();
    directionAttribute = typeBuilder.enumAttribute(CMMN_ATTRIBUTE_DIRECTION, RelationshipDirection.class).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    sourceCollection = sequenceBuilder.elementCollection(Source.class).minOccurs(1).build();
    targetCollection = sequenceBuilder.elementCollection(Target.class).minOccurs(1).build();
    typeBuilder.build();
}
Also used : CmmnElement(org.camunda.bpm.model.cmmn.instance.CmmnElement) Target(org.camunda.bpm.model.cmmn.instance.Target) Relationship(org.camunda.bpm.model.cmmn.instance.Relationship) 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) Source(org.camunda.bpm.model.cmmn.instance.Source)

Aggregations

ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)152 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)14 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)13 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)3 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)3 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)3 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)3 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)3 ConversationNode (org.camunda.bpm.model.bpmn.instance.ConversationNode)2 CorrelationPropertyRetrievalExpression (org.camunda.bpm.model.bpmn.instance.CorrelationPropertyRetrievalExpression)2 Expression (org.camunda.bpm.model.bpmn.instance.Expression)2 FlowNode (org.camunda.bpm.model.bpmn.instance.FlowNode)2 Operation (org.camunda.bpm.model.bpmn.instance.Operation)2 Task (org.camunda.bpm.model.bpmn.instance.Task)2 Node (org.camunda.bpm.model.bpmn.instance.di.Node)2