Get the list of process instances variables
1 answer
Have a look at this post:
http://community.bonitasoft.com/answer-get-variables-archived-process-instance#comment-5613
As for changing the comment to have the data "on the fly" this can be done by sending data via a variable and then using JavaScript to change the field. There is apost about this somewhere :) but I can't remember where... :(
Hope this helps,
regards
Seán