As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
List<WorkflowInstance> instances = this.workflowService.getCompletedWorkflows(); for (WorkflowInstance instance : instances) { WorkflowTaskQuery query = new WorkflowTaskQuery(); query.setActive(false); query.setTaskState(null); query.setProcessId(instance.getId()); List<WorkflowTask> tasks = workflowService.queryAllTasks(query); WorkflowTask endTask = getEndTask(tasks); // I needed to my own parsing here because when I tried to do the query with custom properties I always got empty list if (endTask != null) { List<NodeRef> items = this.workflowService.getPackageContents(endTask.getId()); // HERE THE ERROR OCCURS!!! … } }