-
Notifications
You must be signed in to change notification settings - Fork 71
Workflow faq
By default the workflow engine looks up any "Parent" relationship to find inherited workflow definitions. Obviously for top level pages this doesn't go anywhere (as ParentID = 0). However, the workflow engine allows a user to define a workflowParent method in a class, which can be used to look at another object for inheriting from. A typical usecase would be for a Page class to look at a SiteConfig for workflow settings, eg
mysite/_config.php
Object::add_extension('SiteConfig', 'WorkflowApplicable');
Object::add_extension('SiteTree', 'WorkflowApplicable');
mysite/code/Page.php
class Page extends SiteTree {
// other code
public function workflowParent() {
return SiteConfig::current_site_config();
}
// other code
}
class Page_Controller extends ContentController {
}
Yes, but only if you're willing to write a bunch of code around how it's applied to files and how a workflow is 'started' for a file. There are plans to integrate this with versioned files in a much better way of doing things, but until then it's best to avoid this extension.
It's a workflow driven alternative to the MultiForm module. More details on how to use it will be provided later...