You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/specific/locks.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,20 +141,23 @@ On modern releases, RAP draft-enabled business objects manage locking for you: t
141
141
#### 8. Lock-Manager Add-on
142
142
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.
143
143
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 |
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**
159
162
160
163
For the underlying concepts and trade-offs of statefulness, see [Statefulness](./statefulness.md).
0 commit comments