如果你可以重新說明你的問題,可能會使它更清晰。 你是什麼意思
做,如果文件被批准,它將被移動到「待批准」。
這是最好的露天開發者指南(在我個人看來)的先進工作流程之一。這給了一步一步的指導,以創建自定義工作流
Custom workflow Tutorial
您還可以找到的代碼片段移動和替換在露天文件「操作」 Here
,完整的類代碼Here
核心代號爲 「移動」 ONLY是:
public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef) {
// get the replaces associations for this node
List<AssociationRef> assocRefs = nodeService.getTargetAssocs(actionedUponNodeRef, ((QNamePattern) QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "replaces")));
// if there are none, return
if (assocRefs.isEmpty()) {
// no work to do, return
return;
} else {
NodeRef destinationParent = (NodeRef)ruleAction.getParameterValue(PARAM_DESTINATION_FOLDER);
for (AssociationRef assocNode : assocRefs) {
// create a noderef for the replaces association
NodeRef targetNodeRef = assocNode.getTargetRef();
// if the node exists
if (this.nodeService.exists(targetNodeRef) == true) {
try {
fileFolderService.move(targetNodeRef, destinationParent, null);
} catch (FileNotFoundException e) {
// Do nothing
}
}
} // next assocNode
} // end if isEmpty
}
希望這將有助於
謝謝......但是,如果我採用其他方式,使用執行腳本應用截止日期和顯示任務,有可能嗎?因爲我希望在文件夾中插入新文檔時自動運行工作流程。根據我在高級工作流程中的理解,我需要在文檔上指定。 –