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
66 stars 26 forks source link

Payload Attributes should be validated in the JPA-View #1015

Open S-Tim opened 1 week ago

S-Tim commented 1 week ago

Scenario

Current Behaviour

When, for example, a task is created with a payload attribute that is long, let's say 1000 characters, then Polyflow cannot handle the event because of an exception when writing to the database. I think the documentation suggests a length of 255 for the value columns in task attributes and data entry attributes. We have already changes this to 512 on our side which is very close to the limit of the primary key in the table (id, path, value). The exception results in an infinite retry-loop which prevents any other event from being handled (at least it is this way when using kafka messaging for transferring the events)

Wanted Behaviour

Of course we do not want to lose the message so we don't want to ignore it. We would suggest to ignore or truncate payload attributes that are too long for the database and log a warning. The attribute would still be in the payload field in the plf_task table but would just not be in the plf_task_payload_attributes.

Possible Workarounds