How sap-samples/event-driven-integrations-codejam works
Project type and purpose
• This repository is a hands-on training (“CodeJam”) for building event-driven integrations on SAP Integration Suite’s Advanced Event Mesh.
• It’s organized as a sequence of exercises that progressively introduce CloudEvents, pub-sub patterns, SDK usage, REST/webhook delivery points, CAP-based consumers, and a final integration adapter.
File structure
• Top-level scaffolding (.devcontainer, Dockerfile, VSCode settings) for a consistent dev environment.
• A “.sap” folder with minimal sample apps demonstrating CloudEvents production and consumption.
• Exercise 08: Node.js CloudEvents SDK emitter & listener
• Exercise 09: REST delivery points/webhooks
• Exercise 10: CAP project (CDS models, srv layer, UI5 front ends) consuming from AMQP
• Exercise 11: AEM-Cloud Integration adapter
• Root files: slides (Marp), prerequisites, troubleshooting, licensing, and a master README describing the overall scenario.
Key insights from the README
• Scenario: ITeLO Entertainment’s ticket-sales website publishes events (“TicketPurchased”, “VIPPackageOrdered”, “BusinessPartnerApproved”).
• These events flow through SAP’s Advanced Event Mesh (broker) topics.
• Multiple downstream services subscribe: PDF-ticket generator, physical delivery service, VIP-package handler, SAP Build Process Automation (for BP approvals), and more.
• Each exercise simulates one part of this pipeline, culminating in cross-broker routing and SAP Cloud Integration.
Components & interactions
a. Producers (left side)
• Ticketing Web App (simulated via sample JSON or CloudEvents SDK)
• VIP-package service
• SAP S/4HANA → sends “BusinessPartnerApproved” events
• CloudEvents SDK demo app (.sap/code/08-cloud-events-sdk)
b. Event Mesh (center)
• SAP Integration Suite, Advanced Event Mesh
• Topics: TicketPurchasedTopic, VIPTopic, BPPApprovedTopic
• Subscriptions: dynamic message routing between brokers
c. Consumers (right side)
• CAP-based AMQP consumer (exercises/10-…/srv/queueConsumer.js)
• PDF-generator microservice (exercises/06)
• REST Delivery Point (exercises/09 → webhook endpoint)
• AEM Cloud Integration Adapter (exercises/11)
• SAP Build Process Automation flow (for BP approvals)
d. Data stores & UIs
• CDS data model and SQLite/HANA instance in CAP project
• UI5 Web UIs for “Consumed Messages” and “Ticket QRCodes” (ex. webapp folders)
e. External systems
• Third-party PDF/print service
• Email/SMS delivery gateway
• SAP Cloud Integration runtime (optional per exercise 11)
Architectural patterns & design principles
• Publish-Subscribe: events published to broker topics; multiple independent subscribers.
• CloudEvents specification: ensures uniform event envelope across producers/consumers.
• CAP (Cloud Application Programming) pattern: CDS-first modeling, srv layer, UI5 front ends.
• Microservices: each exercise implements a small service with a single responsibility.
• Dynamic message routing: exchanges messages between Event Broker instances programmatically.
Technologies, frameworks & libraries
• Node.js (app.js, server.js, topicPublisher.js)
• AMQP client library (queueConsumer.js)
• CloudEvents SDK for JavaScript (exercises/08)
• CAP framework (cds, annotations.cds, service.cds)
• UI5 for Fiori-style UIs (ui5.yaml, Component.js, manifest.json)
• Docker (Dockerfiles in .devcontainer and CAP microservice)