code: protected Response addToTask(HttpHeaders headers, String containerId, Long tInstanceId, boolean removeExisting, String payload, int operation) {
          Variant v = getVariant(headers);
          String type = getContentType(headers);
          Header conversationIdHeader = buildConversationIdHeader(containerId, context, headers);
          try {
              switch (operation) {
                  case POT_OWNER:
                      userTaskAdminServiceBase.addPotentialOwners(containerId, tInstanceId, removeExisting, payload, type);
                      break;
  
                  case EXL_OWNER:
                      userTaskAdminServiceBase.addExcludedOwners(containerId, tInstanceId, removeExisting, payload, type);
                      break;
  
                  case ADMIN:
                      userTaskAdminServiceBase.addBusinessAdmins(containerId, tInstanceId, removeExisting, payload, type);
                      break;
              }
  
              return createResponse("", v, Response.Status.CREATED, conversationIdHeader);
          } catch (TaskNotFoundException e) {
              return notFound(MessageFormat.format(TASK_INSTANCE_NOT_FOUND, tInstanceId), v, conversationIdHeader);
          } catch (DeploymentNotFoundException e) {
              return notFound(MessageFormat.format(CONTAINER_NOT_FOUND, containerId), v, conversationIdHeader);
          } catch (Exception e) {
              logger.error("Unexpected error during processing {}", e.getMessage(), e);
              return internalServerError(errorMessage(e), v, conversationIdHeader);
          }
      }
docs: /*
  internal methods