Skip to content

Commit 8e1ff91

Browse files
committed
docs(locks): replace decision tree with overview table
A side-by-side comparison plus a short "start here" list helps the user weigh the eight strategies at a glance.
1 parent 3177d38 commit 8e1ff91

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

docs/development/specific/locks.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,23 @@ On modern releases, RAP draft-enabled business objects manage locking for you: t
141141
#### 8. Lock-Manager Add-on
142142
The community add-on [**lock-manager**](https://github.com/abap2UI5-addons/lock-manager) wraps the lock logic in a reusable class — including stale-lock cleanup and a "locked by X since…" message for the user. Install it like any other [add-on](../../resources/addons.md) and call it instead of writing the boilerplate yourself.
143143

144-
#### Choosing a Strategy
145-
```
146-
Does the app edit data at all?
147-
├── No → render as read-only
148-
└── Yes
149-
├── A released, draft-enabled SAP BO already covers this object?
150-
│ └── RAP Drafts
151-
├── Need "locked by X" feedback at open?
152-
│ ├── Few users, GUI-like feel → Stateful Session
153-
│ └── Many users → Soft Lock + save guard
154-
├── A lock-manager add-on available for your platform?
155-
│ └── Lock-Manager Add-on
156-
└── Default high-scale stateless editing
157-
└── Combined (Lock at Save + Optimistic Check)
158-
```
144+
#### Overview
145+
146+
| # | Strategy | "Locked by X" while editing | Catches external writes | Stateless | Best fit |
147+
|---|---|---|---|---|---|
148+
| 1 | No Locking | no | no | yes | Demos, sandboxes |
149+
| 2 | Lock at Save | no | partial (race window) | yes | Single-app writers, low contention |
150+
| 3 | Optimistic Check | no | yes (timestamp) | yes | Many concurrent users |
151+
| 4 | Combined | no | yes | yes | **Production default** |
152+
| 5 | Stateful Session | yes (enqueue) | yes | no (pins work process) | GUI-like feel, few users |
153+
| 6 | Soft Lock | yes (Z table) | only via underlying guard | yes | "Locked by Alice" UX |
154+
| 7 | RAP Drafts | yes (RAP-managed) | yes | yes | A released draft-enabled BO exists |
155+
| 8 | Lock-Manager Add-on | yes | yes | yes | Skip the boilerplate |
156+
157+
Start with **(4) Combined** unless one of these tips the balance:
158+
- The app is read-only → no lock needed
159+
- A released, draft-enabled SAP BO already covers your object → **(7) RAP Drafts**
160+
- You need a "locked by X since…" message at open → add **(6) Soft Lock** on top of (4), or use **(5) Stateful Session** for few users with a GUI-like feel
161+
- A lock-manager add-on exists for your platform → **(8) Lock-Manager Add-on**
159162

160163
For the underlying concepts and trade-offs of statefulness, see [Statefulness](./statefulness.md).

0 commit comments

Comments
 (0)