+++ /dev/null
-<?xml version="1.0"?>
-<dc-workflow workflow_id="default_workflow"
- title="Plinn default workflow" description=""
- state_variable="review_state"
- initial_state="private" manager_bypass="0">
-
- <permission>Access contents information</permission>
- <permission>Change portal events</permission>
- <permission>Change portal topics</permission>
- <permission>Delete Owned Objects</permission>
- <permission>Manage properties</permission>
- <permission>Modify portal content</permission>
- <permission>View</permission>
- <state state_id="pending" title="Waiting for reviewer">
- <exit-transition transition_id="publish"/>
- <exit-transition transition_id="reject"/>
- <exit-transition transition_id="retract"/>
- <permission-map name="Access contents information"
- acquired="True">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Change portal events"
- acquired="False">
- <permission-role>Manager</permission-role>
- <permission-role>Reviewer</permission-role>
- </permission-map>
- <permission-map name="Change portal topics"
- acquired="False">
- <permission-role>Manager</permission-role>
- <permission-role>Reviewer</permission-role>
- </permission-map>
- <permission-map name="Delete Owned Objects"
- acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Manage properties" acquired="False">
- <permission-role>Manager</permission-role>
- <permission-role>Reviewer</permission-role>
- </permission-map>
- <permission-map name="Modify portal content"
- acquired="False">
- <permission-role>Manager</permission-role>
- <permission-role>Reviewer</permission-role>
- </permission-map>
- <permission-map name="View" acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- <permission-role>Reader</permission-role>
- <permission-role>Reviewer</permission-role>
- </permission-map>
- </state>
- <state state_id="private"
- title="Non-visible and editable only by owner">
- <exit-transition transition_id="direct_publish"/>
- <exit-transition transition_id="submit"/>
- <permission-map name="Access contents information"
- acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="Change portal events"
- acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="Change portal topics"
- acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="Delete Owned Objects"
- acquired="False">
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="Manage properties" acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="Modify portal content"
- acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- </permission-map>
- <permission-map name="View" acquired="False">
- <permission-role>Contributor</permission-role>
- <permission-role>Manager</permission-role>
- <permission-role>Owner</permission-role>
- <permission-role>Reader</permission-role>
- </permission-map>
- </state>
- <state state_id="published" title="Public">
- <exit-transition transition_id="reject"/>
- <exit-transition transition_id="retract"/>
- <permission-map name="Access contents information"
- acquired="True">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Change portal events"
- acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Change portal topics"
- acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Delete Owned Objects"
- acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Manage properties" acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="Modify portal content"
- acquired="False">
- <permission-role>Manager</permission-role>
- </permission-map>
- <permission-map name="View" acquired="True">
- <permission-role>Anonymous</permission-role>
- <permission-role>Manager</permission-role>
- </permission-map>
- </state>
- <transition transition_id="direct_publish"
- title="Reviewer publishes content"
- new_state="published" trigger="USER"
- before_script="" after_script="">
- <description>Reviewer can directly publish content if he have de Owner role (not necessarily ownership)</description>
- <action url="%(content_url)s/content_publish_form?direct:boolean=True"
- category="workflow">Publish</action>
- <guard>
- <guard-permission>Review portal content</guard-permission>
- <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
- </guard>
- </transition>
- <transition transition_id="publish"
- title="Reviewer publishes content"
- new_state="published" trigger="USER"
- before_script="" after_script="">
- <action url="%(content_url)s/content_publish_form"
- category="workflow">Publish</action>
- <guard>
- <guard-permission>Review portal content</guard-permission>
- </guard>
- </transition>
- <transition transition_id="reject"
- title="Reviewer rejects submission"
- new_state="private" trigger="USER"
- before_script="" after_script="">
- <action url="%(content_url)s/content_reject_form"
- category="workflow">Reject</action>
- <guard>
- <guard-permission>Review portal content</guard-permission>
- </guard>
- </transition>
- <transition transition_id="retract"
- title="Member retracts submission"
- new_state="private" trigger="USER"
- before_script="" after_script="">
- <action url="%(content_url)s/content_retract_form"
- category="workflow">Retract</action>
- <guard>
- <guard-permission>Request review</guard-permission>
- <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
- </guard>
- </transition>
- <transition transition_id="submit"
- title="Member requests publishing"
- new_state="pending" trigger="USER"
- before_script="" after_script="">
- <action url="%(content_url)s/content_submit_form"
- category="workflow">Submit</action>
- <guard>
- <guard-permission>Request review</guard-permission>
- </guard>
- </transition>
- <worklist worklist_id="reviewer_queue" title="">
- <description>Reviewer tasks</description>
- <action url="%(portal_url)s/list_pending_contents"
- category="global">Pending (%(count)d)</action>
- <guard>
- <guard-expression>here/havePendingContents</guard-expression>
- </guard>
- <match name="review_state" values="pending"/>
- </worklist>
- <variable variable_id="action" for_catalog="False"
- for_status="True" update_always="True">
- <description>The last transition</description>
- <default>
-
- <expression>transition/getId|nothing</expression>
- </default>
- <guard>
- </guard>
- </variable>
- <variable variable_id="actor" for_catalog="False"
- for_status="True" update_always="True">
- <description>The ID of the user who performed the last transition</description>
- <default>
-
- <expression>user/getId</expression>
- </default>
- <guard>
- </guard>
- </variable>
- <variable variable_id="comments" for_catalog="False"
- for_status="True" update_always="True">
- <description>Comments about the last transition</description>
- <default>
-
- <expression>python:state_change.kwargs.get('comment', '')</expression>
- </default>
- <guard>
- </guard>
- </variable>
- <variable variable_id="email_sent" for_catalog="False"
- for_status="True" update_always="True">
- <default>
-
- <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
- </default>
- <guard>
- </guard>
- </variable>
- <variable variable_id="review_history" for_catalog="False"
- for_status="False" update_always="False">
- <description>Provides access to workflow history</description>
- <default>
-
- <expression>state_change/getHistory</expression>
- </default>
- <guard>
- <guard-permission>Request review</guard-permission>
- <guard-permission>Review portal content</guard-permission>
- </guard>
- </variable>
- <variable variable_id="time" for_catalog="False"
- for_status="True" update_always="True">
- <description>Time of the last transition</description>
- <default>
-
- <expression>state_change/getDateTime</expression>
- </default>
- <guard>
- </guard>
- </variable>
- <script script_id="sendNotificationEmail"
- type="Script (Python)"
- filename="workflows/default_workflow/scripts/sendNotificationEmail.py"
- module="" function=""/>
-</dc-workflow>