Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions java/fiori-drafts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_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. |
Expand Down
Loading