Why you should learn more about workflow in Plone
Plone conference 2007, Napels. Speaker: Vincenzo Di Somma Company: RefLab
Plone conference 2007, Naples. Speaker: Vincenzo Di Somma Company: RefLab
Workflow from the beginning. This is mostly a hands-on talk, showing the portal_workflow in the ZMI.
Workflow is basically: during the life cycle of content there are changes in who is allowed to do what.
In Plone we use the workflow to manage the publication process. But we can use it for other things.
Plone 3.0 by default has six workflows now that you can choose from.
About four people in the audience have created workflows in the ZMI. About three have used ArchGenXML for this.
In the ZMI you can manage workflow variables. Usually: action, actor, comments, review_history, time. But you can add more yourself.
You can add worklists. By default there is the reviewer_queue. This is used by the Recent Items portlet to get a list of items that are in the pending workflow state.
On the Permissions tab you can list permissions that should be handled by this workflow: who is allowed to do what in which state.
Files and Images have no workflow anymore in Plone 3.0 by default. Question from the audience: why do they not have a on-state workflow? Answer: there are differences, but I would have to look up the code. Probably there are differences in what Anonymous visitors are allowed to see.
There is also the CMFPlacefulWorkflow, which you can install with the quick installer. [About three in the audience have worked with that.] It is very powerful. It lets you specify workflow policies. In there you can set a different default workflow and assign different workflows to content types. Within a folder object you can specify which policy to use. So you can use a different policy in different parts of your site.
You can change workflows through the ZMI or with a python file or with the newer, better way: with a xml file in a GenericSetup profile. In portal_setup you can export your current workflow to an xml file, because you do not want to create such an xml file from scratch.
Use case: Smanettona. Site for learning children about computers. Content that is added should be checked by an adult first. We use default Plone publishing workflow for the corporate part of the site. We use a restricted workflow for the home folder of the users. And an even more restricted workflow for the magazine.
You can manage more than just the publication process. You can send emails when a transition occurs. You can have worklists, like the reviewer queue.
Common requested improvements by customers on top of workflows:
- email alerts on workflow change (look at content rules in Plone 3.0)
- explicit selection of actors (like reviewers) by group, sections, etc.
- multireview: transition needs to be done by more than one person.
- link transitions: publishing A also automatically publishes B.
- multi site life cycle: once content is published on site A it is automatically published on site B.