use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaExpression in project camunda-bpm-platform by camunda.
the class ItemHandler method getExpressionValue.
protected Expression getExpressionValue(CamundaField field, ExpressionManager expressionManager) {
CamundaExpression expression = field.getCamundaExpressionChild();
String value = null;
if (expression != null) {
value = expression.getTextContent();
}
if (value == null) {
value = field.getCamundaExpression();
}
if (value != null) {
return expressionManager.createExpression(value);
}
return null;
}
use of org.camunda.bpm.model.cmmn.instance.camunda.CamundaExpression 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.CamundaExpression in project camunda-cmmn-model by camunda.
the class CamundaExpressionImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaExpression.class, CAMUNDA_ELEMENT_EXPRESSION).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaExpression>() {
public CamundaExpression newInstance(ModelTypeInstanceContext instanceContext) {
return new CamundaExpressionImpl(instanceContext);
}
});
typeBuilder.build();
}
Aggregations