use of org.kie.workbench.common.stunner.bpmn.backend.legacy.profile.impl.DefaultProfileImpl in project kie-wb-common by kiegroup.
the class BaseDiagramMarshaller method unmarshall.
@Override
public Graph unmarshall(final Metadata metadata, final InputStream inputStream) throws IOException {
LOG.debug("Starting diagram unmarshalling...");
// No rule checking for marshalling/unmarshalling, current jbpm designer marshallers should do it for us.
final Bpmn2UnMarshaller parser = new Bpmn2UnMarshaller(bpmnGraphBuilderFactory, definitionManager, factoryManager, rulesManager, oryxManager, graphCommandManager, commandFactory, indexBuilder, getDiagramDefinitionSetClass(), getDiagramDefinitionClass());
Graph result = null;
try {
// Unmarshall the diagram definition
final Definitions definitions = parseDefinitions(inputStream);
parser.setProfile(new DefaultProfileImpl());
result = parser.unmarshall(definitions, getPreProcessingData(metadata));
// Update diagram's settings.
updateRootUUID(metadata, result);
} catch (IOException e) {
LOG.error("Error unmarshalling file.", e);
}
LOG.debug("Diagram unmarshalling finished successfully.");
return result;
}
Aggregations