cancel
Showing results for 
Search instead for 
Did you mean: 

User id in act_hi_attachment is always null

sistemasmunicip
Champ in-the-making
Champ in-the-making
Hello,
using Java api to add attachments to a Task, the field user_id_ in the act_hi_attachment is never set.
As for the Attachment java class, it doesn't have an user_id attribute either.
I was hoping to control the users that can read/delete an attachment usin the user id.
I tried with Authorization.authenticatedUser and IdentityLink but the field is alwas null.
I'm using PostgreSQL and Activiti 5.14
Is it possible to save - retrieve user id from act_hi_attachment?

Thanks in advance
Esteban
14 REPLIES 14

jbarrez
Star Contributor
Star Contributor
Makes sense to me. A pull request would be good. i'll make sure we add the necessary db upgrades.

balsarori
Champ on-the-rise
Champ on-the-rise

sistemasmunicip
Champ in-the-making
Champ in-the-making
Good! Thanks for your time.
An FYI, a similar situation occurs with act_hi_detail and task_id_ field, at least in my implementation (5.14) the field is always null.
Trying to get the variable updates for specific task ids
Greetings

quaff
Champ in-the-making
Champ in-the-making
Hi,I create a PR to fix Attachment.getUserId() always return null

https://github.com/Activiti/Activiti/pull/236

jbarrez
Star Contributor
Star Contributor
Pull request merged, thanks!