06-15-2015 04:20 AM
List<WorkflowTask> workflowTaskList = workflowService.getPooledTasks(serviceRegistry.getAuthenticationService().getCurrentUserName());
for(WorkflowTask wfTask : workflowTaskList){
try {
Map<QName, Serializable> wfProps = new HashMap<>();
//Approving the content
wfProps.put(HCCustomModel.QNAME_HC_REVIEW_OUTCOME, HCCustomModel.REVIEW_APPROVE); //Adding "Approve" workflow property
workflowService.updateTask(wfTask.getId(), wfProps, null, null);
wfProps = wfTask.getProperties();
for(QName key : wfProps.keySet()){
logger.info("Key : "+key+" , Value : "+wfProps.get(key));
}
workflowService.endTask(wfTask.getId(), null);
} catch (AlfrescoRuntimeException e) {
logger.error("An error occured while processing the task:"+wfTask.getId(), e);
}
}
06-15-2015 04:41 AM
06-16-2015 04:11 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.