Imported event log fails with schema mismatch error in process mining

When importing XES event logs for purchase order process analysis in Mendix Process Mining 9.24, I’m getting schema mismatch errors. The logs are exported from our SAP system and should contain all the standard XES attributes, but the import fails with validation errors.

The error message mentions missing required attributes, but I’ve verified the XES file has concept:name, time:timestamp, and org:resource fields. I’m not sure if this is related to SAP export compatibility or if there’s something specific about how event log schema validation works in Mendix that I’m missing.

The analysis is completely blocked until I can get these logs imported. Has anyone successfully imported SAP-generated event logs into Mendix Process Mining?

Here’s a sample from the XES file:

<trace>
  <string key="concept:name" value="PO_12345"/>
  <event>
    <string key="concept:name" value="Create PO"/>
    <date key="time:timestamp" value="2024-11-15T09:30:00"/>
  </event>
</trace>

The schema validation fails on import. Is there something wrong with how SAP formats the timestamp or event attributes?

SAP exports can be tricky. The XES standard requires specific attribute types and formats. Even if the attribute names are present, the data types might not match what Mendix expects. Can you share a snippet of your XES file structure, particularly the header and first few events?

You have two options: transform the file or configure the import mapping. For quick fixes, transforming is easier. For recurring imports, set up proper mapping in Mendix. The lifecycle attribute can usually be omitted if you configure the import settings correctly, but the timestamp format is non-negotiable.

Let me provide a complete solution covering all three aspects of your issue:

XES Attribute Requirements: Mendix Process Mining requires these mandatory attributes for successful import:

  • concept:name (string) - for both trace and event level
  • time:timestamp (date) - must be ISO 8601 with timezone
  • org:resource (string) - optional but recommended for resource analysis
  • lifecycle:transition (string) - defaults to ‘complete’ if omitted

Your SAP export is missing proper timestamp formatting and lifecycle information.

Event Log Schema Validation: The schema validator checks:

  1. Timestamp format must include timezone: 2024-11-15T09:30:00+01:00 or `2024-11-15T09:30:00Z
  2. All events within a trace must have chronological timestamps
  3. Attribute data types must match XES standard (string, date, int, float, boolean)

To fix your file, transform the timestamps:

<trace>
  <string key="concept:name" value="PO_12345"/>
  <event>
    <string key="concept:name" value="Create PO"/>
    <date key="time:timestamp" value="2024-11-15T09:30:00Z"/>
    <string key="lifecycle:transition" value="complete"/>
    <string key="org:resource" value="System"/>
  </event>
</trace>

SAP Export Compatibility: SAP’s standard event log export often lacks timezone information because SAP stores timestamps in system local time. Here’s how to handle this:

  1. Pre-processing approach (recommended for one-time imports):

    • Use an XSLT transformation or Python script to add timezone offset to all timestamps
    • Add default lifecycle:transition=‘complete’ to all events
    • Ensure org:resource is populated (use SAP username or ‘System’ for automated steps)
  2. Import mapping configuration (better for recurring imports):

    • In Mendix Studio Pro, create a custom import mapping for your SAP XES format
    • Configure timestamp attribute with timezone assumption (e.g., assume UTC or your SAP system timezone)
    • Set default values for missing lifecycle attributes
    • Map SAP-specific attributes to standard XES attributes
  3. SAP export modification (best long-term solution):

    • If you control the SAP export process, modify the extraction program to include timezone in timestamp output
    • Add lifecycle information during export based on SAP transaction status
    • Include resource information from SAP user data

For immediate resolution, use this Python script to fix your XES file:

# Pseudocode for XES timestamp fix:
1. Parse XES file as XML
2. For each timestamp attribute:
   - Extract current value
   - Append 'Z' for UTC or '+01:00' for your timezone
   - Update attribute value
3. For each event without lifecycle:transition:
   - Add attribute with value 'complete'
4. Write corrected XES file

After transformation, re-import the file. The schema validation should pass, and your process mining analysis can proceed. For future imports, set up the custom import mapping to handle SAP’s format automatically.

I see the issue - your timestamp format is missing timezone information. Mendix Process Mining requires ISO 8601 format with timezone. SAP sometimes exports without the timezone offset, which causes validation to fail.