To retrieve a result from a user defined service task you have to add a new result parameter into your work item definition file.
Then you can pass a result value from your work item handler into your business process using this code:
Map workItemResults = new HashMap();
workItemResults.put("parameter", value);
workItemManager.completeWorkItem(workItem.getId(), workItemResults);