Hello,
I need a workflow to be set on every documents that are about to be modified. A
"request approval" workflow. I just want the same workflow as if I was going
through the "TAB_CONTENT_REVIEW" page, selecting :
- approval WF
- modification allowed
I configured an event Java class to be run when a document is modified.
But in this very class, I cannot get the seam bean "documentWorkflowActions" :
public class Event_StartWF extends AbstractEventListener implements
AsynchronousEventListener {
@In(required = false, create = true)
protected transient DocumentWorkflowActions documentWorkflowActions;
public void notifyEvent(CoreEvent coreEvent) throws WMWorkflowException {
DocumentModel doc = (DocumentModel) coreEvent.getSource();
process(doc);
}
public void process(DocumentModel doc) throws WMWorkflowException {
documentWorkflowActions.startOneWorkflow();
}
}
The bean documentWorkflowActions is always null.
Is there any help for that. Am I on a wrong way to do this ?
Has anyone done the pretty same feature, and maybe coded it differently ?
Thank you all
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm