Search in sources :

Example 1 with Variable

use of org.camunda.bpm.model.dmn.instance.Variable in project camunda-dmn-model by camunda.

the class VariableImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Variable.class, DMN_ELEMENT_VARIABLE).namespaceUri(DMN11_NS).extendsType(InformationItem.class).instanceProvider(new ModelTypeInstanceProvider<Variable>() {

        public Variable newInstance(ModelTypeInstanceContext instanceContext) {
            return new VariableImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : Variable(org.camunda.bpm.model.dmn.instance.Variable) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) InformationItem(org.camunda.bpm.model.dmn.instance.InformationItem) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 2 with Variable

use of org.camunda.bpm.model.dmn.instance.Variable in project camunda-engine-dmn by camunda.

the class DefaultDmnTransform method transformDecisionLiteralExpression.

protected DmnDecisionLiteralExpressionImpl transformDecisionLiteralExpression(Decision decision, LiteralExpression literalExpression) {
    DmnDecisionLiteralExpressionImpl dmnDecisionLiteralExpression = new DmnDecisionLiteralExpressionImpl();
    Variable variable = decision.getVariable();
    if (variable == null) {
        throw LOG.decisionVariableIsMissing(decision.getId());
    }
    DmnVariableImpl dmnVariable = transformVariable(variable);
    dmnDecisionLiteralExpression.setVariable(dmnVariable);
    DmnExpressionImpl dmnLiteralExpression = transformLiteralExpression(literalExpression);
    dmnDecisionLiteralExpression.setExpression(dmnLiteralExpression);
    return dmnDecisionLiteralExpression;
}
Also used : DmnVariableImpl(org.camunda.bpm.dmn.engine.impl.DmnVariableImpl) DmnExpressionImpl(org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl) Variable(org.camunda.bpm.model.dmn.instance.Variable) DmnDecisionLiteralExpressionImpl(org.camunda.bpm.dmn.engine.impl.DmnDecisionLiteralExpressionImpl)

Aggregations

Variable (org.camunda.bpm.model.dmn.instance.Variable)2 DmnDecisionLiteralExpressionImpl (org.camunda.bpm.dmn.engine.impl.DmnDecisionLiteralExpressionImpl)1 DmnExpressionImpl (org.camunda.bpm.dmn.engine.impl.DmnExpressionImpl)1 DmnVariableImpl (org.camunda.bpm.dmn.engine.impl.DmnVariableImpl)1 InformationItem (org.camunda.bpm.model.dmn.instance.InformationItem)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1