diff --git a/node.js/fiori.md b/node.js/fiori.md index b3b5316fce..be75edf5ff 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 drafts 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: