Bridge AS2 Configuration

/*<![CDATA[*/ div.rbtoc1761034166818 {padding: 0px;} div.rbtoc1761034166818 ul {margin-left: 0px;} div.rbtoc1761034166818 li {margin-left: 0px;padding-left: 0px;} /*]]>*/

There is currently a known issue with the Smart Editor when adding new entries in both the outbound and inbound file routing sections. Newly created entries are not being saved or processed correctly. As a temporary workaround, please use Expert Mode to manually add new entries directly in the XML configuration file (as2_prod.xml). Once the entries have been added in Expert Mode, they can still be viewed and edited later through the Smart Editor without any problems. Existing configurations remain unaffected and can continue to be maintained via Smart Mode as usual.
This issue has already been identified and will be resolved in release 25.1.1.

Platform partner channel configuration


To configure an AS2 Channel on the platform side to use a bridge connection, enter the following parameters in the channel settings:

  • "Select Lobster Bridge": Choose the bridge configuration, this will set the "Partner Address" and the certificates

  • "Own Id (Me towards partner)", this has to match the "Partner Id" on the bridge side

  • "Partner Id (Partner towards me)", this has to match the "Local AS2-ID" on the bridge side

  • "Further AS2 Settings": enable "send signed", "send encrypted", "receive signed" and "send signed"



images/download/attachments/212902374/image-2025-9-16_16-43-16-version-1-modificationdate-1758033795412-api-v2.png

Bridge partner channel configuration

Control Center → AS2 Configuration → Partner Channel


images/download/attachments/212902374/image-2025-9-16_16-49-25-version-1-modificationdate-1758034164832-api-v2.png


Bridge AS2 File Routing

Control Center → AS2 Configuration → File Routing

Monitored folders for outbound pickup and inbound routing or AS2 are governed by a single XML configuration file. You can maintain these settings via the Smart Editor in the UI (guided, safe defaults) or, in Expert Mode, by editing the XML directly for full control.

Outbound

Parameter

Required

Default

Description

Backup Folder

Yes

-

Path where backup files will be stored (entry point for backups).

Backup

No

false

Enable backup creation before deletion

Folder

Yes

-

Directory path to monitor for files

Interval

No

5

Scan interval in minutes (minimum: 1)

MIME Type

Yes

-

MIME type for AS2 message content

Retian Days

No

0

Backup retention period (0 = no cleanup)

Subject

No

""

Email subject template (@file@ = filename

Recursive

No

false

Include subdirectories in monitoring

Extension

No

""

File extension filter (empty = all files)

Exclude

No

""

Directory name to exclude from scanning

Operation Workflow

1. File Discovery Process: the process begins with a directory scan. The system then checks whether recursive scanning is enabled: if yes, it includes subdirectories; if no, it scans the root directory only. The resulting set is then passed through the extension filter, followed by the exclusion rules. After both steps are applied, the final file list is ready.

2. File Processing Pipeline:

  • Pre-validation Checks

    • System emergency stop status

    • AS2 service availability

    • Channel configuration validity

    • Disk space sufficiency (>50MB for backups)

  • File Access Control

    • File existence verification

    • Zero-byte file exclusion

    • File locking acquisition (prevents concurrent access)

  • AS2 Transmission

    • Message construction with partner-specific settings

    • Configurable retry attempts (default: 3)

    • Inter-retry delays (configurable wait time)

    • MDN (Message Disposition Notification) validation

  • Post-transmission Cleanup

    • Backup creation (if enabled)

    • Original file deletion

    • Log entry creation

Backup Strategy

  • Creation: Files are backed up before deletion (if enabled)

  • Location: Centralized backup directory with outbound task-specific subdirectories

  • Naming: Timestamp-prefixed filenames prevent conflicts

  • Verification: Backup success validated before original deletion

Inbound

Parameter

Required

Default

Description

Fallback

Yes

-

Directory path for files that don't match any rule

Folder

Yes

-

Target directory for matched files

MIME Type

No

""

Content type exact match

Pattern

No

""

Filename pattern matching, supports:

  • * = Match any number of characters

  • ? = Match exactly one character

  • Literal characters match exactly

Subject

No

""

Matches messages whose AS2 Subject header contains this substring. Also see the path attribute for using the full Subject as the storage path

Path

No

-

Special routing mode. When set to "subject", the message subject is used as a path component (subject-as-path) during storage


Operation Workflow

  1. AS2 Message Received: The pipeline begins when an inbound AS2 message is accepted by the system.

  2. Emergency Stop Check: A guardrail verifies whether a global stop condition is active; if so, processing halts safely.

  3. Disk Space Validation: The system confirms sufficient free space to handle the message and any intermediate artifacts before proceeding.

  4. Message Entry Extraction: Relevant entries (payloads and metadata) are extracted from the message for downstream processing.

  5. Rule-Based Routing: Configured rules determine the destination and handling path based on criteria such as partner, message type, or headers.

  6. Logging & Notification: Record an auditable trail and emit operational notifications or alerts as needed.

  7. MDN Response: Return a Message Disposition Notification to the sender, indicating success or detailing any errors.

Fallback Behavior

  • Error Response: Returns "Unknown file type" if no fallback configured

  • Fallback Storage: Saves to fallback directory with notification

  • Administrative Alert: Email notification for unknown file types

Smart Editor

In Smart Mode, Bridge provides a guided interface for configuring AS2 file routing without the need to edit XML manually. All key parameters—such as monitored folders, MIME types, backup locations, and retention periods—can be defined through structured fields with built-in validation and safe defaults. This mode is recommended for most users, as it ensures correct configuration syntax and reduces the risk of errors.


images/download/attachments/212902374/image-2025-10-9_15-27-24-version-1-modificationdate-1760016444629-api-v2.png

Expert Mode

When Expert Mode is enabled the same configuration that the Smart Editor manages can be edited directly in configuration XML file "./conf/as2_prod.xml"

images/download/attachments/212902374/image-2025-10-9_17-26-15-version-1-modificationdate-1760023575869-api-v2.png

Outbound Configuration (<schedule> and <task>)

Each <task> element defines how the Bridge monitors and processes outbound files that will be transmitted via AS2.

Attribute

Required

Description

baseBackup (in parent element)

Yes

Directory to store backups

backup

No

Enables/disables backup creation (true = backup before deletion).

folder

Yes

Directory to monitor for outgoing files.

interval

No

Scan interval in minutes (default 5).

mimeType

Yes

MIME type for the outgoing file (e.g. application/edifact).

retainDays

No

How long backups are kept (0 = no cleanup).

subject

No

Optional subject string for logging or notifications.

recursive

No

If true, includes subfolders.

extension

No

Restrict scanning to files with this extension.

exclude

No

Subdirectory name to ignore during scanning.

Example:

    
<schedule     
baseBackup    
="./outbound/prod/backup"    
    
>
<task backup ="true" folder ="./outbound/prod/xml" interval ="5" mimeType ="application/xml" retainDays ="5" subject ="" recursive ="false" extension ="" exclude ="" ></task>
</schedule>

The Bridge will continuously monitor the folder ./outbound/prod/xml for new XML files to send via AS2. The interval="5" means the folder is scanned every 5 minutes. When a file is found, it is processed and a backup copy is created in the ./outbound/prod/backup directory before deletion (backup="true"). The mimeType="application/xml" specifies the content type of the files to send, and retainDays="5" ensures backups older than 5 days are automatically deleted. Optional flags, no recursive search for subfolderdes recursive="false", no rule is defined to only send a specific file extension extension="", and no folder is defined to exculde files from being send exclude="".

Inbound Configuration (<rules> and <rule>)

Attribute

Required

Description

fallback (in parent element)

Yes

Folder where unknown or unmatched files are placed.

folder

Yes

Destination directory for matched files.

mimeType

No

Exact content type match (e.g. application/idoc).

pattern

No

Filename pattern (* any chars, ? one char).

subject

No

Match substring from the AS2 Subject header.

path

No

If set to subject, uses the subject text as a subfolder name.

Example:

    
<rules fallback    
="./inbound/prod/unknown"    
>
<rule
folder ="./inbound/prod/xml" mimeType ="application/xml" pattern ="" subject ="" path ="" ></rule>
</rules>

The example defines an inbound routing rule where received AS2 messages with a MIME type of application/xml are saved into the folder ./inbound/prod/xml. If a message does not match any defined rule, it is stored in the fallback folder ./inbound/prod/unknown. No optional attributes are defined, pattern="" means no filename filter is applied, path="" means no advanced routing is enabled, and subject="" means no message subject condition is set.

Enable and disable the AS2 Connector

Administration → Application Settings → AS2 configuration

Here you can stop the AS2 file transfer. The AS2 Service on the Dashboard will switch to "not active".

images/download/attachments/212902374/image-2025-9-16_16-11-17-version-1-modificationdate-1758031876258-api-v2.png