holunda-io / camunda-bpm-taskpool

Library for pooling user tasks and process related business objects.
https://www.holunda.io/camunda-bpm-taskpool/
Apache License 2.0
68 stars 26 forks source link

Use Optional for nullable query results #578

Closed jangalinski closed 1 year ago

jangalinski commented 2 years ago

While implementing #566 I noticed, that some Task queries uses a nullable Task? result. I would prefer using Java Optional here and use the Axon ResponseTypes.optionalOf(...) for query execution.

The queries with changed results are all parts of the Task API:

In a new API all these queries return Optional of the target type instead of Kotlin's nullable type (T?).

This is a breaking change to Polyflow <= 3.5.0.

zambrovski commented 2 years ago

This is a good idea. Optional in query results was introduced after I designed the API (at least as far as I know) - so yes. Optional seems nice from the Java point of view but is even more complex to use out of Kotlin.... Let's go for it

zambrovski commented 2 years ago

Breaking change - should be at least in a minor release...

jangalinski commented 2 years ago

Should we do this for 3.3.0 while adding the potentially breaking changes to the view-api data classes?

jangalinski commented 2 years ago

No ... moved to 3.4.0

zambrovski commented 1 year ago

Moved to 3.6.0