-
1. Re: Getting comments through command object ?
kukeltje Aug 6, 2008 2:45 PM (in response to lblaauw)make a new command (almost the same a modifying the source to it not being lazy ;-))
-
2. Re: Getting comments through command object ?
lblaauw Aug 7, 2008 6:32 AM (in response to lblaauw)Kukeltje,
Cool, yeah seems like the way to go. Trying that now but my new command not only does not save the new comment but also wipes out any existing ones.. hmmm ??
Greetings,
Leo"kukeltje" wrote:
make a new command (almost the same a modifying the source to it not being lazy ;-)) -
3. Re: Getting comments through command object ?
lblaauw Aug 8, 2008 2:42 AM (in response to lblaauw)Ah,
My bad.. .Seems if you attach a comment to a task it only belongs to that particular task so when the task finishes its gone. So I have now taken the route taken by kukeltje in a very very old post and have attached my comments to the rootToken wich servers my purpose just fine ! ;-)
Greetings,
Leo"lblaauw" wrote:
Kukeltje,
Cool, yeah seems like the way to go. Trying that now but my new command not only does not save the new comment but also wipes out any existing ones.. hmmm ??
Greetings,
Leo"kukeltje" wrote:
make a new command (almost the same a modifying the source to it not being lazy ;-)) -
4. Re: Getting comments through command object ?
vtysh Aug 8, 2008 3:05 AM (in response to lblaauw)Comment is not gone when the task is finished. It is just the jbpm-console problem which displays only process root token comments or task comments but doesn't display all comments at the same time.
To display all comments you should to iterate through process tokens and display comments for all tokens. You can write custom tag for that thing. -
5. Re: Getting comments through command object ?
vtysh Aug 8, 2008 3:17 AM (in response to lblaauw)Oh, i am sorry, you didn't write anything about jbpm-console. But all other recommendations are still actual. You need to find all process instance tokens with the method findAllTokens(). Then iterate through tokens and get their comments with the method token.getComments() and add all comments to some comments list which will contain all process comments. For a knowledge whether the comment is related to some task instance you can use expression comment.getTaskInstance()!=null
-
6. Re: Getting comments through command object ?
lblaauw Aug 8, 2008 3:20 AM (in response to lblaauw)Hey vtysh,
Well my usecase is actually quite simple, i just need global comments per process instance, so any task user can add comments to the whole process instance. So when i collect a users tasks per task i also collect the process instance comments for that task. Therefore i decided to use the rootToken for this. The processes are actually quite simple so no subprocesses branching etc etc. So i figured i could get away with how i did things.. ;-)
Regards and thanks for your reply,
Leo"vtysh" wrote:
Oh, i am sorry, you didn't write anything about jbpm-console. But all other recommendations are still actual. You need to find all process instance tokens with the method findAllTokens(). Then iterate through tokens and get their comments with the method token.getComments() and add all comments to some comments list which will contain all process comments. For a knowledge whether the comment is related to some task instance you can use expression comment.getTaskInstance()!=null -
7. Re: Getting comments through command object ?
vtysh Aug 8, 2008 3:36 AM (in response to lblaauw)I propposed you better solution. Because you can simply add comments to the task or dirrectly to the process and then know for which task the comment was done.