From 1430f95b257504ad2719c6fe8580596f9259b402 Mon Sep 17 00:00:00 2001 From: Rene Jeglinsky Date: Wed, 16 Jul 2025 10:58:13 +0200 Subject: [PATCH 1/2] add tip and reorder --- node.js/fiori.md | 53 +++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/node.js/fiori.md b/node.js/fiori.md index b3b5316fce..c19c906249 100644 --- a/node.js/fiori.md +++ b/node.js/fiori.md @@ -77,8 +77,35 @@ You can set the property to one of the following: - number of minutes like `'10min'` - number of milliseconds like `1000` -### Bypassing the SAP Fiori Draft Flow +:::tip Delete released draft locks +If the `draft_lock_timeout` has been reached, every user can delete other users' drafts to create an own draft. There can't be two draft at the same time on the same entity. +::: + +### Garbage Collection of Stale Drafts + +Inactive drafts are deleted automatically after the default timeout of 30 days. You can configure or deactivate this timeout by the following configuration: + +```json +{ + "cds": { + "fiori": { + "draft_deletion_timeout": "28d" + } + } +} +``` + +You can set the property to one of the following: +- `false` in order to deactivate the timeout +- number of days like `'30d'` +- number of hours like `'72h'` +- number of milliseconds like `1000` + +::: info Technical background +It can occur that inactive drafts are still in the database after the configured timeout. The deletion is implemented as a side effect of creating new drafts and there's no periodic job that does the garbage collection. +::: +### Bypassing the SAP Fiori Draft Flow Creating or modifying active instances directly is possible without creating drafts. This comes in handy when technical services without a UI interact with each other. To enable this feature, set this feature flag in your configuration: @@ -122,30 +149,6 @@ Note that this feature creates additional entry points to your application. Cust payloads rather than the complete business object. ::: -### Garbage Collection of Stale Drafts - -Inactive drafts are deleted automatically after the default timeout of 30 days. You can configure or deactivate this timeout by the following configuration: - -```json -{ - "cds": { - "fiori": { - "draft_deletion_timeout": "28d" - } - } -} -``` - -You can set the property to one of the following: -- `false` in order to deactivate the timeout -- number of days like `'30d'` -- number of hours like `'72h'` -- number of milliseconds like `1000` - -::: info Technical background -It can occur that inactive drafts are still in the database after the configured timeout. The deletion is implemented as a side effect of creating new drafts and there's no periodic job that does the garbage collection. -::: - ### Differences to Previous Version - Draft-enabled entities have corresponding CSN entities for drafts: From 112e44d420f3651f707695516c443d432a7de8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jeglinsky?= Date: Thu, 17 Jul 2025 16:04:57 +0200 Subject: [PATCH 2/2] Update node.js/fiori.md --- node.js/fiori.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.js/fiori.md b/node.js/fiori.md index c19c906249..be75edf5ff 100644 --- a/node.js/fiori.md +++ b/node.js/fiori.md @@ -78,7 +78,7 @@ You can set the property to one of the following: - number of milliseconds like `1000` :::tip Delete released draft locks -If the `draft_lock_timeout` has been reached, every user can delete other users' drafts to create an own draft. There can't be two draft at the same time on the same entity. +If the `draft_lock_timeout` has been reached, every user can delete other users' drafts to create an own draft. There can't be two drafts at the same time on the same entity. ::: ### Garbage Collection of Stale Drafts