public Map<String, Object> getTaskContent(long taskId) {
    Task taskById = taskQueryService.getTaskInstanceById(taskId);
    Content contentById =
        taskContentService.getContentById(taskById.getTaskData().getDocumentContentId());

    Object unmarshalledObject = ContentMarshallerHelper.unmarshall(contentById.getContent(), null);
    if (!(unmarshalledObject instanceof Map)) {
      throw new IllegalStateException(
          " The Task Content Needs to be a Map in order to use this method and it was: "
              + unmarshalledObject.getClass());
    }
    Map<String, Object> content = (Map<String, Object>) unmarshalledObject;

    return content;
  }
 public List<TaskSummary> getTasksAssignedByGroups(List<String> groupIds, String language) {
   return taskQueryService.getTasksAssignedByGroups(groupIds, language);
 }
 public List<TaskSummary> getTasksAssignedByGroup(String groupId, String language) {
   return taskQueryService.getTasksAssignedByGroup(groupId, language);
 }
 public Task getTaskInstanceById(long taskId) {
   return taskQueryService.getTaskInstanceById(taskId);
 }
 public Task getTaskByWorkItemId(long workItemId) {
   return taskQueryService.getTaskByWorkItemId(workItemId);
 }
 public List<TaskSummary> getSubTasksByParent(long parentId) {
   return taskQueryService.getSubTasksByParent(parentId);
 }
 public List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, String language) {
   return taskQueryService.getTasksAssignedAsPotentialOwner(userId, language);
 }
 @Override
 public List<TaskSummary> getTasksByStatusByProcessIdByTaskName(
     long processInstanceId, List<Status> status, String taskName, String language) {
   return taskQueryService.getTasksByStatusByProcessIdByTaskName(
       processInstanceId, status, taskName, language);
 }
 public List<TaskSummary> getTasksAssignedByGroupsByExpirationDateOptional(
     List<String> groupIds, String language, Date expirationDate) {
   return taskQueryService.getTasksAssignedByGroupsByExpirationDateOptional(
       groupIds, language, expirationDate);
 }
 public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(
     String salaboy, List<Status> status, String language) {
   return taskQueryService.getTasksAssignedAsPotentialOwnerByStatus(salaboy, status, language);
 }
 public List<TaskSummary> getTasksOwned(String userId, List<Status> status, String language) {
   return taskQueryService.getTasksOwned(userId, status, language);
 }
 public List<TaskSummary> getTasksOwned(String userId) {
   return taskQueryService.getTasksOwned(userId);
 }
 public List<TaskSummary> getTasksAssignedAsTaskStakeholder(String userId, String language) {
   return taskQueryService.getTasksAssignedAsTaskStakeholder(userId, language);
 }
 public List<TaskSummary> getTasksAssignedAsRecipient(String userId, String language) {
   return taskQueryService.getTasksAssignedAsRecipient(userId, language);
 }
 public List<TaskSummary> getTasksAssignedAsPotentialOwner(
     String userId, List<String> groupIds, String language, int firstResult, int maxResults) {
   return taskQueryService.getTasksAssignedAsPotentialOwner(
       userId, groupIds, language, firstResult, maxResults);
 }
 public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatusByGroup(
     String userId, List<String> groupIds, List<Status> status, String language) {
   return taskQueryService.getTasksAssignedAsPotentialOwnerByStatusByGroup(
       userId, groupIds, status, language);
 }
 @Override
 public List<TaskSummary> getTasksOwnedByExpirationDateOptional(
     String userId, List<Status> statuses, Date expirationDate) {
   return taskQueryService.getTasksOwnedByExpirationDateOptional(userId, statuses, expirationDate);
 }
 public List<TaskSummary> getSubTasksAssignedAsPotentialOwner(
     long parentId, String userId, String language) {
   return taskQueryService.getSubTasksAssignedAsPotentialOwner(parentId, userId, language);
 }
 @Override
 public List<Long> getTasksByProcessInstanceId(long processInstanceId) {
   return taskQueryService.getTasksByProcessInstanceId(processInstanceId);
 }
 public List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, String language) {
   return taskQueryService.getTasksAssignedAsBusinessAdministrator(userId, language);
 }