From c37dbd77a5596c5a5449d9230717f86dfd3efc1b Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Aug 2026 18:58:24 +0200 Subject: [PATCH 1/9] Add release pipeline --- .github/workflows/release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0366fbc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,13 @@ +name: Deploy to Maven Central + +on: + release: + types: [ "released" ] + +jobs: + release: + uses: cap-java/.github/.github/workflows/release.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 #main + with: + blackduck-project-name: sap.capire.cds-feature-n8n + blackduck-included-modules: cds-feature-n8n + secrets: inherit From b4547691d9171212e8eb7564c2047cfad37a1f73 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Aug 2026 19:02:17 +0200 Subject: [PATCH 2/9] Add missing dependencies in pom.xml that are needed for releasing --- pom.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/pom.xml b/pom.xml index 83ba7e6..c2f4c6f 100644 --- a/pom.xml +++ b/pom.xml @@ -77,6 +77,28 @@ cds-maven-plugin ${cds.services.version} + + maven-source-plugin + 3.4.0 + + + maven-deploy-plugin + 3.1.4 + + + maven-gpg-plugin + 3.2.8 + + + org.sonatype.central + central-publishing-maven-plugin + 0.11.0 + true + + + maven-javadoc-plugin + 3.12.0 + @@ -213,4 +235,40 @@ + + + + deploy-release + + + + maven-gpg-plugin + + + sign-artifacts + + sign + + deploy + + + + + + org.sonatype.central + central-publishing-maven-plugin + + central + + integration-tests-parent + integration-tests + cds-feature-n8n-coverage-report + + + + + + + + From f58f502b6c377bacb17357a042857baa219d949c Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Aug 2026 19:06:40 +0200 Subject: [PATCH 3/9] Adjust CHANGELOG.md --- CHANGELOG.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99cec33..bf84178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,21 +4,18 @@ - The format is based on [Keep a Changelog](https://keepachangelog.com/). - This project adheres to [Semantic Versioning](https://semver.org/). -## Version 1.0.0 - TBD +## Version 0.0.1-alpha ### Added -- Configurable HTTP method per webhook trigger: the `method` property on `@n8n.process.start` entries selects the HTTP verb used when calling the n8n webhook (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`). Defaults to `POST` when omitted — existing annotations are unaffected. The method must match the HTTP Method configured on the corresponding n8n Webhook node. -- BTP destination support: configure `n8n.destination` with a BTP destination name to resolve the n8n base URL and proxy auth headers (e.g. `Authorization: Bearer …`) automatically from the BTP destination service. The destination can also carry the `X-N8N-API-KEY` header for webhook authentication — this way, when the n8n instance changes (URL or key), only the BTP destination needs to be updated; no redeployment of the application is required. Requires `cloudplatform-connectivity` on the classpath (`com.sap.cloud.sdk.cloudplatform:cloudplatform-connectivity`, optional). An explicit `n8n.api-key` always overrides any `X-N8N-API-KEY` from the destination. -- Webhook authentication via `X-N8N-API-KEY`: the plugin sends `X-N8N-API-KEY` on every outbound webhook call. Configure the matching n8n Webhook node with Header Auth (`Name: X-N8N-API-KEY`, `Value: `) to protect individual workflows. The same header name also covers the n8n admin REST API, so one credential serves both purposes. Set via `n8n.api-key` / `N8N_API_KEY`. -- Association path inputs: `inputs` entries like `$self.category.name` now expand one-level to-one associations and include the resolved field in the webhook payload. Supported for DELETE and UPDATE events; CREATE events use the raw request data and do not support association paths. -- `@n8n.process.start.inputs` is now optional. When omitted, all scalar fields of the entity row are sent to n8n automatically. Associations and compositions (which expand as nested objects) are excluded. Explicit `inputs` still work as before for selective or aliased payloads. -- `ConsoleN8NWebhookService`: opt-in offline mode that logs webhook calls instead of making HTTP requests. Enable with `n8n.use-console=true` — no `base-url` required. Each call is stored in memory and accessible via `getExecutions()` for use in tests. Delivery is synchronous and skips the persistent outbox entirely — no rows are written to `cds_outbox_Messages`. -- Profile-aware startup validation: when `n8n.base-url` is missing and the `development` profile is active, the plugin warns and falls back to `http://localhost:5678`. In all other profiles it fails fast at startup with a clear error pointing to `N8N_BASE_URL`. - -### Changed - -- `n8n.base-url` now expects the bare n8n host URL without a `/webhook` suffix (e.g. `http://localhost:5678`). The plugin appends `/webhook` automatically, or `/webhook-test` when `n8n.use-test-webhook=true`. This aligns with the Node.js plugin behaviour. Existing configs that included `/webhook` in the URL need to remove that suffix. -- Upgraded to CAP Java 5.0.0 -- Replaced Spring Retry (`@Retryable`/`@Backoff`) with CAP persistent outbox for reliable n8n webhook delivery -- Updated all modules to use JDK 21, Spring Boot 4.1.0, and CDS Services 5.0.0 +- Annotation-driven n8n webhook triggers via `@n8n.process.start` — no boilerplate service handler code required +- Supports CDS entity events (`CREATE`, `DELETE`) and custom actions/functions as trigger sources +- Configurable HTTP method per trigger (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`) via the `method` property — defaults to `POST` +- Reliable webhook delivery via CAP persistent outbox with configurable retry +- Webhook authentication via `X-N8N-API-KEY` header, configured through `n8n.api-key` / `N8N_API_KEY` +- BTP destination support: configure `n8n.destination` to resolve the n8n base URL and authentication headers from the BTP Destination Service — no redeployment needed when the n8n instance changes +- Optional `inputs` payload selection on `@n8n.process.start`; when omitted, all scalar entity fields are sent automatically +- Association path inputs (e.g. `$self.category.name`) for including resolved to-one association fields in the webhook payload +- `ConsoleN8NWebhookService`: offline/test mode that logs webhook calls instead of making HTTP requests — enable with `n8n.use-console=true` +- Profile-aware startup validation: warns and falls back to `http://localhost:5678` in the `development` profile; fails fast in all other profiles when `n8n.base-url` is not set +- Programmatic API via the `n8n` service for triggering workflows from custom handler code From 0fe6cf5e2701d408af0e777f760254fae4f7dee8 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Aug 2026 19:19:57 +0200 Subject: [PATCH 4/9] Address the bot's comments --- pom.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2f4c6f..028d449 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,31 @@ sign - deploy + verify + + + + + + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + + maven-javadoc-plugin + + + attach-javadocs + + jar + From 9e9ad79478c328700d4e8099d23577e41f465e1e Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Tue, 25 Aug 2026 19:27:40 +0200 Subject: [PATCH 5/9] Add metadata in pom.xml --- pom.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pom.xml b/pom.xml index 028d449..0f41c43 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,28 @@ pom cds-feature-n8n parent + CAP Java plugin that provides annotation-driven n8n webhook triggers for CAP entity events and actions. + https://cap.cloud.sap/docs/plugins/#n8n + + + SAP SE + https://www.sap.com + + + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + SAP SE + https://www.sap.com + + cds-feature-n8n @@ -15,6 +37,12 @@ coverage-report + + scm:git:git@github.com:cap-java/cds-feature-n8n.git + scm:git:git@github.com:cap-java/cds-feature-n8n.git + https://github.com/cap-java/cds-feature-n8n + + central From 6cc912ff95c93c464e86be7078876df66b621bfc Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 26 Aug 2026 14:15:50 +0200 Subject: [PATCH 6/9] Address Marvins comments and adjust folder structure --- .github/workflows/release.yml | 2 +- README.md | 2 +- cds-feature-n8n/pom.xml | 2 +- .../configuration/N8nAutoConfiguration.java | 29 ++++++++++--------- .../n8n}/handlers/N8nAnnotationValidator.java | 2 +- .../cds/feature/n8n}/handlers/N8nHandler.java | 10 +++---- .../n8n}/handlers/N8nOutboxHandler.java | 4 +-- .../n8n}/handlers/N8nServiceHandler.java | 16 +++++----- .../services/ConsoleN8NWebhookService.java | 2 +- .../cds/feature/n8n}/services/N8nService.java | 2 +- .../feature/n8n}/services/N8nServiceImpl.java | 4 +-- .../n8n}/services/N8nWebhookService.java | 4 +-- .../n8n}/utils/ConditionEvaluator.java | 2 +- .../feature/n8n}/utils/InputExtractor.java | 2 +- ...ot.autoconfigure.AutoConfiguration.imports | 2 +- .../N8nAutoConfigurationTest.java | 14 ++++----- .../handlers/N8nAnnotationValidatorTest.java | 2 +- .../feature/n8n}/handlers/N8nHandlerTest.java | 6 ++-- .../n8n}/handlers/N8nOutboxHandlerTest.java | 4 +-- .../n8n}/handlers/N8nServiceHandlerTest.java | 6 ++-- .../ConsoleN8NWebhookServiceTest.java | 2 +- .../services/N8nWebhookServiceRetryIT.java | 2 +- .../n8n}/utils/ConditionEvaluatorTest.java | 2 +- .../n8n}/utils/InputExtractorTest.java | 2 +- coverage-report/pom.xml | 4 +-- integration-tests/pom.xml | 2 +- integration-tests/srv/pom.xml | 2 +- .../N8nConsoleIntegrationTest.java | 4 +-- .../N8nDraftIntegrationTest.java | 2 +- pom.xml | 2 +- samples/bookshop/pom.xml | 2 +- samples/bookshop/srv/pom.xml | 4 +-- .../handlers/AdminServiceHandler.java | 2 +- 33 files changed, 75 insertions(+), 74 deletions(-) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/configuration/N8nAutoConfiguration.java (93%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nAnnotationValidator.java (98%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nHandler.java (97%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nOutboxHandler.java (97%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nServiceHandler.java (82%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/ConsoleN8NWebhookService.java (97%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/N8nService.java (97%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/N8nServiceImpl.java (90%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/N8nWebhookService.java (96%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/utils/ConditionEvaluator.java (99%) rename cds-feature-n8n/src/main/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/utils/InputExtractor.java (99%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/configuration/N8nAutoConfigurationTest.java (95%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nAnnotationValidatorTest.java (99%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nHandlerTest.java (99%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nOutboxHandlerTest.java (96%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/handlers/N8nServiceHandlerTest.java (94%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/ConsoleN8NWebhookServiceTest.java (98%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/services/N8nWebhookServiceRetryIT.java (99%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/utils/ConditionEvaluatorTest.java (99%) rename cds-feature-n8n/src/test/java/{sap/capire/n8n_plugin => com/sap/cds/feature/n8n}/utils/InputExtractorTest.java (99%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0366fbc..b95a9ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,6 @@ jobs: release: uses: cap-java/.github/.github/workflows/release.yml@b5eb1ad6341e9fd1d681c42f3b36c4b750a7dac2 #main with: - blackduck-project-name: sap.capire.cds-feature-n8n + blackduck-project-name: com.sap.cds.feature.n8n blackduck-included-modules: cds-feature-n8n secrets: inherit diff --git a/README.md b/README.md index e4c5825..41576bc 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ mvn clean install ```xml - sap.capire + com.sap.cds cds-feature-n8n 0.0.1-alpha diff --git a/cds-feature-n8n/pom.xml b/cds-feature-n8n/pom.xml index 5a94f24..75c9bfe 100644 --- a/cds-feature-n8n/pom.xml +++ b/cds-feature-n8n/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - sap.capire + com.sap.cds cds-feature-n8n-parent ${revision} diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/configuration/N8nAutoConfiguration.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfiguration.java similarity index 93% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/configuration/N8nAutoConfiguration.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfiguration.java index 6c7890d..ce8e18c 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/configuration/N8nAutoConfiguration.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfiguration.java @@ -1,8 +1,16 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.configuration; - +package com.sap.cds.feature.n8n.configuration; + +import com.sap.cds.feature.n8n.handlers.N8nAnnotationValidator; +import com.sap.cds.feature.n8n.handlers.N8nHandler; +import com.sap.cds.feature.n8n.handlers.N8nOutboxHandler; +import com.sap.cds.feature.n8n.handlers.N8nServiceHandler; +import com.sap.cds.feature.n8n.services.ConsoleN8NWebhookService; +import com.sap.cds.feature.n8n.services.N8nService; +import com.sap.cds.feature.n8n.services.N8nServiceImpl; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.reflect.CdsModel; import com.sap.cds.services.outbox.OutboxService; import com.sap.cds.services.persistence.PersistenceService; @@ -22,22 +30,15 @@ import org.springframework.core.env.Environment; import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.web.client.RestClient; -import sap.capire.n8n_plugin.handlers.N8nAnnotationValidator; -import sap.capire.n8n_plugin.handlers.N8nHandler; -import sap.capire.n8n_plugin.handlers.N8nOutboxHandler; -import sap.capire.n8n_plugin.handlers.N8nServiceHandler; -import sap.capire.n8n_plugin.services.ConsoleN8NWebhookService; -import sap.capire.n8n_plugin.services.N8nService; -import sap.capire.n8n_plugin.services.N8nServiceImpl; -import sap.capire.n8n_plugin.services.N8nWebhookService; /** * Spring Boot auto-configuration for the cds-feature-n8n plugin. * - *

Registers all plugin beans ({@link sap.capire.n8n_plugin.services.N8nWebhookService}, {@link - * sap.capire.n8n_plugin.handlers.N8nOutboxHandler}, {@link - * sap.capire.n8n_plugin.handlers.N8nHandler}, {@link sap.capire.n8n_plugin.services.N8nService}, - * {@link sap.capire.n8n_plugin.handlers.N8nServiceHandler}) and binds plugin configuration from the + *

Registers all plugin beans ({@link com.sap.cds.feature.n8n.services.N8nWebhookService}, {@link + * com.sap.cds.feature.n8n.handlers.N8nOutboxHandler}, {@link + * com.sap.cds.feature.n8n.handlers.N8nHandler}, {@link + * com.sap.cds.feature.n8n.services.N8nService}, {@link + * com.sap.cds.feature.n8n.handlers.N8nServiceHandler}) and binds plugin configuration from the * {@code n8n.*} namespace. */ @Configuration diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidator.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidator.java similarity index 98% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidator.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidator.java index 25e8769..854a76e 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidator.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidator.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; import com.sap.cds.reflect.CdsModel; import java.util.List; diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nHandler.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nHandler.java similarity index 97% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nHandler.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nHandler.java index b4d7b3a..beac40e 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nHandler.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nHandler.java @@ -1,8 +1,12 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.N8nProperties; +import com.sap.cds.feature.n8n.services.N8nWebhookService; +import com.sap.cds.feature.n8n.utils.ConditionEvaluator; +import com.sap.cds.feature.n8n.utils.InputExtractor; import com.sap.cds.ql.Select; import com.sap.cds.ql.Selectable; import com.sap.cds.ql.StructuredType; @@ -28,10 +32,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpMethod; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.N8nProperties; -import sap.capire.n8n_plugin.services.N8nWebhookService; -import sap.capire.n8n_plugin.utils.ConditionEvaluator; -import sap.capire.n8n_plugin.utils.InputExtractor; /** * CAP event handler that detects {@code @n8n.process.start} annotations and queues webhook calls. diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandler.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandler.java similarity index 97% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandler.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandler.java index 27e4db4..b3d230d 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandler.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandler.java @@ -1,8 +1,9 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.services.handler.EventHandler; import com.sap.cds.services.handler.annotations.On; import com.sap.cds.services.handler.annotations.ServiceName; @@ -13,7 +14,6 @@ import org.springframework.http.HttpMethod; import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.client.ResourceAccessException; -import sap.capire.n8n_plugin.services.N8nWebhookService; /** * CAP outbox handler that delivers queued n8n webhook calls over HTTP. diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nServiceHandler.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandler.java similarity index 82% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nServiceHandler.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandler.java index e4a5d4d..890995c 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/handlers/N8nServiceHandler.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandler.java @@ -1,8 +1,11 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.N8nProperties; +import com.sap.cds.feature.n8n.services.N8nService; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.services.EventContext; import com.sap.cds.services.handler.EventHandler; import com.sap.cds.services.handler.annotations.On; @@ -11,16 +14,13 @@ import com.sap.cds.services.outbox.OutboxService; import java.util.Map; import org.springframework.http.HttpMethod; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.N8nProperties; -import sap.capire.n8n_plugin.services.N8nService; -import sap.capire.n8n_plugin.services.N8nWebhookService; /** - * CAP event handler that bridges {@link sap.capire.n8n_plugin.services.N8nService#trigger} calls to - * the persistent outbox. + * CAP event handler that bridges {@link com.sap.cds.feature.n8n.services.N8nService#trigger} calls + * to the persistent outbox. * *

Listens on the {@code N8nService} CAP service for the {@code trigger} event emitted by {@link - * sap.capire.n8n_plugin.services.N8nServiceImpl}. The actual HTTP call to n8n happens in {@link + * com.sap.cds.feature.n8n.services.N8nServiceImpl}. The actual HTTP call to n8n happens in {@link * N8nOutboxHandler} after the transaction commits. */ @ServiceName(N8nService.DEFAULT_NAME) @@ -51,7 +51,7 @@ public N8nServiceHandler( * N8nWebhookService#notify}; otherwise submits an outbox message for deferred HTTP delivery. * * @param ctx event context carrying {@code path} and {@code data} set by {@link - * sap.capire.n8n_plugin.services.N8nServiceImpl#trigger} + * com.sap.cds.feature.n8n.services.N8nServiceImpl#trigger} */ @On(event = "trigger") public void onTrigger(EventContext ctx) { diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookService.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookService.java similarity index 97% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookService.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookService.java index 55db78d..c334882 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookService.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookService.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import java.time.Instant; import java.util.ArrayList; diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nService.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nService.java similarity index 97% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nService.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nService.java index 8aa0606..088d61b 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nService.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nService.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import com.sap.cds.services.Service; import java.util.Map; diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nServiceImpl.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nServiceImpl.java similarity index 90% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nServiceImpl.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nServiceImpl.java index e7994dd..13bb6c6 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nServiceImpl.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nServiceImpl.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import com.sap.cds.services.EventContext; import com.sap.cds.services.ServiceDelegator; @@ -25,7 +25,7 @@ public N8nServiceImpl(String name) { /** * Emits a {@code trigger} event on the CAP event bus carrying {@code path}, {@code method}, and - * {@code data}. {@link sap.capire.n8n_plugin.handlers.N8nServiceHandler} listens for this event + * {@code data}. {@link com.sap.cds.feature.n8n.handlers.N8nServiceHandler} listens for this event * and forwards it to the outbox. */ @Override diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nWebhookService.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nWebhookService.java similarity index 96% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nWebhookService.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nWebhookService.java index 53c50dc..5beecb3 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/services/N8nWebhookService.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/services/N8nWebhookService.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import java.util.Collections; import java.util.Map; @@ -18,7 +18,7 @@ *

Sends a {@code POST} to {@code baseUrl/path} with the payload as JSON. Auth headers are * layered in order: {@code authHeaders} first (e.g. {@code Authorization: Bearer …} from a BTP * destination), then {@code X-N8N-API-KEY}. Constructed by {@link - * sap.capire.n8n_plugin.configuration.N8nAutoConfiguration} with pre-configured timeouts. + * com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration} with pre-configured timeouts. */ public class N8nWebhookService { diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/ConditionEvaluator.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/ConditionEvaluator.java similarity index 99% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/ConditionEvaluator.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/ConditionEvaluator.java index 3ff480f..7335aac 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/ConditionEvaluator.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/ConditionEvaluator.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.utils; +package com.sap.cds.feature.n8n.utils; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Collection; diff --git a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/InputExtractor.java b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/InputExtractor.java similarity index 99% rename from cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/InputExtractor.java rename to cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/InputExtractor.java index ba56e80..44dcdc3 100644 --- a/cds-feature-n8n/src/main/java/sap/capire/n8n_plugin/utils/InputExtractor.java +++ b/cds-feature-n8n/src/main/java/com/sap/cds/feature/n8n/utils/InputExtractor.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.utils; +package com.sap.cds.feature.n8n.utils; import com.sap.cds.ql.CQL; import com.sap.cds.ql.Selectable; diff --git a/cds-feature-n8n/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/cds-feature-n8n/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 7b98c26..013281e 100644 --- a/cds-feature-n8n/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/cds-feature-n8n/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -sap.capire.n8n_plugin.configuration.N8nAutoConfiguration +com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/configuration/N8nAutoConfigurationTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfigurationTest.java similarity index 95% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/configuration/N8nAutoConfigurationTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfigurationTest.java index 373de6f..44d807d 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/configuration/N8nAutoConfigurationTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/configuration/N8nAutoConfigurationTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.configuration; +package com.sap.cds.feature.n8n.configuration; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; @@ -10,6 +10,12 @@ import static org.mockito.Mockito.mockStatic; import static org.mockito.Mockito.when; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.DestinationConfiguration; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.N8nProperties; +import com.sap.cds.feature.n8n.handlers.N8nHandler; +import com.sap.cds.feature.n8n.handlers.N8nServiceHandler; +import com.sap.cds.feature.n8n.services.ConsoleN8NWebhookService; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.services.persistence.PersistenceService; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor; @@ -27,12 +33,6 @@ import org.springframework.core.env.SystemEnvironmentPropertySource; import org.springframework.mock.env.MockEnvironment; import org.springframework.web.client.RestClient; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.DestinationConfiguration; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.N8nProperties; -import sap.capire.n8n_plugin.handlers.N8nHandler; -import sap.capire.n8n_plugin.handlers.N8nServiceHandler; -import sap.capire.n8n_plugin.services.ConsoleN8NWebhookService; -import sap.capire.n8n_plugin.services.N8nWebhookService; class N8nAutoConfigurationTest { diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidatorTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidatorTest.java similarity index 99% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidatorTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidatorTest.java index 76253a8..0e088c3 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nAnnotationValidatorTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nAnnotationValidatorTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nHandlerTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nHandlerTest.java similarity index 99% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nHandlerTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nHandlerTest.java index 759c624..856973f 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nHandlerTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nHandlerTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -10,6 +10,8 @@ import com.sap.cds.CdsData; import com.sap.cds.Result; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.N8nProperties; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.ql.cqn.CqnInsert; import com.sap.cds.ql.cqn.CqnSelect; import com.sap.cds.ql.cqn.CqnUpdate; @@ -37,8 +39,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.http.HttpMethod; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.N8nProperties; -import sap.capire.n8n_plugin.services.N8nWebhookService; @ExtendWith(MockitoExtension.class) class N8nHandlerTest { diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandlerTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandlerTest.java similarity index 96% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandlerTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandlerTest.java index 795cf97..2ba37ef 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nOutboxHandlerTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nOutboxHandlerTest.java @@ -1,11 +1,12 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.*; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.services.outbox.OutboxMessage; import com.sap.cds.services.outbox.OutboxMessageEventContext; import java.util.Map; @@ -21,7 +22,6 @@ import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.HttpServerErrorException; import org.springframework.web.client.ResourceAccessException; -import sap.capire.n8n_plugin.services.N8nWebhookService; @ExtendWith(MockitoExtension.class) class N8nOutboxHandlerTest { diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nServiceHandlerTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandlerTest.java similarity index 94% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nServiceHandlerTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandlerTest.java index 3ead49e..a9f956f 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/handlers/N8nServiceHandlerTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/handlers/N8nServiceHandlerTest.java @@ -1,13 +1,15 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.handlers; +package com.sap.cds.feature.n8n.handlers; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; +import com.sap.cds.feature.n8n.configuration.N8nAutoConfiguration.N8nProperties; +import com.sap.cds.feature.n8n.services.N8nWebhookService; import com.sap.cds.services.EventContext; import com.sap.cds.services.outbox.OutboxMessage; import com.sap.cds.services.outbox.OutboxService; @@ -20,8 +22,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.http.HttpMethod; -import sap.capire.n8n_plugin.configuration.N8nAutoConfiguration.N8nProperties; -import sap.capire.n8n_plugin.services.N8nWebhookService; @ExtendWith(MockitoExtension.class) class N8nServiceHandlerTest { diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookServiceTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookServiceTest.java similarity index 98% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookServiceTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookServiceTest.java index bd64736..9164299 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/ConsoleN8NWebhookServiceTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/ConsoleN8NWebhookServiceTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/N8nWebhookServiceRetryIT.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/N8nWebhookServiceRetryIT.java similarity index 99% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/N8nWebhookServiceRetryIT.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/N8nWebhookServiceRetryIT.java index 32d8846..07690f3 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/services/N8nWebhookServiceRetryIT.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/services/N8nWebhookServiceRetryIT.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.services; +package com.sap.cds.feature.n8n.services; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/ConditionEvaluatorTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/ConditionEvaluatorTest.java similarity index 99% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/ConditionEvaluatorTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/ConditionEvaluatorTest.java index 874127c..3444e06 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/ConditionEvaluatorTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/ConditionEvaluatorTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.utils; +package com.sap.cds.feature.n8n.utils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/InputExtractorTest.java b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/InputExtractorTest.java similarity index 99% rename from cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/InputExtractorTest.java rename to cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/InputExtractorTest.java index 2db9d34..ec7589f 100644 --- a/cds-feature-n8n/src/test/java/sap/capire/n8n_plugin/utils/InputExtractorTest.java +++ b/cds-feature-n8n/src/test/java/com/sap/cds/feature/n8n/utils/InputExtractorTest.java @@ -1,7 +1,7 @@ /* * © 2026 SAP SE or an SAP affiliate company and cds-feature-n8n contributors. */ -package sap.capire.n8n_plugin.utils; +package com.sap.cds.feature.n8n.utils; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/coverage-report/pom.xml b/coverage-report/pom.xml index 68c9351..de3f943 100644 --- a/coverage-report/pom.xml +++ b/coverage-report/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - sap.capire + com.sap.cds cds-feature-n8n-parent ${revision} @@ -17,7 +17,7 @@ - sap.capire + com.sap.cds cds-feature-n8n ${revision} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 2dd2ead..3dc8309 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - sap.capire + com.sap.cds cds-feature-n8n-parent ${revision} diff --git a/integration-tests/srv/pom.xml b/integration-tests/srv/pom.xml index 944db31..84adbc5 100644 --- a/integration-tests/srv/pom.xml +++ b/integration-tests/srv/pom.xml @@ -49,7 +49,7 @@ - sap.capire + com.sap.cds cds-feature-n8n ${revision} diff --git a/integration-tests/srv/src/test/java/integrationtest/N8nConsoleIntegrationTest.java b/integration-tests/srv/src/test/java/integrationtest/N8nConsoleIntegrationTest.java index 2357442..d15e3d1 100644 --- a/integration-tests/srv/src/test/java/integrationtest/N8nConsoleIntegrationTest.java +++ b/integration-tests/srv/src/test/java/integrationtest/N8nConsoleIntegrationTest.java @@ -12,6 +12,8 @@ import cds.gen.testservice.Orders; import cds.gen.testservice.Orders_; import cds.gen.testservice.TestService_; +import com.sap.cds.feature.n8n.services.ConsoleN8NWebhookService; +import com.sap.cds.feature.n8n.services.N8nService; import com.sap.cds.ql.Delete; import com.sap.cds.ql.Insert; import com.sap.cds.services.cds.CqnService; @@ -24,8 +26,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.TestPropertySource; -import sap.capire.n8n_plugin.services.ConsoleN8NWebhookService; -import sap.capire.n8n_plugin.services.N8nService; @SpringBootTest(classes = app.Application.class) @WithMockUser(username = "admin", roles = "admin") diff --git a/integration-tests/srv/src/test/java/integrationtest/N8nDraftIntegrationTest.java b/integration-tests/srv/src/test/java/integrationtest/N8nDraftIntegrationTest.java index bccb553..6926bc4 100644 --- a/integration-tests/srv/src/test/java/integrationtest/N8nDraftIntegrationTest.java +++ b/integration-tests/srv/src/test/java/integrationtest/N8nDraftIntegrationTest.java @@ -12,6 +12,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; +import com.sap.cds.feature.n8n.services.ConsoleN8NWebhookService; import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -23,7 +24,6 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import sap.capire.n8n_plugin.services.ConsoleN8NWebhookService; /** * Verifies that @n8n.process.start on a draft-enabled entity fires exactly once — on draftActivate, diff --git a/pom.xml b/pom.xml index 0f41c43..690df4f 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - sap.capire + com.sap.cds cds-feature-n8n-parent ${revision} pom diff --git a/samples/bookshop/pom.xml b/samples/bookshop/pom.xml index 747338c..bc0b7d5 100644 --- a/samples/bookshop/pom.xml +++ b/samples/bookshop/pom.xml @@ -49,7 +49,7 @@ - sap.capire + com.sap.cds cds-feature-n8n 0.0.1-alpha diff --git a/samples/bookshop/srv/pom.xml b/samples/bookshop/srv/pom.xml index 83cea2e..e365a62 100644 --- a/samples/bookshop/srv/pom.xml +++ b/samples/bookshop/srv/pom.xml @@ -32,7 +32,7 @@ - sap.capire + com.sap.cds cds-feature-n8n @@ -159,4 +159,4 @@ - \ No newline at end of file + diff --git a/samples/bookshop/srv/src/main/java/customer/bookshop/handlers/AdminServiceHandler.java b/samples/bookshop/srv/src/main/java/customer/bookshop/handlers/AdminServiceHandler.java index ba7c08d..70bd43c 100644 --- a/samples/bookshop/srv/src/main/java/customer/bookshop/handlers/AdminServiceHandler.java +++ b/samples/bookshop/srv/src/main/java/customer/bookshop/handlers/AdminServiceHandler.java @@ -19,7 +19,7 @@ import cds.gen.adminservice.Books; import cds.gen.adminservice.ConfirmBookCreationContext; import cds.gen.adminservice.ConfirmBookDeletionContext; -import sap.capire.n8n_plugin.services.N8nService; +import com.sap.cds.feature.n8n.services.N8nService; @Component @ServiceName(AdminService_.CDS_NAME) From 4c5812e6aefc6e97b8893e4a3d1497932d955d26 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 26 Aug 2026 15:45:35 +0200 Subject: [PATCH 7/9] Rename first version from 0.0.1-alpha to 0.0.1 --- CHANGELOG.md | 2 +- README.md | 2 +- pom.xml | 2 +- samples/bookshop/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf84178..60af905 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - The format is based on [Keep a Changelog](https://keepachangelog.com/). - This project adheres to [Semantic Versioning](https://semver.org/). -## Version 0.0.1-alpha +## Version 0.0.1 ### Added diff --git a/README.md b/README.md index 41576bc..347c0c3 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ mvn clean install com.sap.cds cds-feature-n8n - 0.0.1-alpha + 0.0.1 ``` diff --git a/pom.xml b/pom.xml index 690df4f..2b1dbe6 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ - 0.0.1-alpha + 0.0.1 21 diff --git a/samples/bookshop/pom.xml b/samples/bookshop/pom.xml index bc0b7d5..482a7d6 100644 --- a/samples/bookshop/pom.xml +++ b/samples/bookshop/pom.xml @@ -51,7 +51,7 @@ com.sap.cds cds-feature-n8n - 0.0.1-alpha + 0.0.1 From 35482db9c53638324c600491ec81027b6a9d4264 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 26 Aug 2026 15:56:43 +0200 Subject: [PATCH 8/9] Adjust CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60af905..5d2e3db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,12 @@ ### Added - Annotation-driven n8n webhook triggers via `@n8n.process.start` — no boilerplate service handler code required -- Supports CDS entity events (`CREATE`, `DELETE`) and custom actions/functions as trigger sources +- Supports CDS entity events (`CREATE`, `READ`, `UPDATE`, `DELETE`) and custom actions/functions as trigger sources - Configurable HTTP method per trigger (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`) via the `method` property — defaults to `POST` - Reliable webhook delivery via CAP persistent outbox with configurable retry - Webhook authentication via `X-N8N-API-KEY` header, configured through `n8n.api-key` / `N8N_API_KEY` - BTP destination support: configure `n8n.destination` to resolve the n8n base URL and authentication headers from the BTP Destination Service — no redeployment needed when the n8n instance changes -- Optional `inputs` payload selection on `@n8n.process.start`; when omitted, all scalar entity fields are sent automatically +- Optional `inputs` payload selection on `@n8n.process.start`; when omitted, all direct entity fields are sent automatically - Association path inputs (e.g. `$self.category.name`) for including resolved to-one association fields in the webhook payload - `ConsoleN8NWebhookService`: offline/test mode that logs webhook calls instead of making HTTP requests — enable with `n8n.use-console=true` - Profile-aware startup validation: warns and falls back to `http://localhost:5678` in the `development` profile; fails fast in all other profiles when `n8n.base-url` is not set From 4294abc08533eed078c1757aef9b29afbe102b31 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 26 Aug 2026 16:53:59 +0200 Subject: [PATCH 9/9] Add comment about n8n base url to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d2e3db..397cdbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,4 +18,5 @@ - Association path inputs (e.g. `$self.category.name`) for including resolved to-one association fields in the webhook payload - `ConsoleN8NWebhookService`: offline/test mode that logs webhook calls instead of making HTTP requests — enable with `n8n.use-console=true` - Profile-aware startup validation: warns and falls back to `http://localhost:5678` in the `development` profile; fails fast in all other profiles when `n8n.base-url` is not set +- `n8n.base-url` expects the bare n8n host (e.g. `http://localhost:5678`) — the plugin appends `/webhook` automatically, or `/webhook-test` when `n8n.use-test-webhook=true` - Programmatic API via the `n8n` service for triggering workflows from custom handler code