Search in sources :

Example 1 with CamundaString

use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaString in project camunda-bpm-platform by camunda.

the class ItemHandler method getFixedValue.

protected FixedValue getFixedValue(CamundaField field) {
    CamundaString strg = field.getCamundaString();
    String value = null;
    if (strg != null) {
        value = strg.getTextContent();
    }
    if (value == null) {
        value = field.getCamundaStringValue();
    }
    if (value != null) {
        return new FixedValue(value);
    }
    return null;
}
Also used : CamundaString(org.camunda.bpm.model.cmmn.instance.camunda.CamundaString) FixedValue(org.camunda.bpm.engine.impl.el.FixedValue) CamundaString(org.camunda.bpm.model.cmmn.instance.camunda.CamundaString)

Example 2 with CamundaString

use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaString 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);
    }
}
Also used : CamundaField(org.camunda.bpm.model.cmmn.instance.camunda.CamundaField) CamundaExpression(org.camunda.bpm.model.cmmn.instance.camunda.CamundaExpression) CamundaString(org.camunda.bpm.model.cmmn.instance.camunda.CamundaString)

Example 3 with CamundaString

use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaString in project camunda-cmmn-model by camunda.

the class CamundaStringImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaString.class, CAMUNDA_ELEMENT_STRING).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaString>() {

        public CamundaString newInstance(ModelTypeInstanceContext instanceContext) {
            return new CamundaStringImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) CamundaString(org.camunda.bpm.model.cmmn.instance.camunda.CamundaString) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

CamundaString (org.camunda.bpm.model.cmmn.instance.camunda.CamundaString)3 FixedValue (org.camunda.bpm.engine.impl.el.FixedValue)1 CamundaExpression (org.camunda.bpm.model.cmmn.instance.camunda.CamundaExpression)1 CamundaField (org.camunda.bpm.model.cmmn.instance.camunda.CamundaField)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1