cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments and Comments

jotapdiez
Champ in-the-making
Champ in-the-making
Hi all!!

I found this API excellent by his interfaces and the code itself.

But now, I have a question that I can't find answer,  across the code or the JavaDoc.

When I add an attachment to the proccess, Activiti automaticly adds a comment to that attachment. So, when I ask for comments I get ALL undesirable comments. How can I filter these undesirable comments? By now, I'm filtering it by:
if (comment.getFullMessage() == null)
. I want to filter it by database query to avoid this kind of checks.

Also, what is the best way to relate the attachments with comments? to obtain userID and time

Thanks in advance
Sorry about my english
Regards Juan Pablo From Argentina
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
I want to filter it by database query to avoid this kind of checks.

That isn't offered out of the box unfortunately. You'd need to write your own queries + commands.

Alternatively, you can use the NativeQuery, altough you'd need to create your own subclass since for comments no nativeQuery class exists yet.

Also, what is the best way to relate the attachments with comments? to obtain userID and time

I'm afraid that's also pretty hard to do, as the text is just generated at runtime and the userid and time is passed …. besides some basic string filtering I can't think of much.