code: @RequestMapping(method = RequestMethod.POST, value = "/workflowInstance/{woinRefNum}/humanTask/{tokenId}",
              produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.TEXT_XML_VALUE})
      public ResponseEntity<HumanTaskModel> updateHumanTask( @PathVariable long woinRefNum, @PathVariable int tokenId, @RequestBody String body ){
          WorkItemState woit = facade.findActiveWorkItemByTokenId( woinRefNum, tokenId );
          if( woit == null ){
              return new ResponseEntity<>( HttpStatus.NOT_FOUND );
          }
          try{
              JsonObject root = JsonParserUtil.parseJson( body );
              String user = JsonParserUtil.getAsNullSafeString( root, "user" );
              if( user != null ){
                  String userName = user.trim().isEmpty() ? null : user.trim();
                  facade.assignHumanTask( woit.getRefNum(), userName );
              }
              else{
                  facade.submitHumanTask( woit.getRefNum(), JsonUtil.deserialize( JsonParserUtil.toNullSafeJsonString( root, "result" ) ) );
              }
          }
          catch( UnexpectedStatusException e ){
              return new ResponseEntity<>( HttpStatus.CONFLICT );
          }
          woit = facade.findWorkItem( woit.getRefNum(), true );
          return new ResponseEntity<>( createHumanTaskModel( woit ), HttpStatus.OK );
      }
docs: (Un)assigns a human task to a user or submits its result.
  
  In order to unassign a human task from a user, set an empty user name.
  
  Technically, assigning means updating the user field while submitting means to update the status field to EXECUTED and setting the result value.
  
  <pre>
  Request:  POST /workflowInstance/1/humanTask/2 {result: {resolution: "completed"}}
  Response: OK, {refNum:3, woinRefNum:1, tokenId:2, status:EXECUTED, role:"auditor", user:"hans", arguments:{task:"audit customer 500"}, result: {resolution: "completed"}}
  Response: NOT_FOUND, if no such human task exists
  Response: CONFLICT, if the human task's status does not allow the requested status transition
  </pre>