use of org.eclipse.bpmn2.ItemDefinition in project kie-wb-common by kiegroup.
the class ItemDefinitionPropertyConverter method dmnFromWB.
public static org.kie.dmn.model.v1_1.ItemDefinition dmnFromWB(final ItemDefinition wb) {
if (wb == null) {
return null;
}
org.kie.dmn.model.v1_1.ItemDefinition result = new org.kie.dmn.model.v1_1.ItemDefinition();
result.setId(wb.getId().getValue());
result.setDescription(DescriptionPropertyConverter.dmnFromWB(wb.getDescription()));
result.setName(wb.getName().getValue());
QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
result.setTypeLanguage(wb.getTypeLanguage());
result.setIsCollection(wb.isIsCollection());
result.setAllowedValues(UnaryTestsPropertyConverter.dmnFromWB(wb.getAllowedValues()));
for (ItemDefinition child : wb.getItemComponent()) {
org.kie.dmn.model.v1_1.ItemDefinition convertedChild = ItemDefinitionPropertyConverter.dmnFromWB(child);
result.getItemComponent().add(convertedChild);
}
return result;
}
use of org.eclipse.bpmn2.ItemDefinition in project kie-wb-common by kiegroup.
the class CustomInput method readInputFrom.
private DataInput readInputFrom(String targetName, ItemDefinition typeDef) {
DataInput dataInput = bpmn2.createDataInput();
dataInput.setName(targetName);
// the id is an encoding of the node id + the name of the input
dataInput.setId(Ids.dataInput(element.getId(), targetName));
dataInput.setItemSubjectRef(typeDef);
CustomAttribute.dtype.of(dataInput).set(typeDef.getStructureRef());
return dataInput;
}
use of org.eclipse.bpmn2.ItemDefinition in project kie-wb-common by kiegroup.
the class InputAssignmentWriter method readInputFrom.
private DataInput readInputFrom(String targetName, ItemDefinition typeDef) {
DataInput dataInput = bpmn2.createDataInput();
// the id is an encoding of the node id + the name of the input
dataInput.setId(Ids.dataInput(parentId, decl.getIdentifier()));
dataInput.setName(targetName);
dataInput.setItemSubjectRef(typeDef);
CustomAttribute.dtype.of(dataInput).set(typeDef.getStructureRef());
return dataInput;
}
use of org.eclipse.bpmn2.ItemDefinition in project kie-wb-common by kiegroup.
the class InputAssignmentWriter method typedefInput.
private ItemDefinition typedefInput(VariableDeclaration decl) {
ItemDefinition typeDef = bpmn2.createItemDefinition();
typeDef.setId(Ids.dataInputItem(parentId, decl.getIdentifier()));
typeDef.setStructureRef(decl.getType());
return typeDef;
}
use of org.eclipse.bpmn2.ItemDefinition in project kie-wb-common by kiegroup.
the class OutputAssignmentWriter method writeOutputTo.
private DataOutput writeOutputTo(String sourceName, ItemDefinition typeDef) {
DataOutput dataOutput = bpmn2.createDataOutput();
dataOutput.setId(Ids.dataOutput(parentId, decl.getIdentifier()));
dataOutput.setName(sourceName);
dataOutput.setItemSubjectRef(typeDef);
CustomAttribute.dtype.of(dataOutput).set(typeDef.getStructureRef());
return dataOutput;
}
Aggregations