Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.6 #240

Merged
merged 34 commits into from
Oct 24, 2024
Merged

8.6 #240

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2e5af66
feat(zeebe): add operationReference field to gRPC methods
jwulf Aug 30, 2024
8e93c92
feat(camunda8): add C8RestClient
jwulf Aug 30, 2024
f19a252
feat(zeebe): lossless parse REST variables and customheaders
jwulf Sep 6, 2024
ec16543
chore(repo): remove extra file
jwulf Sep 6, 2024
a49d217
feat(zeebe): create and cancel process instances over REST
jwulf Sep 9, 2024
cd6080f
fix(zeebe): do not override explicit ZEEBE_GRPC_ADDRESS with default …
jwulf Sep 13, 2024
40a6316
fix(zeebe): throw on client if array passed as variables to CompleteJob
jwulf Sep 17, 2024
debd212
feat(camunda8): implement deployResources REST API
jwulf Sep 17, 2024
8043ac9
feat(camunda8): complete deployResources feature
jwulf Sep 18, 2024
d41d3f8
feat(camunda8): support pluggable winston logging for C8RestClient
jwulf Sep 18, 2024
43f82a4
feat(camunda8): support broadcastSignal over REST
jwulf Sep 18, 2024
fead376
test(camunda8): stop worker in broadcastSignal test
jwulf Sep 18, 2024
7de82b7
feat(camunda8): support updateElementInstanceVariables
jwulf Sep 18, 2024
d77a0c2
test(camunda8): fix tests for migrateProcess over Rest
jwulf Sep 18, 2024
057a9fe
feat(camunda8): implement publishMessage over REST
jwulf Sep 18, 2024
1dcb101
feat(camunda8): implement deleteResource over REST
jwulf Sep 18, 2024
ff248b7
test(optimize): comment out test for Self-Managed
jwulf Sep 18, 2024
4ec4fa1
feat(camunda8): implement createProcessInstanceWithResult
jwulf Sep 19, 2024
bb5d8ea
fix(lossless-parser): throw on encountering Date, Map, or Set
jwulf Sep 19, 2024
0d97f68
feat(camunda8): add modifyAuthorization method
jwulf Sep 20, 2024
20f40f2
test(camunda8): update tests
jwulf Sep 20, 2024
b4545b7
test(camunda8): align with createProcessInstance endpoint
jwulf Sep 22, 2024
f7ab6eb
refactor(camunda8): change name of C8RestClient -> CamundaRestClient
jwulf Sep 24, 2024
d69729a
fix(lossless-parser): correctly parse number array
jwulf Sep 24, 2024
be308b0
refactor(lossless-parser): improve array handling
jwulf Sep 24, 2024
cb95946
fix(camunda8): correctly parse autostart parameter of JobWorker
jwulf Sep 25, 2024
3055734
fix(camunda8): type variables in async process instance start as never
jwulf Sep 25, 2024
1b7715e
feat(repo): support passing middleware
jwulf Sep 26, 2024
926a49c
(chore): update changed API fields
jwulf Oct 10, 2024
e3d9206
chore: make logger generic
jwulf Oct 22, 2024
44d041d
chore: add note to new Camunda REST client
jwulf Oct 23, 2024
29e636b
chore: update local test to 8.6.3
jwulf Oct 24, 2024
60c2469
test: emit debug in migration rest test
jwulf Oct 24, 2024
fc5d5ac
test: correct version of Zeebe for local integration
jwulf Oct 24, 2024
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
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Entity keys in Camunda 8 are stored and represented as `int64` numbers. The rang

Some number values - for example: "_total returned results_ " - may be specified as `int64` in the API specifications. Although these numbers will usually not contain unsafe values, they are always serialised to `string`.

For `int64` values whose type is not known ahead of time, such as job variables, you can pass an annotated data transfer object (DTO) to decode them reliably. If no DTO is specified, the default behavior of the SDK is to serialise all numbers to JavaScript `number`, and if a number value is detected at a runtime that cannot be accurately stored as `number`, to throw an exception.
For `int64` values whose type is not known ahead of time, such as job variables, you can pass an annotated data transfer object (DTO) to decode them reliably. If no DTO is specified, the default behavior of the SDK is to serialise all numbers to JavaScript `number`, and to throw an exception if a number value is detected at a runtime that cannot be accurately represented as the JavaScript `number` type (that is, a value greater than 2^53-1).

## Authorization

Expand Down Expand Up @@ -222,9 +222,31 @@ Here is an example of turning on debugging for the OAuth and Operate components:
DEBUG=camunda:oauth,camunda:operate node app.js
```

## Process Variable Typing

Process variables - the `variables` of Zeebe messages, jobs, and process instance creation requests and responses - are stored in the broker as key:value pairs. They are transported as a JSON string. The SDK parses the JSON string into a JavaScript object.

Various Zeebe methods accept DTO classes for variable input and output. These DTO classes are used to provide design-time type information on the `variables` object. They are also used to safely decode 64-bit integer values that cannot be accurately represented by the JavaScript `number` type.

To create a DTO to represent the expected shape and type of the `variables` object, extend the `LosslessDto` class:

```typescript
class myVariableDTO extends LosslessDto {
firstName!: string
lastName!: string
age!: number
optionalValue?: number
@Int64String
veryBigInteger?: string
constructor(data: Partial<myVariableDTO>) {
super(data)
}
}
```

## Typing of Zeebe worker variables

The variable payload in a Zeebe worker task handler is available as an object `job.variables`. By default, this is of type `any`.
The variable payload in a Zeebe worker task handler is available as an object `job.variables`. By default, this is of type `any` for the gRPC API, and `unknown` for the REST API.

The `ZBClient.createWorker()` method accepts an `inputVariableDto` to control the parsing of number values and provide design-time type information. Passing an `inputVariableDto` class to a Zeebe worker is optional. If a DTO class is passed to the Zeebe worker, it is used for two purposes:

Expand Down
3 changes: 2 additions & 1 deletion docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# CAMUNDA_CONNECTORS_VERSION=0.23.2
CAMUNDA_CONNECTORS_VERSION=8.5.0
CAMUNDA_OPTIMIZE_VERSION=8.5.0
CAMUNDA_PLATFORM_VERSION=8.5.0
CAMUNDA_PLATFORM_VERSION=8.6.0
CAMUNDA_ZEEBE_VERSION=8.6.3
CAMUNDA_WEB_MODELER_VERSION=8.5.0
ELASTIC_VERSION=8.9.0
KEYCLOAK_SERVER_VERSION=22.0.3
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-multitenancy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

services:
zeebe: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#zeebe
image: camunda/zeebe:${CAMUNDA_PLATFORM_VERSION}
image: camunda/zeebe:${CAMUNDA_ZEEBE_VERSION}
container_name: zeebe
ports:
- "26500:26500"
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

services:
zeebe: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#zeebe
image: camunda/zeebe:${CAMUNDA_PLATFORM_VERSION}
image: camunda/zeebe:${CAMUNDA_ZEEBE_VERSION}
container_name: zeebe
ports:
- "26500:26500"
Expand Down
Loading
Loading