本文整理汇总了Java中org.kuali.rice.krad.service.DocumentService.saveDocumentNotes方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentService.saveDocumentNotes方法的具体用法?Java DocumentService.saveDocumentNotes怎么用?Java DocumentService.saveDocumentNotes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.service.DocumentService
的用法示例。
在下文中一共展示了DocumentService.saveDocumentNotes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPurchaseOrderNote
import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
public void addPurchaseOrderNote(DocumentRouteLevelChange levelChangeEvent) {
String newNodeName = levelChangeEvent.getNewNodeName();
if (newNodeName != null
&& (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE) || newNodeName
.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET))) {
String note = "";
if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)){
note = OLEConstants.SufficientFundCheck.PO_NOTE;
}
if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)){
note = OLEConstants.SufficientFundCheck.FYI_NOTE;
}
DocumentService documentService = SpringContext.getBean(DocumentService.class);
Note apoNote = documentService.createNoteFromDocument(this, note);
this.addNote(apoNote);
documentService.saveDocumentNotes(this);
}
}
示例2: doRouteLevelChange
import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.kns.document.DocumentBase#handleRouteLevelChange(org.kuali.rice.kew.clientapp.vo.DocumentRouteLevelChangeDTO)
*/
@Override
public void doRouteLevelChange(DocumentRouteLevelChange change) {
LOG.debug("handleRouteLevelChange() started");
super.doRouteLevelChange(change);
try {
String newNodeName = change.getNewNodeName();
if (StringUtils.isNotBlank(newNodeName)) {
RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
.createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
List<String> desiredActions = new ArrayList<String>(2);
desiredActions.add(ActionRequestType.APPROVE.getCode());
desiredActions.add(ActionRequestType.COMPLETE.getCode());
String note = "";
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
|| newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)) {
note = OLEConstants.SufficientFundCheck.REQ_NOTE;
}
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
note = OLEConstants.SufficientFundCheck.FYI_NOTE;
}
DocumentService documentService = SpringContext.getBean(DocumentService.class);
Note apoNote = documentService.createNoteFromDocument(this, note);
this.addNote(apoNote);
documentService.saveDocumentNotes(this);
}
}
} catch (Exception e) {
String errorMsg = "Workflow Error found checking actions requests on document with id "
+ getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
LOG.error(errorMsg, e);
}
}
示例3: doRouteLevelChange
import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.document.DocumentBase#doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)
*/
@Override
public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) {
super.doRouteLevelChange(levelChangeEvent);
try {
String newNodeName = levelChangeEvent.getNewNodeName();
List<String> desiredActions = new ArrayList<String>(2);
RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
.createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
desiredActions.add(ActionRequestType.APPROVE.getCode());
desiredActions.add(ActionRequestType.COMPLETE.getCode());
if (KewApiServiceLocator.getWorkflowDocumentActionsService().documentWillHaveAtLeastOneActionRequest(
reportCriteria.build(), desiredActions, false)) {
if (StringUtils.isNotBlank(newNodeName)) {
if (StringUtils.isNotBlank(newNodeName)) {
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
|| newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
String note = OLEConstants.SufficientFundCheck.PREQ_NOTE;
DocumentService documentService = SpringContext.getBean(DocumentService.class);
Note apoNote = documentService.createNoteFromDocument(this, note);
this.addNote(apoNote);
documentService.saveDocumentNotes(this);
}
}
}
}
} catch (Exception e) {
String errorMsg = "Workflow Error found checking actions requests on document with id "
+ getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
LOG.error(errorMsg, e);
}
}
示例4: addPurchaseOrderNote
import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
public void addPurchaseOrderNote(DocumentRouteLevelChange levelChangeEvent) {
String newNodeName = levelChangeEvent.getNewNodeName();
RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
.createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
if (newNodeName != null
&& (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE) || newNodeName
.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET))) {
String note = "";
if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)){
note = OLEConstants.SufficientFundCheck.POA_NOTE;
}
if(newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)){
note = OLEConstants.SufficientFundCheck.FYI_NOTE;
}
DocumentService documentService = SpringContext.getBean(DocumentService.class);
Note apoNote = documentService.createNoteFromDocument(this, note);
this.addNote(apoNote);
String documentTypeName = this.getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
if (documentTypeName != null
&& documentTypeName.equals(OLEConstants.FinancialDocumentTypeCodes.PURCHASE_ORDER_AMENDMENT)) {
documentService.saveDocumentNotes(this);
}
}
}
示例5: doRouteLevelChange
import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.document.DocumentBase#doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)
*/
@Override
public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) {
super.doRouteLevelChange(levelChangeEvent);
try {
String newNodeName = levelChangeEvent.getNewNodeName();
List<String> desiredActions = new ArrayList<String>(2);
RoutingReportCriteria.Builder reportCriteria = RoutingReportCriteria.Builder
.createByDocumentIdAndTargetNodeName(getDocumentNumber(), newNodeName);
desiredActions.add(ActionRequestType.APPROVE.getCode());
desiredActions.add(ActionRequestType.FYI.getCode());
desiredActions.add(ActionRequestType.COMPLETE.getCode());
if (KewApiServiceLocator.getWorkflowDocumentActionsService().documentWillHaveAtLeastOneActionRequest(
reportCriteria.build(), desiredActions, false)) {
if (StringUtils.isNotBlank(newNodeName)) {
if (StringUtils.isNotBlank(newNodeName)) {
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)
|| newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
String note = "";
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.BUDGET_NODE)) {
note = OLEConstants.SufficientFundCheck.INV_NOTE;
}
if (newNodeName.equalsIgnoreCase(PurapWorkflowConstants.FYI_BUDGET)) {
note = OLEConstants.SufficientFundCheck.FYI_NOTE;
}
DocumentService documentService = SpringContext.getBean(DocumentService.class);
Note apoNote = documentService.createNoteFromDocument(this, note);
this.addNote(apoNote);
documentService.saveDocumentNotes(this);
}
}
}
}
} catch (Exception e) {
String errorMsg = "Workflow Error found checking actions requests on document with id "
+ getDocumentNumber() + ". *** WILL NOT UPDATE PURAP STATUS ***";
LOG.error(errorMsg, e);
}
}