jbpt / codebase

The jBPT code library is a compendium of technologies that support research on design, execution, and evaluation of business processes. The library offers a broad range of basis analysis and utility functionality and, due to its open publishing model, can easily be extended.
https://github.com/jbpt/codebase
GNU Lesser General Public License v3.0
32 stars 17 forks source link

Problem in saving labels of transitions when saving petri net to a pnml file #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Tried to save a petri net to a file.
2. The labels for places are saved correctly,
3. the labels for transitions are not saved correctly.

What is the expected output? What do you see instead?
the petri net is saved in the pnml file, but without the assigned labels.

What version of the product are you using? On what operating system?
I checked out and compiled the last version.

Please provide any additional information below.
It did not really harm my project, but I just wanted to report the bug.
When I save a petri net in a file, the labels for places are serialized 
correctly but the labels for transitions not.
I used the following code to save a petri net to a PNML file.

private static void writePNML(NetSystem ns, String fileName) {
        Document doc = null;
        PNMLSerializer ser = new PNMLSerializer();

        try {
            doc = ser.serialize(ns);
            saveDocumentToFile(doc, fileName);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (TransformerFactoryConfigurationError e) {
            e.printStackTrace();
        } catch (TransformerException e) {
            e.printStackTrace();
        } catch (SerializationException e) {
            e.printStackTrace();
        }
    }

Original issue reported on code.google.com by Jalali.A...@gmail.com on 25 Jan 2015 at 10:58

GoogleCodeExporter commented 9 years ago
This problem is fixed.

Original comment by artem.po...@gmail.com on 9 Jul 2015 at 2:34