Ejemplo n.º 1
0
  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;
  }