org.camunda.bpm.model.bpmn.instance.EventDefinition Java Examples

The following examples show how to use org.camunda.bpm.model.bpmn.instance.EventDefinition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EscalationEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(EscalationEventDefinition.class, BPMN_ELEMENT_ESCALATION_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<EscalationEventDefinition>() {
      public EscalationEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new EscalationEventDefinitionImpl(instanceContext);
      }
    });

  escalationRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ESCALATION_REF)
    .qNameAttributeReference(Escalation.class)
    .build();

  typeBuilder.build();
}
 
Example #2
Source File: EscalationEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(EscalationEventDefinition.class, BPMN_ELEMENT_ESCALATION_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<EscalationEventDefinition>() {
      public EscalationEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new EscalationEventDefinitionImpl(instanceContext);
      }
    });

  escalationRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ESCALATION_REF)
    .qNameAttributeReference(Escalation.class)
    .build();

  typeBuilder.build();
}
 
Example #3
Source File: ErrorEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ErrorEventDefinition.class, BPMN_ELEMENT_ERROR_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<ErrorEventDefinition>() {
      public ErrorEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new ErrorEventDefinitionImpl(instanceContext);
      }
    });

  errorRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ERROR_REF)
    .qNameAttributeReference(Error.class)
    .build();
  
  camundaErrorCodeVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ERROR_CODE_VARIABLE)
      .namespace(CAMUNDA_NS)
      .build();

  camundaErrorMessageVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ERROR_MESSAGE_VARIABLE)
    .namespace(CAMUNDA_NS)
    .build();
  
  typeBuilder.build();
}
 
Example #4
Source File: LinkEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(LinkEventDefinition.class, BPMN_ELEMENT_LINK_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<LinkEventDefinition>() {
      public LinkEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new LinkEventDefinitionImpl(instanceContext);
      }
    });

  nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
    .required()
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  sourceCollection = sequenceBuilder.elementCollection(Source.class)
    .qNameElementReferenceCollection(LinkEventDefinition.class)
    .build();

  targetChild = sequenceBuilder.element(Target.class)
    .qNameElementReference(LinkEventDefinition.class)
    .build();

  typeBuilder.build();
}
 
Example #5
Source File: CompensateEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CompensateEventDefinition.class, BPMN_ELEMENT_COMPENSATE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<CompensateEventDefinition>() {
      public CompensateEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new CompensateEventDefinitionImpl(instanceContext);
      }
    });

  waitForCompletionAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_WAIT_FOR_COMPLETION)
    .build();

  activityRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ACTIVITY_REF)
    .qNameAttributeReference(Activity.class)
    .build();

  typeBuilder.build();
}
 
Example #6
Source File: SignalEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SignalEventDefinition.class, BPMN_ELEMENT_SIGNAL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<SignalEventDefinition>() {
      public SignalEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new SignalEventDefinitionImpl(instanceContext);
      }
    });

  signalRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_SIGNAL_REF)
    .qNameAttributeReference(Signal.class)
    .build();

  /** Camunda Attributes */
  camundaAsyncAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC)
    .namespace(CAMUNDA_NS)
    .defaultValue(false)
    .build();

  typeBuilder.build();
}
 
Example #7
Source File: SignalEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SignalEventDefinition.class, BPMN_ELEMENT_SIGNAL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<SignalEventDefinition>() {
      public SignalEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new SignalEventDefinitionImpl(instanceContext);
      }
    });

  signalRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_SIGNAL_REF)
    .qNameAttributeReference(Signal.class)
    .build();

  /** Camunda Attributes */
  camundaAsyncAttribute = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC)
    .namespace(CAMUNDA_NS)
    .defaultValue(false)
    .build();

  typeBuilder.build();
}
 
Example #8
Source File: CompensateEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CompensateEventDefinition.class, BPMN_ELEMENT_COMPENSATE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<CompensateEventDefinition>() {
      public CompensateEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new CompensateEventDefinitionImpl(instanceContext);
      }
    });

  waitForCompletionAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_WAIT_FOR_COMPLETION)
    .build();

  activityRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ACTIVITY_REF)
    .qNameAttributeReference(Activity.class)
    .build();

  typeBuilder.build();
}
 
Example #9
Source File: ErrorEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ErrorEventDefinition.class, BPMN_ELEMENT_ERROR_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<ErrorEventDefinition>() {
      public ErrorEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new ErrorEventDefinitionImpl(instanceContext);
      }
    });

  errorRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_ERROR_REF)
    .qNameAttributeReference(Error.class)
    .build();
  
  camundaErrorCodeVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ERROR_CODE_VARIABLE)
      .namespace(CAMUNDA_NS)
      .build();

  camundaErrorMessageVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ERROR_MESSAGE_VARIABLE)
    .namespace(CAMUNDA_NS)
    .build();
  
  typeBuilder.build();
}
 
Example #10
Source File: LinkEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(LinkEventDefinition.class, BPMN_ELEMENT_LINK_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<LinkEventDefinition>() {
      public LinkEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new LinkEventDefinitionImpl(instanceContext);
      }
    });

  nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
    .required()
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  sourceCollection = sequenceBuilder.elementCollection(Source.class)
    .qNameElementReferenceCollection(LinkEventDefinition.class)
    .build();

  targetChild = sequenceBuilder.element(Target.class)
    .qNameElementReference(LinkEventDefinition.class)
    .build();

  typeBuilder.build();
}
 
Example #11
Source File: TerminateEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TerminateEventDefinition.class, BPMN_ELEMENT_TERMINATE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<TerminateEventDefinition>() {
      public TerminateEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new TerminateEventDefinitionImpl(instanceContext);
      }
    });

  typeBuilder.build();
}
 
Example #12
Source File: EventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(EventDefinition.class, BPMN_ELEMENT_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(RootElement.class)
    .abstractType();

  typeBuilder.build();
}
 
Example #13
Source File: CancelEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CancelEventDefinition.class, BPMN_ELEMENT_CANCEL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<CancelEventDefinition>() {
      public CancelEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new CancelEventDefinitionImpl(instanceContext);
      }
    });

  typeBuilder.build();
}
 
Example #14
Source File: TerminateEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TerminateEventDefinition.class, BPMN_ELEMENT_TERMINATE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<TerminateEventDefinition>() {
      public TerminateEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new TerminateEventDefinitionImpl(instanceContext);
      }
    });

  typeBuilder.build();
}
 
Example #15
Source File: ConditionalEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ConditionalEventDefinition.class, BPMN_ELEMENT_CONDITIONAL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<ConditionalEventDefinition>() {
      
      @Override
      public ConditionalEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new ConditionalEventDefinitionImpl(instanceContext);
      }
    });

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  conditionChild = sequenceBuilder.element(Condition.class)
    .required()
    .build();

  /** camunda extensions */

  camundaVariableName = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VARIABLE_NAME)
    .namespace(CAMUNDA_NS)
    .build();

  camundaVariableEvents = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VARIABLE_EVENTS)
    .namespace(CAMUNDA_NS)
    .build();

  typeBuilder.build();
}
 
Example #16
Source File: ConditionalEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ConditionalEventDefinition.class, BPMN_ELEMENT_CONDITIONAL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<ConditionalEventDefinition>() {
      
      @Override
      public ConditionalEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new ConditionalEventDefinitionImpl(instanceContext);
      }
    });

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  conditionChild = sequenceBuilder.element(Condition.class)
    .required()
    .build();

  /** camunda extensions */

  camundaVariableName = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VARIABLE_NAME)
    .namespace(CAMUNDA_NS)
    .build();

  camundaVariableEvents = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VARIABLE_EVENTS)
    .namespace(CAMUNDA_NS)
    .build();

  typeBuilder.build();
}
 
Example #17
Source File: EventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(EventDefinition.class, BPMN_ELEMENT_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(RootElement.class)
    .abstractType();

  typeBuilder.build();
}
 
Example #18
Source File: CancelEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CancelEventDefinition.class, BPMN_ELEMENT_CANCEL_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelTypeInstanceProvider<CancelEventDefinition>() {
      public CancelEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new CancelEventDefinitionImpl(instanceContext);
      }
    });

  typeBuilder.build();
}
 
Example #19
Source File: AbstractServiceTaskHandleDelegate.java    From wecube-platform with Apache License 2.0 4 votes vote down vote up
private ServiceInvocationEvent serviceInvocationEvent(DelegateExecution execution, ProcessDefinition procDef) {
    ServiceInvocationEventImpl event = new ServiceInvocationEventImpl();

    event.setDefinitionId(execution.getProcessDefinitionId());
    event.setDefinitionVersion(procDef.getVersion());
    event.setDefinitionKey(procDef.getKey());

    // event.setExecutionId(execution.getId());
    event.setBusinessKey(execution.getProcessBusinessKey());
    event.setInstanceId(execution.getProcessInstanceId());

    event.setEventSourceId(execution.getCurrentActivityId());
    event.setEventSourceName(execution.getCurrentActivityName());

    event.setEventType(ServiceInvocationEvent.EventType.SERVICE_INVOCATION);

    ServiceTask serviceTask = execution.getBpmnModelInstance()
            .getModelElementById(execution.getCurrentActivityId());

    List<EventBasedGateway> eventBaseGateways = serviceTask.getSucceedingNodes()
            .filterByType(EventBasedGateway.class).list();
    EventBasedGateway eventBaseGateway = null;
    if (!eventBaseGateways.isEmpty()) {
        eventBaseGateway = eventBaseGateways.get(0);
    }
    IntermediateCatchEvent intermediateCatchEvent = null;
    if (eventBaseGateway != null) {

        List<IntermediateCatchEvent> intermediateCatchEvents = eventBaseGateway.getSucceedingNodes()
                .filterByType(IntermediateCatchEvent.class).list();

        for (IntermediateCatchEvent ice : intermediateCatchEvents) {
            getLogger().debug("IntermediateCatchEvent:{} {}", ice.getId(), ice.getName());

            Collection<EventDefinition> eventDefinitions = ice.getEventDefinitions();

            for (EventDefinition ed : eventDefinitions) {
                getLogger().debug("EventDefinition: {} {}", ed.getId(), ed.getElementType().getTypeName());
                if ("signalEventDefinition".equals(ed.getElementType().getTypeName())) {
                    intermediateCatchEvent = ice;
                    break;
                }
            }

            if (intermediateCatchEvent != null) {
                break;
            }
        }

    }

    if (intermediateCatchEvent != null) {
        event.setExecutionId(intermediateCatchEvent.getId());
    }

    List<String> allowedOptions = tryCalAllowedOptions(execution);
    if (allowedOptions != null) {
        for (String option : allowedOptions) {
            event.addAllowedOption(option);
        }
    }

    return event;
}
 
Example #20
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public void setNoneBehaviorEventRef(EventDefinition noneBehaviorEventRef) {
  noneBehaviorEventRefAttribute.setReferenceTargetElement(this, noneBehaviorEventRef);
}
 
Example #21
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public EventDefinition getNoneBehaviorEventRef() {
  return noneBehaviorEventRefAttribute.getReferenceTargetElement(this);
}
 
Example #22
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public void setOneBehaviorEventRef(EventDefinition oneBehaviorEventRef) {
  oneBehaviorEventRefAttribute.setReferenceTargetElement(this, oneBehaviorEventRef);
}
 
Example #23
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public EventDefinition getOneBehaviorEventRef() {
  return oneBehaviorEventRefAttribute.getReferenceTargetElement(this);
}
 
Example #24
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder
    .defineType(MultiInstanceLoopCharacteristics.class, BPMN_ELEMENT_MULTI_INSTANCE_LOOP_CHARACTERISTICS)
    .namespaceUri(BPMN20_NS)
    .extendsType(LoopCharacteristics.class)
    .instanceProvider(new ModelTypeInstanceProvider<MultiInstanceLoopCharacteristics>() {

      public MultiInstanceLoopCharacteristics newInstance(ModelTypeInstanceContext instanceContext) {
        return new MultiInstanceLoopCharacteristicsImpl(instanceContext);
      }
    });

  isSequentialAttribute = typeBuilder.booleanAttribute(BPMN_ELEMENT_IS_SEQUENTIAL)
    .defaultValue(false)
    .build();

  behaviorAttribute = typeBuilder.enumAttribute(BPMN_ELEMENT_BEHAVIOR, MultiInstanceFlowCondition.class)
    .defaultValue(MultiInstanceFlowCondition.All)
    .build();

  oneBehaviorEventRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_ONE_BEHAVIOR_EVENT_REF)
    .qNameAttributeReference(EventDefinition.class)
    .build();

  noneBehaviorEventRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_NONE_BEHAVIOR_EVENT_REF)
    .qNameAttributeReference(EventDefinition.class)
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  loopCardinalityChild = sequenceBuilder.element(LoopCardinality.class)
    .build();

  loopDataInputRefChild = sequenceBuilder.element(LoopDataInputRef.class)
    .qNameElementReference(DataInput.class)
    .build();

  loopDataOutputRefChild = sequenceBuilder.element(LoopDataOutputRef.class)
    .qNameElementReference(DataOutput.class)
    .build();

  outputDataItemChild = sequenceBuilder.element(OutputDataItem.class)
    .build();

  inputDataItemChild = sequenceBuilder.element(InputDataItem.class)
    .build();

  complexBehaviorDefinitionCollection = sequenceBuilder.elementCollection(ComplexBehaviorDefinition.class)
    .build();

  completionConditionChild = sequenceBuilder.element(CompletionCondition.class)
    .build();

  camundaAsyncAfter = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_AFTER)
      .namespace(CAMUNDA_NS)
      .defaultValue(false)
      .build();

  camundaAsyncBefore = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_BEFORE)
      .namespace(CAMUNDA_NS)
      .defaultValue(false)
      .build();

  camundaExclusive = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_EXCLUSIVE)
      .namespace(CAMUNDA_NS)
      .defaultValue(true)
      .build();

  camundaCollection = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_COLLECTION)
      .namespace(CAMUNDA_NS)
      .build();

  camundaElementVariable = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ELEMENT_VARIABLE)
      .namespace(CAMUNDA_NS)
      .build();

  typeBuilder.build();
}
 
Example #25
Source File: MessageEventDefinitionImpl.java    From camunda-bpmn-model with Apache License 2.0 4 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(MessageEventDefinition.class, BPMN_ELEMENT_MESSAGE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<MessageEventDefinition>() {
      public MessageEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new MessageEventDefinitionImpl(instanceContext);
      }
    });

  messageRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_MESSAGE_REF)
    .qNameAttributeReference(Message.class)
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  operationRefChild = sequenceBuilder.element(OperationRef.class)
    .qNameElementReference(Operation.class)
    .build();

  /** camunda extensions */

  camundaClassAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CLASS)
    .namespace(CAMUNDA_NS)
    .build();

  camundaDelegateExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DELEGATE_EXPRESSION)
    .namespace(CAMUNDA_NS)
    .build();

  camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION)
    .namespace(CAMUNDA_NS)
    .build();

  camundaResultVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_RESULT_VARIABLE)
    .namespace(CAMUNDA_NS)
    .build();

  camundaTopicAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TOPIC)
      .namespace(CAMUNDA_NS)
      .build();

  camundaTypeAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TYPE)
      .namespace(CAMUNDA_NS)
      .build();
      
  camundaTaskPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TASK_PRIORITY)
    .namespace(CAMUNDA_NS)
    .build();

  typeBuilder.build();
}
 
Example #26
Source File: MessageEventDefinitionImpl.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(MessageEventDefinition.class, BPMN_ELEMENT_MESSAGE_EVENT_DEFINITION)
    .namespaceUri(BPMN20_NS)
    .extendsType(EventDefinition.class)
    .instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<MessageEventDefinition>() {
      public MessageEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
        return new MessageEventDefinitionImpl(instanceContext);
      }
    });

  messageRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_MESSAGE_REF)
    .qNameAttributeReference(Message.class)
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  operationRefChild = sequenceBuilder.element(OperationRef.class)
    .qNameElementReference(Operation.class)
    .build();

  /** camunda extensions */

  camundaClassAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CLASS)
    .namespace(CAMUNDA_NS)
    .build();

  camundaDelegateExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DELEGATE_EXPRESSION)
    .namespace(CAMUNDA_NS)
    .build();

  camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION)
    .namespace(CAMUNDA_NS)
    .build();

  camundaResultVariableAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_RESULT_VARIABLE)
    .namespace(CAMUNDA_NS)
    .build();

  camundaTopicAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TOPIC)
      .namespace(CAMUNDA_NS)
      .build();

  camundaTypeAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TYPE)
      .namespace(CAMUNDA_NS)
      .build();
      
  camundaTaskPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TASK_PRIORITY)
    .namespace(CAMUNDA_NS)
    .build();

  typeBuilder.build();
}
 
Example #27
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder
    .defineType(MultiInstanceLoopCharacteristics.class, BPMN_ELEMENT_MULTI_INSTANCE_LOOP_CHARACTERISTICS)
    .namespaceUri(BPMN20_NS)
    .extendsType(LoopCharacteristics.class)
    .instanceProvider(new ModelTypeInstanceProvider<MultiInstanceLoopCharacteristics>() {

      public MultiInstanceLoopCharacteristics newInstance(ModelTypeInstanceContext instanceContext) {
        return new MultiInstanceLoopCharacteristicsImpl(instanceContext);
      }
    });

  isSequentialAttribute = typeBuilder.booleanAttribute(BPMN_ELEMENT_IS_SEQUENTIAL)
    .defaultValue(false)
    .build();

  behaviorAttribute = typeBuilder.enumAttribute(BPMN_ELEMENT_BEHAVIOR, MultiInstanceFlowCondition.class)
    .defaultValue(MultiInstanceFlowCondition.All)
    .build();

  oneBehaviorEventRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_ONE_BEHAVIOR_EVENT_REF)
    .qNameAttributeReference(EventDefinition.class)
    .build();

  noneBehaviorEventRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_NONE_BEHAVIOR_EVENT_REF)
    .qNameAttributeReference(EventDefinition.class)
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  loopCardinalityChild = sequenceBuilder.element(LoopCardinality.class)
    .build();

  loopDataInputRefChild = sequenceBuilder.element(LoopDataInputRef.class)
    .qNameElementReference(DataInput.class)
    .build();

  loopDataOutputRefChild = sequenceBuilder.element(LoopDataOutputRef.class)
    .qNameElementReference(DataOutput.class)
    .build();

  outputDataItemChild = sequenceBuilder.element(OutputDataItem.class)
    .build();

  inputDataItemChild = sequenceBuilder.element(InputDataItem.class)
    .build();

  complexBehaviorDefinitionCollection = sequenceBuilder.elementCollection(ComplexBehaviorDefinition.class)
    .build();

  completionConditionChild = sequenceBuilder.element(CompletionCondition.class)
    .build();

  camundaAsyncAfter = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_AFTER)
      .namespace(CAMUNDA_NS)
      .defaultValue(false)
      .build();

  camundaAsyncBefore = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_ASYNC_BEFORE)
      .namespace(CAMUNDA_NS)
      .defaultValue(false)
      .build();

  camundaExclusive = typeBuilder.booleanAttribute(CAMUNDA_ATTRIBUTE_EXCLUSIVE)
      .namespace(CAMUNDA_NS)
      .defaultValue(true)
      .build();

  camundaCollection = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_COLLECTION)
      .namespace(CAMUNDA_NS)
      .build();

  camundaElementVariable = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ELEMENT_VARIABLE)
      .namespace(CAMUNDA_NS)
      .build();

  typeBuilder.build();
}
 
Example #28
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public EventDefinition getOneBehaviorEventRef() {
  return oneBehaviorEventRefAttribute.getReferenceTargetElement(this);
}
 
Example #29
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void setOneBehaviorEventRef(EventDefinition oneBehaviorEventRef) {
  oneBehaviorEventRefAttribute.setReferenceTargetElement(this, oneBehaviorEventRef);
}
 
Example #30
Source File: MultiInstanceLoopCharacteristicsImpl.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public EventDefinition getNoneBehaviorEventRef() {
  return noneBehaviorEventRefAttribute.getReferenceTargetElement(this);
}