AnsweredAssumed Answered

Rest call for delegate task

Question asked by priyankam on Jul 31, 2014
Latest reply on Jul 31, 2014 by frederikheremans1

   @RequestMapping(value = "/delegateTask/{taskId}", method = RequestMethod.PUT)
   public StatusDetails delegateTask(
         @PathVariable("taskId") String planItemAggregateId,
         @RequestParam("userId") String userId,
         @RequestParam("comment") String comment) {
      StatusDetails statusDetails = new StatusDetails();
      try {
         cmmnEngineRuntimeService.delegateTask(planItemAggregateId, userId,
         String successMessage = "You have Delegated the Task";
         return statusDetails;
      } catch (Exception e) {
         String failedMessage = "You have failed to Delegate the Task ";
         statusDetails.setMessage(failedMessage + e.getMessage());
         return statusDetails;

This my code but i want to know whether i can use @requestparam for put method or I should use reaquestBody and will it correct way of doing it for comment field and userId.