@camunda8/sdk
    Preparing search index...

    Extend the LosslessDto class with your own Dto classes to enable lossless parsing of JSON int64 values. These are Java long numbers with values that are not supported by JavaScript's Number type. The SDK uses the lossless-json library to parse all JSON numbers as LosslessNumber type. This allows us to safely parse large numbers without losing precision. Decorate fields with @Int64String or @BigIntValue to specify how known int64 JSON numbers should be parsed — either as a string or a bigint.

    Prior to Camunda 8.7, the REST API returned entity keys as int64 numbers. From 8.7, the broker returns them as strings. LosslessDtos are used to normalise this difference. It can also be used to parse large numbers in headers and variables, enabling lossless parsing of large numbers in applications that use the SDK.

    This example is a Dto class that handles two int64 fields, decoding one as a string and one as a bigint. It also has a child Dto field and some normal fields. The child Dto is parsed as a LosslessDto, so it can also have int64 fields. For more complex Dtos, see the implementations in the SDK.

    class MyDto extends LosslessDto {
    @Int64String
    int64NumberField: string
    @BigIntValue
    bigintField: bigint
    @ChildDto(MyChildDto)
    childDtoField: MyChildDto
    normalField: string
    normalNumberField: number
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    Properties

    bpmnProcessId: string
    key: string

    ProcessDefinition key is a string in the SDK, but it's an int64 number in the database

    name: string
    version: number