public static PetriNet epcToPetriNet(ConfigurableEPC epc) throws SerendipException {
    PetriNet pn = null;
    if (null == epc) {
      throw new SerendipException("No model is available");
    }

    log.debug("Converting EPC: " + epc.getIdentifier());
    // Conversion
    // EPCToPetriNetConverterPlugin epcToPNplugin = new
    // EPCToPetriNetConverterPlugin();
    // pn = epcToPNplugin.convert(epc);

    pn = EPCToPetriNetConverter.convert(epc, new HashMap(), null, null);

    // DEBUG
    Iterator<EPCEvent> events = epc.getEvents().iterator();
    while (events.hasNext()) {
      log.debug(">" + events.next().getIdentifier());
    }

    Iterator<Place> places = pn.getPlaces().iterator();
    while (places.hasNext()) {
      log.debug("]" + places.next().getIdentifier());
    }
    // end DEBUG
    if (null == pn) {
      throw new SerendipException("Cannot get the equivalent petrinet of " + epc.getId());
    }
    pn.setName(epc.getIdentifier());

    return pn;
  }