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
| <spanclassName="label-highlight yellow">Deprecated</span> |[Deprecated: enum literals in Orchestration Cluster API v2](#deprecated-enum)|
74
74
75
75
## Breaking changes
@@ -431,6 +431,48 @@ If your code parses error response bodies from search endpoints for specific val
431
431
- The `detail` field now contains more descriptive, structured messages.
432
432
- A collection of validation errors in the response body (instead of a single error message).
433
433
434
+
### Type-safe pagination model in the Camunda Java client {#type-safe-pagination}
435
+
436
+
#### Change
437
+
438
+
The Camunda Java client now uses type-safe pagination interfaces (`AnyPage`, `OffsetPage`, `CursorForwardPage`, `CursorBackwardPage`) instead of the previous `SearchRequestPage` class. Each search or statistics endpoint exposes only the pagination methods it actually supports.
439
+
440
+
Direction methods on `AnyPage` now return style-specific interfaces: `from()` returns `OffsetPage`, `after()` returns `CursorForwardPage`, and `before()` returns `CursorBackwardPage`. This prevents mixing incompatible pagination styles at compile time.
441
+
442
+
#### Why
443
+
444
+
The previous API allowed mixing incompatible pagination styles (for example, `.page(p -> p.from(10).after("cursor"))`), which always resulted in a `400 Bad Request` at runtime. This change surfaces that restriction at compile time. The pattern mirrors the existing sort polymorphism design (`TypedSortableRequest`).
445
+
446
+
#### Impact
447
+
448
+
This change is **not binary-compatible**. Code compiled against the previous API will fail at runtime without recompilation, because the method signature changed from `page(Consumer<SearchRequestPage>)` to `page(Consumer<AnyPage>)`. All users must recompile their applications.
449
+
450
+
Additionally, `TypedSearchRequest` now has 4 generic type parameters (previously 3) and `TypedPageableRequest` now has 2 (previously 1), which is a source-breaking change for custom implementations of these interfaces.
|`SearchRequestPage r = p.from(10)`|`OffsetPage r = p.from(10)`|
464
+
|`SearchRequestPage r = p.after("c")`|`CursorForwardPage r = p.after("c")`|
465
+
466
+
#### Action
467
+
468
+
Update to the latest Java client version and **recompile your application**. If you use inline lambdas with valid pagination patterns (for example, `.page(p -> p.from(5).limit(10))`), your source code does not require changes — but recompilation is mandatory.
469
+
470
+
If you have explicit references to `SearchRequestPage`, replace them with `AnyPage`. If you store the return value of direction methods (for example, `SearchRequestPage r = p.from(10)`), update the variable type to `OffsetPage`, `CursorForwardPage`, or `CursorBackwardPage` as appropriate.
471
+
472
+
:::note
473
+
This change is specific to the Camunda Java client. Generated clients and custom REST API integrations are not affected.
474
+
:::
475
+
434
476
## Deprecations
435
477
436
478
Review the actions required for the following deprecations:
Copy file name to clipboardExpand all lines: docs/reference/announcements-release-notes/890/890-announcements.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -359,6 +359,36 @@ Previously, only the first conversion error was returned. This fix improves cons
359
359
</div>
360
360
<divclassName="release-announcement-content">
361
361
362
+
#### Type-safe pagination model in the Camunda Java client
363
+
364
+
Starting with 8.9.0, the Camunda Java client uses type-safe pagination interfaces (`AnyPage`, `OffsetPage`, `CursorForwardPage`, `CursorBackwardPage`) instead of the previous `SearchRequestPage` class. Each search or statistics endpoint now exposes only the pagination methods it actually supports.
365
+
366
+
Previously, the API allowed mixing incompatible pagination styles (for example, `.page(p -> p.from(10).after("cursor"))`), which always resulted in a `400 Bad Request` at runtime. This change surfaces that restriction at compile time.
367
+
368
+
This change is **not binary-compatible**. Code compiled against the old API will fail at runtime without recompilation, because the method signature changed from `page(Consumer<SearchRequestPage>)` to `page(Consumer<AnyPage>)`. All users must recompile, even if their source code does not require changes.
369
+
370
+
**Action:** Take the following action for your integration type:
| Lambda-based pagination (for example, `.page(p -> p.from(5).limit(10))`) | Recompile your application. Source code changes are not required for valid pagination patterns. |
| Explicit `SearchRequestOffsetPage` references | Replace with `OffsetPage`. |
377
+
| Custom `TypedSearchRequest` implementations | Add a pagination type parameter (3 → 4 generic params). |
378
+
| Custom `TypedPageableRequest` implementations | Add a pagination type parameter (1 → 2 generic params). |
379
+
| Storing direction method returns (for example, `SearchRequestPage r = p.from(10)`) | Use `OffsetPage r = p.from(10)`, `CursorForwardPage r = p.after("c")`, or `CursorBackwardPage r = p.before("c")`. |
380
+
381
+
<pclassName="link-arrow">[8.9 API migration guide](../../../apis-tools/migration-manuals/migrate-to-89.md#type-safe-pagination)</p>
#### `versionTag` now returns `null` instead of empty string when absent
363
393
364
394
Starting with 8.9.0, API response fields for `versionTag` return `null` instead of an empty string `""` when no version tag is set. This properly indicates absence rather than leaking an internal default.
0 commit comments