protected List<WorkflowTask> toWorkflowTasks(List<KaleoTaskInstanceToken> kaleoTaskInstanceTokens) throws PortalException { List<WorkflowTask> workflowTasks = new ArrayList<>(kaleoTaskInstanceTokens.size()); for (KaleoTaskInstanceToken kaleoTaskInstanceToken : kaleoTaskInstanceTokens) { workflowTasks.add( WorkflowModelUtil.toWorkflowTask( kaleoTaskInstanceToken, WorkflowContextUtil.convert(kaleoTaskInstanceToken.getWorkflowContext()))); } return workflowTasks; }
@Override public WorkflowTask getWorkflowTask(long companyId, long workflowTaskInstanceId) throws WorkflowException { try { KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil.getKaleoTaskInstanceToken(workflowTaskInstanceId); return WorkflowModelUtil.toWorkflowTask( kaleoTaskInstanceToken, WorkflowContextUtil.convert(kaleoTaskInstanceToken.getWorkflowContext())); } catch (Exception e) { throw new WorkflowException(e); } }