use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaField in project camunda-bpm-platform by camunda.
the class FieldSpec method addFieldToListenerElement.
public void addFieldToListenerElement(CmmnModelInstance modelInstance, CamundaCaseExecutionListener listenerElement) {
CamundaField field = SpecUtil.createElement(modelInstance, listenerElement, null, CamundaField.class);
field.setCamundaName(fieldName);
if (expression != null) {
field.setCamundaExpression(expression);
} else if (childExpression != null) {
CamundaExpression fieldExpressionChild = SpecUtil.createElement(modelInstance, field, null, CamundaExpression.class);
fieldExpressionChild.setTextContent(childExpression);
} else if (stringValue != null) {
field.setCamundaStringValue(stringValue);
} else if (childStringValue != null) {
CamundaString fieldExpressionChild = SpecUtil.createElement(modelInstance, field, null, CamundaString.class);
fieldExpressionChild.setTextContent(childStringValue);
}
}
use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaField in project camunda-cmmn-model by camunda.
the class CamundaFieldImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaField.class, CAMUNDA_ELEMENT_FIELD).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaField>() {
public CamundaField newInstance(ModelTypeInstanceContext instanceContext) {
return new CamundaFieldImpl(instanceContext);
}
});
camundaNameAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_NAME).namespace(CAMUNDA_NS).build();
camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION).namespace(CAMUNDA_NS).build();
camundaStringValueAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_STRING_VALUE).namespace(CAMUNDA_NS).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
camundaExpressionChild = sequenceBuilder.element(CamundaExpression.class).build();
camundaStringChild = sequenceBuilder.element(CamundaString.class).build();
typeBuilder.build();
}
Aggregations