From c0333ef890b892aa9193e58587f1767910cb86ce Mon Sep 17 00:00:00 2001 From: Robin de Silva Jayasinghe Date: Tue, 9 Jun 2026 08:18:29 +0200 Subject: [PATCH 1/3] add docu snipped for draftPrepare with =DraftMessages --- java/fiori-drafts.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/java/fiori-drafts.md b/java/fiori-drafts.md index a0fe1058b9..0ddedc5370 100644 --- a/java/fiori-drafts.md +++ b/java/fiori-drafts.md @@ -73,13 +73,14 @@ Draft-enabled entities have an extra key `IsActiveEntity` by which you can acces | HTTP / OData request | Event constant name | Default implementation | | ---------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | POST with `IsActiveEntity=false` in payload | `DraftService.EVENT_DRAFT_NEW` | Creates a new empty draft. Internally triggers `DRAFT_CREATE`. | -| POST (no `IsActiveEntity`) on entity *without* `draftNew` action | `DraftService.EVENT_DRAFT_NEW` | Creates a new empty draft. Internally triggers `DRAFT_CREATE`. | -| POST (no `IsActiveEntity`) on entity *with* `draftNew` action | `CqnService.EVENT_CREATE` | Creates a new active entity. | +| POST (no `IsActiveEntity`) on entity *without* `draftNew` action | `DraftService.EVENT_DRAFT_NEW` | Creates a new empty draft. Internally triggers `DRAFT_CREATE`. | +| POST (no `IsActiveEntity`) on entity *with* `draftNew` action | `CqnService.EVENT_CREATE` | Creates a new active entity. | | POST with action `draftNew` | `DraftService.EVENT_DRAFT_NEW` | Creates a new empty draft. Internally triggers `DRAFT_CREATE`. | -| PATCH with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_PATCH` | Updates an existing draft. | -| DELETE with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_CANCEL` | Deletes an existing draft. | -| DELETE with key `IsActiveEntity=true` | `CqnService.EVENT_DELETE` | Deletes an active entity *and* the corresponding draft. | -| POST with `draftPrepare` action | `DraftService.EVENT_DRAFT_PREPARE` | Empty implementation. | +| PATCH with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_PATCH` | Updates an existing draft. | +| DELETE with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_CANCEL` | Deletes an existing draft. | +| DELETE with key `IsActiveEntity=true` | `CqnService.EVENT_DELETE` | Deletes an active entity *and* the corresponding draft. | +| POST with `draftPrepare` action | `DraftService.EVENT_DRAFT_PREPARE` | Empty implementation. | +| POST with `draftPrepare` action and `$select=DraftMessages` | `DraftService.EVENT_CREATE` | Creates a new active entity including all handlers and validations but ultimately performs a transaction rollback. | | POST with `draftEdit` action | `DraftService.EVENT_DRAFT_EDIT` | Creates a new draft from an active entity. Internally triggers `DRAFT_CREATE`. | | POST with `draftActivate` action | `DraftService.EVENT_DRAFT_SAVE` | Activates a draft and updates the active entity. Triggers an `CREATE` or `UPDATE` event on the affected entity. | | n/a | `DraftService.EVENT_DRAFT_CREATE` | Stores a new draft in the database. | From 5ec872587abe95855c6e138e119e611c7e66694d Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 9 Jun 2026 13:49:41 +0200 Subject: [PATCH 2/3] Update java/fiori-drafts.md Co-authored-by: Marc Becker --- java/fiori-drafts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/fiori-drafts.md b/java/fiori-drafts.md index 0ddedc5370..4a6cc50057 100644 --- a/java/fiori-drafts.md +++ b/java/fiori-drafts.md @@ -80,7 +80,7 @@ Draft-enabled entities have an extra key `IsActiveEntity` by which you can acces | DELETE with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_CANCEL` | Deletes an existing draft. | | DELETE with key `IsActiveEntity=true` | `CqnService.EVENT_DELETE` | Deletes an active entity *and* the corresponding draft. | | POST with `draftPrepare` action | `DraftService.EVENT_DRAFT_PREPARE` | Empty implementation. | -| POST with `draftPrepare` action and `$select=DraftMessages` | `DraftService.EVENT_CREATE` | Creates a new active entity including all handlers and validations but ultimately performs a transaction rollback. | +| POST with `draftPrepare` action and `$select=DraftMessages` | `DraftService.EVENT_DRAFT_PREPARE` | Simulates the draft activation to ensure complete validation of the document. It triggers a `draftActivate` (internally runs a `CREATE` or `UPDATE` event) in an isolated transaction, which is ultimately rolled back. | | POST with `draftEdit` action | `DraftService.EVENT_DRAFT_EDIT` | Creates a new draft from an active entity. Internally triggers `DRAFT_CREATE`. | | POST with `draftActivate` action | `DraftService.EVENT_DRAFT_SAVE` | Activates a draft and updates the active entity. Triggers an `CREATE` or `UPDATE` event on the affected entity. | | n/a | `DraftService.EVENT_DRAFT_CREATE` | Stores a new draft in the database. | From 0fce7ab7aa360c44663c3b8bdbbdc1a92a9cf887 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 9 Jun 2026 21:02:34 +0200 Subject: [PATCH 3/3] Update java/fiori-drafts.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- java/fiori-drafts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/fiori-drafts.md b/java/fiori-drafts.md index 4a6cc50057..c43be132b7 100644 --- a/java/fiori-drafts.md +++ b/java/fiori-drafts.md @@ -80,7 +80,7 @@ Draft-enabled entities have an extra key `IsActiveEntity` by which you can acces | DELETE with key `IsActiveEntity=false` | `DraftService.EVENT_DRAFT_CANCEL` | Deletes an existing draft. | | DELETE with key `IsActiveEntity=true` | `CqnService.EVENT_DELETE` | Deletes an active entity *and* the corresponding draft. | | POST with `draftPrepare` action | `DraftService.EVENT_DRAFT_PREPARE` | Empty implementation. | -| POST with `draftPrepare` action and `$select=DraftMessages` | `DraftService.EVENT_DRAFT_PREPARE` | Simulates the draft activation to ensure complete validation of the document. It triggers a `draftActivate` (internally runs a `CREATE` or `UPDATE` event) in an isolated transaction, which is ultimately rolled back. | +| POST with `draftPrepare` action and `$select=DraftMessages` | `DraftService.EVENT_DRAFT_PREPARE` | Simulates the draft activation to validate your document completely. The system triggers a `draftActivate` operation in an isolated transaction and then rolls it back. | | POST with `draftEdit` action | `DraftService.EVENT_DRAFT_EDIT` | Creates a new draft from an active entity. Internally triggers `DRAFT_CREATE`. | | POST with `draftActivate` action | `DraftService.EVENT_DRAFT_SAVE` | Activates a draft and updates the active entity. Triggers an `CREATE` or `UPDATE` event on the affected entity. | | n/a | `DraftService.EVENT_DRAFT_CREATE` | Stores a new draft in the database. |