本文整理匯總了Java中org.kuali.rice.kew.api.action.ActionInvocationQueue類的典型用法代碼示例。如果您正苦於以下問題:Java ActionInvocationQueue類的具體用法?Java ActionInvocationQueue怎麽用?Java ActionInvocationQueue使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ActionInvocationQueue類屬於org.kuali.rice.kew.api.action包,在下文中一共展示了ActionInvocationQueue類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: takeMassActions
import org.kuali.rice.kew.api.action.ActionInvocationQueue; //導入依賴的package包/類
public void takeMassActions(String principalId, List<ActionInvocation> actionInvocations) {
Principal principal = loadPrincipal(principalId);
for (ActionInvocation invocation : actionInvocations) {
ActionItem actionItem = KEWServiceLocator.getActionListService().findByActionItemId(invocation.getActionItemId());
if (actionItem == null) {
LOG.warn("Could not locate action item for the given action item id [" + invocation.getActionItemId() + "], not taking mass action on it.");
continue;
}
KEWServiceLocator.getActionListService().deleteActionItem(actionItem, true);
DocumentRouteHeaderValue document = KEWServiceLocator.getRouteHeaderService().getRouteHeader(actionItem.getDocumentId());
String applicationId = document.getDocumentType().getApplicationId();
ActionInvocationQueue actionInvocQueue = KewApiServiceLocator.getActionInvocationProcessorService(
document.getDocumentId(), applicationId);
actionInvocQueue.invokeAction(principalId, actionItem.getDocumentId(), invocation);
// ActionInvocationQueueImpl.queueActionInvocation(user, actionItem.getDocumentId(), invocation);
}
}
示例2: queueActionInvocation
import org.kuali.rice.kew.api.action.ActionInvocationQueue; //導入依賴的package包/類
public ActionForward queueActionInvocation(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
try {
DocumentOperationForm docForm = (DocumentOperationForm) form;
String principalId = KEWServiceLocator.getIdentityHelperService().getIdForPrincipalName(docForm.getActionInvocationUser());
ActionInvocation invocation = ActionInvocation.create(ActionType.fromCode(
docForm.getActionInvocationActionCode()), docForm.getActionInvocationActionItemId());
DocumentRouteHeaderValue document = docForm.getRouteHeader();
String applicationId = document.getDocumentType().getApplicationId();
ActionInvocationQueue actionInvocationQueue = KewApiServiceLocator.getActionInvocationProcessorService(
document.getDocumentId(), applicationId);
actionInvocationQueue.invokeAction(principalId, docForm.getRouteHeader().getDocumentId(), invocation);
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Action Invocation Processor was successfully scheduled"));
saveMessages(request, messages);
return mapping.findForward("basic");
} catch (Exception e) {
throw new WorkflowRuntimeException(e);
}
}
示例3: getActionInvocationProcessorService
import org.kuali.rice.kew.api.action.ActionInvocationQueue; //導入依賴的package包/類
public static ActionInvocationQueue getActionInvocationProcessorService(String documentId, String applicationId) {
return (ActionInvocationQueue) getServiceAsynchronously(ACTION_INVOCATION_QUEUE, documentId, applicationId);
}