使用规则,并在露天简单的JavaScript开始是很容易的,但我被困在试图通过javascript来启动工作流增加的资源。
我的目标是增加用于启动流程的文件(或文件),这样我就可以得到在该露天办公桌的露天BPM的“OW_ATTACHMENTS”的参考。 我试过很多次与BPM:workflowpagckage或BPM:包装,没有运气....帮助!
编辑:
function startWorkflow(name,docNode)
{
var workflow = actions.create("start-workflow");
workflow.parameters["bpm:workflowPackage"] = docNode;
workflow.parameters.workflowName = "activiti$AdHocactivitiTimer";
workflow.parameters["bpm:assignee"] = people.getPerson("admin");
workflow.parameters["bpm:workflowDescription"] = "test";
workflow.parameters["bpm:workflowPriority"] = "2";
workflow.parameters["bpm:sendEMailNotifications"] = true;
workflow.parameters["initiator"] = people.getPerson("admin");
var today = new Date();
var duedate = today.getDate() + 1;
workflow.parameters["bpm:workflowDueDate"] = duedate;
workflow.execute(document);
}
function main()
{
var docNode = search.findNode(document.nodeRef);
var name = document.name;
startWorkflow(name,docNode);
}
main();
谢谢!