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.
Reply to this message by going to Community
Start a new discussion in jBPM at Community