Search in sources :

Example 1 with DataObjectPropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DataObjectPropertyWriter in project kie-wb-common by kiegroup.

the class ArtifactsConverter method toDataObjectAnnotation.

private PropertyWriter toDataObjectAnnotation(Node<View<DataObject>, ?> node) {
    org.eclipse.bpmn2.DataObjectReference element = bpmn2.createDataObjectReference();
    element.setId(node.getUUID());
    DataObjectPropertyWriter writer = propertyWriterFactory.of(element);
    DataObject definition = node.getContent().getDefinition();
    writer.setName(StringUtils.replaceIllegalCharsAttribute(StringUtils.replaceIllegalCharsForDataObjects(definition.getName().getValue())));
    writer.setType(definition.getType().getValue().getType());
    writer.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    writer.setAbsoluteBounds(node);
    return writer;
}
Also used : DataObject(org.kie.workbench.common.stunner.bpmn.definition.DataObject) DataObjectPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DataObjectPropertyWriter) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 DataObjectPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.DataObjectPropertyWriter)1 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1