如果你可以重新说明你的问题,可能会使它更清晰。 你是什么意思
做,如果文件被批准,它将被移动到“待批准”。
这是最好的露天开发者指南(在我个人看来)的先进工作流程之一。这给了一步一步的指导,以创建自定义工作流
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
}
希望这将有助于
谢谢......但是,如果我采用其他方式,使用执行脚本应用截止日期和显示任务,有可能吗?因为我希望在文件夹中插入新文档时自动运行工作流程。根据我在高级工作流程中的理解,我需要在文档上指定。 –