Use this code when completing a task :
client.start(id, user)
Map<String, Object> var= new HashMap<String, Object>();
firstHtOutputMap.put("variable", "value");
ContentData contentData = ContentMarshallerHelper.marshal(var, null);
client.complete(id, user, contentData);