public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder =
        modelBuilder
            .defineType(ManualActivationRule.class, CMMN_ELEMENT_MANUAL_ACTIVATION_RULE)
            .namespaceUri(CMMN10_NS)
            .extendsType(CmmnElement.class)
            .instanceProvider(
                new ModelTypeInstanceProvider<ManualActivationRule>() {
                  public ManualActivationRule newInstance(
                      ModelTypeInstanceContext instanceContext) {
                    return new ManualActivationRuleImpl(instanceContext);
                  }
                });

    nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME).build();

    contextRefAttribute =
        typeBuilder
            .stringAttribute(CMMN_ATTRIBUTE_CONTEXT_REF)
            .idAttributeReference(CaseFileItem.class)
            .build();

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    conditionChild = sequenceBuilder.element(ConditionExpression.class).build();

    typeBuilder.build();
  }
  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder =
        modelBuilder
            .defineType(InputSetRefs.class, BPMN_ELEMENT_INPUT_SET_REFS)
            .namespaceUri(BPMN20_NS)
            .instanceProvider(
                new ModelTypeInstanceProvider<InputSetRefs>() {
                  public InputSetRefs newInstance(ModelTypeInstanceContext instanceContext) {
                    return new InputSetRefs(instanceContext);
                  }
                });

    typeBuilder.build();
  }
Ejemplo n.º 3
0
  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder =
        modelBuilder
            .defineType(CaseRoles.class, CMMN_ELEMENT_CASE_ROLES)
            .namespaceUri(CMMN10_NS)
            .extendsType(Role.class)
            .instanceProvider(
                new ModelElementTypeBuilder.ModelTypeInstanceProvider<CaseRoles>() {
                  public CaseRoles newInstance(ModelTypeInstanceContext instanceContext) {
                    return new CaseRoles(instanceContext);
                  }
                });

    typeBuilder.build();
  }