Configuring Workflow for Your XP Project
explain how to setup workflow and workflow policy for you XP Project.
iscorpio.plonepm provides a set of workflows and placeful workflow policy, for example plonepm private workflow and plonepm private workflow policy. Those are working fine and do satisfy some generic workflow requirements. But for some specific requirement, the default plonepm workflow might not good enough.
Fortunately, Plone 3 offer's very flexible way to customize and tunning your workflow so it can full fit your personal requirement.
This use case is trying to provide a guide line for a end use to customize the tuning the workflow and workflow policy to fit his/her special business requirement.
Scenario for testing
Define your own workflows in portal_workflow
It is very easy to define your own workflow from the portal workflow tool (ZMI/portal_workflow). You could add a new workflow from scratch or copy an existing workflow and fix/add the states and permissions based on your own business requirement.
Copy and revise an existing workflow is easy to go with:
- ZMI/portal_workflow, Contents tab
- copy and paste folder_workflow, rename it to plonexp_private_folder_workflow
- in ZMI/portal_workflow/plonexp_private_folder_workflow, change the Title to "PloneXP Private Folder Workflow"
- in ZMI/portal_workflow/plonexp_private_folder_workflow/states
set private as initial state - in states/published Permissions tab
take off all permissions for role Anonymous and set the permissions for other roles correspondingly. - do the similar work in states/visible Permissions tab
Now we will do the similar work to add a work flow calledplonexp_private_content_workflow, copy from plone_workflow.
Define your own workflow policy in portal_placeful_workflow
First of all, you need install "Workflow Policy Support (CMFPlacefulWorkflow)". Plone 3.x+ will include this produce by default.
Adding a workflow policy is very easy:
- click the "Add WorkflowPolicy" button from ZMI/portal_placeful_workflow
- set the id to plonexp_private_workflow_policy
- configure plonexp_private_workflow_policy
- set the Title to "PloneXP Private Workflow Policy"
- set (Default) to plonexp_private_content_workflow
- set following types to plonexp_private_folder_workflow
- PPMProject (XP Project)
- Folder
- Large Plone Folder (Large Folder)
- set all other types to (Default)
Now, you have a workflow policy called PloneXP Private Workflow Policy can be picked up in the Policy for any folderish content in your Plone site. This policy will set your project as a Private project: un-authorized people will not see anything within this project.
NOTE: The CMFPlacefulWorkflow configlet "Workflow Policies" will not show the types which could not be added on root of the site. You need go to ZMI to set up workflow for those types. Also the configlet is working very well about "update security settings" after change the workflow mapping! So ZMI is the better way to customize your workflow policies.