AnsweredAssumed Answered

Advanced Workflow on spaves and not only content

Question asked by miggy4340 on Jun 6, 2007
Latest reply on Jun 20, 2007 by gavinc
Hello,

Is there any reasons to limit Advanced workflow in the UI to document.

I would be usefull for us to have adhoc task for folder.

After looking at the api, and the working of workflow packages it seems that nothing prevent this.

I modified the "start workflow with rules" example of the wiki to start the workflow on the parent of the document

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:adhoc";
workflow.parameters["bpm:workflowDescription"] = "ad hoc task on "  + document.name;
workflow.parameters["bpm:assignee"] = people.getPerson("admin");
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document.parent);

It doens't show up it the ui but if you use the node browser, the parent folder is containend in the workflow package. (the space in contained in 2 container, the parent space and the workflow package).

The <nodeWorkflowInfo>  doesn't seem to look for advanced worflow for spaces either.
There seems to be some code for this but there is a if (isContent) around it that makes it useless for spaces.

I this limitation just because it was not required at the time or will there be any tricky problem to do this.

Is there plan to add this in 2.1 or further versions.


Regards

Bertrand

Outcomes