Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/**
 * Leitet aus einem übergebenen Filenamen die sedex ID des Empfängers
 * ab.
 * Dieser Resolver funktioniert für
 * - eSchKG Meldungen
 *   sedex ID wird aus dem Filenamen extrahiert.
 *
 * @param filename the name of the file to be sent including path
 * @return the resolved Sedex-ID or an empty string
 *
 * Igor Metz, 2011-10-20
 */
def String resolve(String filename) {
  // Wenn das File in der eSchKG Outbox liegt, geht es an den im Filenamen
  // bezeichneten Empfänger
  def matcher = (filename =~ /^.*\/([1-9]-[0-9A-Z]+-[0-9]+)_.*/)
  if (matcher.matches()) {
    return matcher.group(1)
  }

  // Wenn alle Stricke reissen: leer zurückgeben
  return ''
}
MessageHandler produces warning "message sent by the Sedex adapter, but there is no envelope in the Sedex sent directory"

This warning can safely be ignored. MessageHandler produces this warning when it has to process a larger batch of eSchKG/e-LP/e-LEF messages and the Sedex adapter already sent out some of the produces Sedex messages while MessageHandler is still processing the batch. The MessageHandler is then surprised by missing envelopes.