You can define it as the input to the user task.
And pass it to the API when you are calling taskclient().complete as the contentData
One constraint I found was that the Class should be serializable.
Check this... This was an excellent example posted in this forum that might help you
JBPM5 Web Example : http://community.jboss.org/people/bpmn2user/blog/2011/09/21/jbpm5-web-example
This was in jbpm5 an updated one was seen in the community .. if you are using 5.2 search in the forum it is there