本文整理汇总了Java中org.kuali.rice.kew.api.KewApiServiceLocator.getDocumentOrchestrationQueue方法的典型用法代码示例。如果您正苦于以下问题:Java KewApiServiceLocator.getDocumentOrchestrationQueue方法的具体用法?Java KewApiServiceLocator.getDocumentOrchestrationQueue怎么用?Java KewApiServiceLocator.getDocumentOrchestrationQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.KewApiServiceLocator
的用法示例。
在下文中一共展示了KewApiServiceLocator.getDocumentOrchestrationQueue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: queueDeferredWork
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
protected void queueDeferredWork(ActionTakenValue actionTaken) {
try {
final boolean shouldIndex = getRouteHeader().getDocumentType().hasSearchableAttributes() && RouteContext.getCurrentRouteContext().isSearchIndexingRequestedForContext();
String applicationId = routeHeader.getDocumentType().getApplicationId();
DocumentOrchestrationQueue blanketApprove = KewApiServiceLocator.getDocumentOrchestrationQueue(
routeHeader.getDocumentId(), applicationId);
org.kuali.rice.kew.api.document.OrchestrationConfig orchestrationConfig =
org.kuali.rice.kew.api.document.OrchestrationConfig.create(actionTaken.getActionTakenId(), nodeNames);
DocumentProcessingOptions options = DocumentProcessingOptions.create(true, shouldIndex);
blanketApprove.orchestrateDocument(routeHeader.getDocumentId(), getPrincipal().getPrincipalId(),
orchestrationConfig, options);
} catch (Exception e) {
LOG.error(e);
throw new WorkflowRuntimeException(e);
}
}
示例2: blanketApproveDocument
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public ActionForward blanketApproveDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
try {
DocumentOperationForm docForm = (DocumentOperationForm) form;
String blanketApproverUser = docForm.getBlanketApproveUser();
if (StringUtils.isBlank(blanketApproverUser)) {
throw new WorkflowServiceErrorException("No user was provided in the Blanket Approve User field", new WorkflowServiceErrorImpl("No user was provided in the Blanket Approve User field", "docoperation.operation.invalid"));
}
String principalId = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(docForm.getBlanketApproveUser()).getPrincipalId();
Set<String> nodeNames = new HashSet<String>();
if (!StringUtils.isBlank(docForm.getBlanketApproveNodes())) {
String[] nodeNameArray = docForm.getBlanketApproveNodes().split(",");
for (String nodeName : nodeNameArray) {
nodeNames.add(nodeName.trim());
}
}
DocumentRouteHeaderValue document = docForm.getRouteHeader();
String applicationId = document.getDocumentType().getApplicationId();
DocumentOrchestrationQueue blanketApprove = KewApiServiceLocator.getDocumentOrchestrationQueue(
document.getDocumentId(), applicationId);
OrchestrationConfig orchestrationConfig = OrchestrationConfig.create(docForm.getBlanketApproveActionTakenId(), nodeNames);
DocumentProcessingOptions options = DocumentProcessingOptions.createDefault();
blanketApprove.orchestrateDocument(docForm.getRouteHeader().getDocumentId(), principalId,
orchestrationConfig, options);
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Blanket Approve Processor was successfully scheduled"));
saveMessages(request, messages);
return mapping.findForward("basic");
} catch (Exception e) {
throw new WorkflowRuntimeException(e);
}
}
示例3: moveDocument
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public ActionForward moveDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
try {
DocumentOperationForm docForm = (DocumentOperationForm) form;
String principalId = KEWServiceLocator.getIdentityHelperService().getIdForPrincipalName(docForm.getBlanketApproveUser());
Set<String> nodeNames = new HashSet<String>();
if (!StringUtils.isBlank(docForm.getBlanketApproveNodes())) {
String[] nodeNameArray = docForm.getBlanketApproveNodes().split(",");
for (String nodeName : nodeNameArray) {
nodeNames.add(nodeName.trim());
}
}
DocumentRouteHeaderValue document = docForm.getRouteHeader();
String applicationId = document.getDocumentType().getApplicationId();
DocumentOrchestrationQueue orchestrationQueue = KewApiServiceLocator.getDocumentOrchestrationQueue(
document.getDocumentId(), applicationId);
OrchestrationConfig orchestrationConfig = OrchestrationConfig.create(docForm.getBlanketApproveActionTakenId(), nodeNames);
DocumentProcessingOptions options = DocumentProcessingOptions.create(true, true, false);
orchestrationQueue.orchestrateDocument(docForm.getDocumentId(), principalId, orchestrationConfig, options);
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Move Document Processor was successfully scheduled"));
saveMessages(request, messages);
return mapping.findForward("basic");
} catch (Exception e) {
throw new WorkflowRuntimeException(e);
}
}
示例4: recordAction
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public void recordAction() throws InvalidActionTakenException {
MDC.put("docId", getRouteHeader().getDocumentId());
updateSearchableAttributesIfPossible();
LOG.debug("Moving document " + getRouteHeader().getDocumentId() + " to point: " + displayMovePoint(movePoint) + ", annotation: " + annotation);
List actionRequests = getActionRequestService().findAllValidRequests(getPrincipal().getPrincipalId(), getDocumentId(), KewApiConstants.ACTION_REQUEST_COMPLETE_REQ);
Collection activeNodes = KEWServiceLocator.getRouteNodeService().getActiveNodeInstances(getRouteHeader().getDocumentId());
String errorMessage = validateActionRules(actionRequests,activeNodes);
if (!org.apache.commons.lang.StringUtils.isEmpty(errorMessage)) {
throw new InvalidActionTakenException(errorMessage);
}
//KULRICE-12283:Modified the logic so this action moves the document to enroute status before attempting to move it to another node if it is initialized or saved
if (getRouteHeader().isStateInitiated() || getRouteHeader().isStateSaved()) {
markDocumentEnroute(getRouteHeader());
getRouteHeader().setRoutedByUserWorkflowId(getPrincipal().getPrincipalId());
}
RouteNodeInstance startNodeInstance = determineStartNode(activeNodes, movePoint);
LOG.debug("Record the move action");
Recipient delegator = findDelegatorForActionRequests(actionRequests);
ActionTakenValue actionTaken = saveActionTaken(delegator);
getActionRequestService().deactivateRequests(actionTaken, actionRequests);
notifyActionTaken(actionTaken);
// TODO this whole bit is a bit hacky at the moment
if (movePoint.getStepsToMove() > 0) {
Set<String> targetNodeNames = new HashSet<String>();
targetNodeNames.add(determineFutureNodeName(startNodeInstance, movePoint));
final boolean shouldIndex = getRouteHeader().getDocumentType().hasSearchableAttributes() && RouteContext.getCurrentRouteContext().isSearchIndexingRequestedForContext();
String applicationId = routeHeader.getDocumentType().getApplicationId();
DocumentOrchestrationQueue orchestrationQueue = KewApiServiceLocator.getDocumentOrchestrationQueue(
routeHeader.getDocumentId(), applicationId);
org.kuali.rice.kew.api.document.OrchestrationConfig orchestrationConfig =
org.kuali.rice.kew.api.document.OrchestrationConfig.create(actionTaken.getActionTakenId(), targetNodeNames);
//KULRICE-12283: Modified this to pass along two new flags to indicate that acks and FYIs should be deactivated with the move
DocumentProcessingOptions options = DocumentProcessingOptions.create(true, shouldIndex, false, true, true);
orchestrationQueue.orchestrateDocument(routeHeader.getDocumentId(), getPrincipal().getPrincipalId(), orchestrationConfig, options);
} else {
String targetNodeName = determineReturnNodeName(startNodeInstance, movePoint);
ReturnToPreviousNodeAction returnAction = new ReturnToPreviousNodeAction(KewApiConstants.ACTION_TAKEN_MOVE_CD, getRouteHeader(), getPrincipal(), annotation, targetNodeName, false);
returnAction.recordAction();
}
}