本文整理汇总了Java中org.kuali.rice.kew.api.WorkflowDocument.isSaved方法的典型用法代码示例。如果您正苦于以下问题:Java WorkflowDocument.isSaved方法的具体用法?Java WorkflowDocument.isSaved怎么用?Java WorkflowDocument.isSaved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.WorkflowDocument
的用法示例。
在下文中一共展示了WorkflowDocument.isSaved方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addStandardAttributes
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
protected void addStandardAttributes(Document document, Map<String, String> attributes) {
WorkflowDocument wd = document.getDocumentHeader().getWorkflowDocument();
attributes.put(KimConstants.AttributeConstants.DOCUMENT_NUMBER, document.getDocumentNumber());
attributes.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, wd.getDocumentTypeName());
if (wd.isInitiated() || wd.isSaved()) {
attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME, PRE_ROUTING_ROUTE_NAME);
} else {
attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME,
KRADServiceLocatorWeb.getWorkflowDocumentService().getCurrentRouteNodeNames(wd));
}
attributes.put(KimConstants.AttributeConstants.ROUTE_STATUS_CODE, wd.getStatus().getCode());
}
示例2: addStandardAttributes
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
protected void addStandardAttributes(Document document, Map<String, String> attributes) {
WorkflowDocument wd = document.getDocumentHeader().getWorkflowDocument();
attributes.put(KimConstants.AttributeConstants.DOCUMENT_NUMBER, document.getDocumentNumber());
attributes.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, wd.getDocumentTypeName());
if (wd.isInitiated() || wd.isSaved()) {
attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME, PRE_ROUTING_ROUTE_NAME);
} else {
attributes.put(KimConstants.AttributeConstants.ROUTE_NODE_NAME,
KRADServiceLocatorWeb.getWorkflowDocumentService().getCurrentRouteNodeNames(wd));
}
attributes.put(KimConstants.AttributeConstants.ROUTE_STATUS_CODE, wd.getStatus().getCode());
}
示例3: processRouteDocument
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
/**
* @see MaintenanceDocumentRule#processRouteDocument(org.kuali.rice.krad.document.Document)
*/
@Override
public boolean processRouteDocument(Document document) {
LOG.info("processRouteDocument called");
MaintenanceDocument maintenanceDocument = (MaintenanceDocument) document;
boolean completeRequestPending = RouteToCompletionUtil.checkIfAtleastOneAdHocCompleteRequestExist(
maintenanceDocument);
// Validate the document if the header is valid and no pending completion requests
if (completeRequestPending) {
return true;
}
// get the documentAuthorizer for this document
MaintenanceDocumentAuthorizer documentAuthorizer =
(MaintenanceDocumentAuthorizer) getDocumentDictionaryService().getDocumentAuthorizer(document);
// remove all items from the errorPath temporarily (because it may not
// be what we expect, or what we need)
clearErrorPath();
// setup convenience pointers to the old & new bo
setupBaseConvenienceObjects(maintenanceDocument);
// apply rules that are common across all maintenance documents, regardless of class
processGlobalSaveDocumentBusinessRules(maintenanceDocument);
// from here on, it is in a default-success mode, and will route unless one of the
// business rules stop it.
boolean success = true;
WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
if (workflowDocument.isInitiated() || workflowDocument.isSaved()) {
try {
success &= documentAuthorizer.canCreateOrMaintain((MaintenanceDocument) document,
GlobalVariables.getUserSession().getPerson());
if (success == false) {
GlobalVariables.getMessageMap().putError(KRADConstants.DOCUMENT_ERRORS,
RiceKeyConstants.AUTHORIZATION_ERROR_DOCUMENT,
new String[]{GlobalVariables.getUserSession().getPerson().getPrincipalName(),
"Create/Maintain", getDocumentDictionaryService().getMaintenanceDocumentTypeName(
newDataObject.getClass())});
}
} catch (RiceIllegalArgumentException e) {
// TODO error message the right way
GlobalVariables.getMessageMap().putError("Unable to determine authorization due to previous errors",
"Unable to determine authorization due to previous errors");
}
}
// apply rules that are common across all maintenance documents, regardless of class
success &= processGlobalRouteDocumentBusinessRules(maintenanceDocument);
// apply rules that are specific to the class of the maintenance document
// (if implemented). this will always succeed if not overloaded by the
// subclass
success &= processCustomRouteDocumentBusinessRules(maintenanceDocument);
success &= processInactivationBlockChecking(maintenanceDocument);
// return the original set of items to the errorPath, to ensure no impact
// on other upstream or downstream items that rely on the errorPath
resumeErrorPath();
return success;
}
示例4: processRouteDocument
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.rules.MaintenanceDocumentRule#processRouteDocument(org.kuali.rice.krad.document.Document)
*/
@Override
public boolean processRouteDocument(Document document) {
LOG.info("processRouteDocument called");
MaintenanceDocument maintenanceDocument = (MaintenanceDocument) document;
boolean completeRequestPending = RouteToCompletionUtil.checkIfAtleastOneAdHocCompleteRequestExist(maintenanceDocument);
// Validate the document if the header is valid and no pending completion requests
if (completeRequestPending) {
return true;
}
// get the documentAuthorizer for this document
MaintenanceDocumentAuthorizer documentAuthorizer =
(MaintenanceDocumentAuthorizer) getDocumentHelperService().getDocumentAuthorizer(document);
// remove all items from the errorPath temporarily (because it may not
// be what we expect, or what we need)
clearErrorPath();
// setup convenience pointers to the old & new bo
setupBaseConvenienceObjects(maintenanceDocument);
// apply rules that are common across all maintenance documents, regardless of class
processGlobalSaveDocumentBusinessRules(maintenanceDocument);
// from here on, it is in a default-success mode, and will route unless one of the
// business rules stop it.
boolean success = true;
WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();
if (workflowDocument.isInitiated() || workflowDocument.isSaved()) {
success &= documentAuthorizer
.canCreateOrMaintain((MaintenanceDocument) document, GlobalVariables.getUserSession().getPerson());
if (success == false) {
GlobalVariables.getMessageMap()
.putError(KRADConstants.DOCUMENT_ERRORS, RiceKeyConstants.AUTHORIZATION_ERROR_DOCUMENT,
new String[]{GlobalVariables.getUserSession().getPerson().getPrincipalName(),
"Create/Maintain",
this.getMaintDocDictionaryService().getDocumentTypeName(newBo.getClass())});
}
}
// apply rules that are common across all maintenance documents, regardless of class
success &= processGlobalRouteDocumentBusinessRules(maintenanceDocument);
// apply rules that are specific to the class of the maintenance document
// (if implemented). this will always succeed if not overloaded by the
// subclass
success &= processCustomRouteDocumentBusinessRules(maintenanceDocument);
success &= processInactivationBlockChecking(maintenanceDocument);
// return the original set of items to the errorPath, to ensure no impact
// on other upstream or downstream items that rely on the errorPath
resumeErrorPath();
return success;
}
示例5: determineValidActions
import org.kuali.rice.kew.api.WorkflowDocument; //导入方法依赖的package包/类
public static List<String> determineValidActions(WorkflowDocument wfdoc) throws WorkflowException {
String[] flags = new String[10];
List<String> list = new ArrayList<String>();
if (wfdoc == null) {
list.add(UserAction.ACTION_CREATE);
return list;
}
if (wfdoc.isAcknowledgeRequested()) {
flags[buttons.ACKNOWLEDGE.ordinal()] = UserAction.ACTION_ACKNOWLEDGE;
}
if (wfdoc.isApprovalRequested()) {
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
if (!wfdoc.isSaved()) {
flags[buttons.APPROVE.ordinal()] = UserAction.ACTION_APPROVE;
flags[buttons.DISAPPROVE.ordinal()] = UserAction.ACTION_DISAPPROVE;
}
// should invoke WorkflowDocument.saveRoutingData(...).
flags[buttons.SAVE.ordinal()] = UserAction.ACTION_SAVE;
if (wfdoc.getPreviousNodeNames().size() > 0) {
flags[buttons.RETURNTOPREVIOUS.ordinal()] = UserAction.ACTION_RETURN_TO_PREVIOUS;
}
}
// this will never happen, but left code in case this gets figured out later
// if allowed to execute save/approve and complete will both show
else if (wfdoc.isCompletionRequested()) {
flags[buttons.COMPLETE.ordinal()] = UserAction.ACTION_COMPLETE;
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
}
if (wfdoc.isFYIRequested()) {
flags[buttons.FYI.ordinal()] = UserAction.ACTION_FYI;
}
if (wfdoc.isRouteCapable()) {
flags[buttons.ROUTE.ordinal()] = UserAction.ACTION_ROUTE;
if (wfdoc.isBlanketApproveCapable()) {
flags[buttons.BLANKETAPPROVE.ordinal()] = UserAction.ACTION_BLANKETAPPROVE;
}
}
if (wfdoc.isApprovalRequested() || wfdoc.isRouteCapable()) {
flags[buttons.SAVE.ordinal()] = UserAction.ACTION_SAVE;
}
if (wfdoc.isCompletionRequested() || wfdoc.isRouteCapable()) {
flags[buttons.CANCEL.ordinal()] = UserAction.ACTION_CANCEL;
}
for (int i = 0; i < flags.length; i++) {
if (flags[i] != null) {
list.add(flags[i]);
}
}
return list;
}