use of org.camunda.bpm.model.dmn.instance.InformationRequirement in project camunda-dmn-model by camunda.
the class InformationRequirementImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(InformationRequirement.class, DMN_ELEMENT_INFORMATION_REQUIREMENT).namespaceUri(DMN11_NS).instanceProvider(new ModelTypeInstanceProvider<InformationRequirement>() {
public InformationRequirement newInstance(ModelTypeInstanceContext instanceContext) {
return new InformationRequirementImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
requiredDecisionRef = sequenceBuilder.element(RequiredDecisionReference.class).uriElementReference(Decision.class).build();
requiredInputRef = sequenceBuilder.element(RequiredInputReference.class).uriElementReference(InputData.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.dmn.instance.InformationRequirement in project camunda-engine-dmn by camunda.
the class DefaultDmnTransform method getRequiredDmnDecisions.
protected List<DmnDecision> getRequiredDmnDecisions(Decision decision, Map<String, DmnDecisionImpl> dmnDecisions) {
List<DmnDecision> requiredDecisionList = new ArrayList<DmnDecision>();
for (InformationRequirement informationRequirement : decision.getInformationRequirements()) {
Decision requiredDecision = informationRequirement.getRequiredDecision();
if (requiredDecision != null) {
DmnDecision requiredDmnDecision = dmnDecisions.get(requiredDecision.getId());
requiredDecisionList.add(requiredDmnDecision);
}
}
return requiredDecisionList;
}
Aggregations