use of org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary in project kie-wb-common by kiegroup.
the class DMNDeepCloneProcessTest method buildInformationItemPrimary.
private InformationItemPrimary buildInformationItemPrimary(final BuiltInType builtInType) {
final InformationItemPrimary informationItemPrimary = new InformationItemPrimary();
informationItemPrimary.setTypeRef(new QName(builtInType));
return informationItemPrimary;
}
use of org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary in project kie-wb-common by kiegroup.
the class InputDataConverter method nodeFromDMN.
@Override
public Node<View<InputData>, ?> nodeFromDMN(final org.kie.dmn.model.api.InputData dmn, final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer) {
@SuppressWarnings("unchecked") final Node<View<InputData>, ?> node = (Node<View<InputData>, ?>) factoryManager.newElement(dmn.getId(), getDefinitionId(InputData.class)).asNode();
final Id id = new Id(dmn.getId());
final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
final Name name = new Name(dmn.getName());
final InformationItemPrimary informationItem = InformationItemPrimaryPropertyConverter.wbFromDMN(dmn.getVariable(), dmn);
final InputData inputData = new InputData(id, description, name, informationItem, new StylingSet(), new GeneralRectangleDimensionsSet());
node.getContent().setDefinition(inputData);
if (informationItem != null) {
informationItem.setParent(inputData);
}
DMNExternalLinksToExtensionElements.loadExternalLinksFromExtensionElements(dmn, inputData);
return node;
}
use of org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary in project kie-wb-common by kiegroup.
the class DecisionServiceParametersListWidget method addDecisionNodeToGroup.
void addDecisionNodeToGroup(final ParameterGroup group, final Node<View<?>, ?> node) {
final Decision decision = (Decision) ((Definition) node.getContent()).getDefinition();
final InformationItemPrimary variable = decision.getVariable();
final String name = decision.getName().getValue();
final String type = variable.getTypeRef().getLocalPart();
group.addParameter(name, type);
}
use of org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary in project kie-wb-common by kiegroup.
the class DecisionServiceParametersListWidget method loadInputsParameters.
void loadInputsParameters(final List<InputData> inputs) {
for (final InputData input : inputs) {
final InformationItemPrimary variable = input.getVariable();
final String name = input.getName().getValue();
final String type = variable.getTypeRef().getLocalPart();
groupInputs.addParameter(name, type);
}
}
Aggregations