io.automatiko.engine.decision.dmn.DmnDecisionModels Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of automatiko-decision-dmn Show documentation
Show all versions of automatiko-decision-dmn Show documentation
DMN Decision support for Automatiko Engine
package io.automatiko.engine.decision.dmn;
import java.util.ArrayList;
import java.util.List;
import io.automatiko.engine.api.decision.DecisionModel;
import io.automatiko.engine.api.decision.DecisionModels;
public class DmnDecisionModels implements DecisionModels {
private List decisionModels = new ArrayList<>();
public DmnDecisionModels(List decisionModels) {
if (decisionModels != null) {
this.decisionModels.addAll(decisionModels);
}
}
@Override
public DecisionModel getDecisionModel(String namespace, String name) {
return decisionModels.stream()
.filter(dm -> dm.getDMNModel().getNamespace().equals(namespace) && dm.getDMNModel().getName().equals(name))
.findAny()
.orElse(null);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy