3 Replies Latest reply on Jan 24, 2013 7:24 AM by Gareth Edwards

    Completing a human task with results

    Gareth Edwards Newbie

      Hi,

       

      I can complete a human task using the TaskClient  like so:

       

      ContentData contentData = ContentMarshallerHelper.marshal(content,  null);

              BlockingTaskOperationResponseHandler taskResponseHandler = new BlockingTaskOperationResponseHandler();

            

              client.complete(taskId, userId, contentData, taskResponseHandler);

             

              taskResponseHandler.waitTillDone(2000);

       

       

      But how can I complete a task a get a result?

       

      The TaskClient API has two complete methods:

       

      complete(long taskId, String userId, ContentData outputData,TaskClientHandler.TaskOperationResponseHandler responseHandler)

       

      and

      completeWithResults(long taskId, String userId, Object results,TaskClientHandler.TaskOperationResponseHandler responseHandler)

       

      I am using the first method as I need to pass in data on completion.

      The second method appears to return results on completion but doesn't allow for passing in of content data.

      How can I complete a human task with content data and get back a result?

       

      Thanks in advance,

       

      Gareth.