Integration API Processor

Synchronous REST processor that acts as both input and processor in a single step. Receives ERP entity data via HTTP, persists it directly to comerzzia database and returns the result immediately — no messaging broker required.

Purpose

  • Exposes REST endpoints for each supported entity

  • Validates and processes entity data synchronously

  • Persists to comerzzia database via integration services

  • Returns processed/failed entity counts in the response

Processing Flow

Diagram

Response format

{
    "status": 2,
    "processed": 8,
    "failed": 2
}
status HTTP Status Meaning

0

200

All entities processed successfully

1

500

Processing failed entirely

2

200

Processed with partial errors

  • processed: number of entities successfully persisted

  • failed: number of entities that failed

Configuration

Database connection is configured via comerzzia.xml external configuration file loaded at runtime.

Docker container execution

docker run -it --rm --name processor-integration-api --env-file processor-dev.env --pull=always -p 8080:8080 europe-west3-docker.pkg.dev/czz-devops/comerzzia/erp-to-czz/processor-integration-api:1.0
processor-dev.env file example for environment variables
uidActividad=MYACTIVITY
uidInstancia=MYINSTANCE

SPRING_PROFILES_ACTIVE=jsonlogs

COMERZZIA_DB_CLASS=com.mysql.jdbc.Driver
COMERZZIA_DB_DRIVER=mysql
COMERZZIA_DB_USER=comerzzia
COMERZZIA_DB_PASS=comerzzia
COMERZZIA_DB_URL=jdbc:mysql://127.0.0.1:3306/comerzzia