camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.02k stars 1.53k forks source link

Extend ValidationResults to allow write results until a max size #4443

Closed mustafadagher closed 1 week ago

mustafadagher commented 1 week ago

User Story (Required on creation)

As Zeebe, I want to be able to pass a maximum size to be written as an output for the ValidationResults, so I don't cause errors on the client side for too long error headers.

Functional Requirements (Required before implementation)

As a part of the solution for https://github.com/camunda/camunda/issues/11284, we want to extend the ValidationResults so we can pass a maximum size for the output result from zeebe.

We want to also write a suffix with the number of errors/warnings we couldn't accommodate within the maximum size.

Technical Requirements (Required before implementation)

We will need to overload the ValidationResults.write() with one that accepts a maxSize in bytes, and call this one from zeebe.

We might need to also introduce a new constructor that aggregates multiple ValidationResults into one, since zeebe has two separate ones and we want to avoid calling write twice as it will complicate the logic with the size limitation.

Dev2QA handover

psavidis commented 1 week ago

Hi @mustafadagher,

First i'd like to confirm with you if Zeebe uses the C7 Model API before moving on with this Review to make sure this is not a mistake.

It looks like there is a model-api on the C8 codebase.

mustafadagher commented 1 week ago

Hi @mustafadagher,

First i'd like to confirm with you if Zeebe uses the C7 Model API before moving on with this Review to make sure this is not a mistake.

It looks like there is a model-api on the C8 codebase.

Hi @psavidis, thanks a lot for the hint! But C8 model-api itself relies on camunda-xml-model (lines) version 7.21.0.

We use the validation logic through the ValidationVisitor within the BpmnValidator

psavidis commented 1 week ago

Hey @mustafadagher,

Thank you for the clarification.

Can you also include me as a reviewer of the Pull Request ?