use of org.kuali.kfs.kew.api.document.DocumentProcessingQueue in project cu-kfs by CU-CommunityApps.
the class DocumentOperationAction method queueDocument.
public ActionForward queueDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
try {
DocumentOperationForm docForm = (DocumentOperationForm) form;
DocumentRouteHeaderValue document = docForm.getRouteHeader();
DocumentProcessingQueue documentProcessingQueue = KewApiServiceLocator.getDocumentProcessingQueue(document.getDocumentId());
documentProcessingQueue.process(docForm.getDocumentId());
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Document was successfully queued"));
saveMessages(request, messages);
return mapping.findForward("basic");
} catch (Exception e) {
throw new WorkflowRuntimeException(e);
}
}
Aggregations