139 lines
6.3 KiB
XML
139 lines
6.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<dc-workflow
|
|
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
i18n:domain="plone"
|
|
workflow_id="comment_multiple_state_review_workflow"
|
|
title="Comment Multiple State Review Workflow"
|
|
description="A review workflow for comments with multiple states"
|
|
state_variable="review_state"
|
|
initial_state="pending"
|
|
i18n:attributes="title; description"
|
|
>
|
|
<permission>Access contents information</permission>
|
|
<permission>Modify portal content</permission>
|
|
<permission>Reply to item</permission>
|
|
<permission>View</permission>
|
|
<state state_id="pending" title="Pending">
|
|
<description>Submitted, pending review.</description>
|
|
<exit-transition transition_id="mark_as_spam"/>
|
|
<exit-transition transition_id="publish"/>
|
|
<exit-transition transition_id="reject"/>
|
|
<permission-map name="Access contents information" acquired="False">
|
|
<permission-role>Manager</permission-role>
|
|
<permission-role>Owner</permission-role>
|
|
<permission-role>Reviewer</permission-role>
|
|
</permission-map>
|
|
<permission-map name="Modify portal content" acquired="False">
|
|
<permission-role>Manager</permission-role>
|
|
<permission-role>Owner</permission-role>
|
|
<permission-role>Reviewer</permission-role>
|
|
</permission-map>
|
|
<permission-map name="Reply to item" acquired="False">
|
|
</permission-map>
|
|
<permission-map name="View" acquired="False">
|
|
<permission-role>Manager</permission-role>
|
|
<permission-role>Owner</permission-role>
|
|
<permission-role>Reviewer</permission-role>
|
|
</permission-map>
|
|
</state>
|
|
<state state_id="published" title="Approved">
|
|
<description>Visible to everyone, non-editable.</description>
|
|
<exit-transition transition_id="mark_as_spam"/>
|
|
<exit-transition transition_id="recall"/>
|
|
<exit-transition transition_id="reject"/>
|
|
<permission-map name="Access contents information" acquired="True">
|
|
</permission-map>
|
|
<permission-map name="Modify portal content" acquired="False">
|
|
<permission-role>Manager</permission-role>
|
|
</permission-map>
|
|
<permission-map name="Reply to item" acquired="True">
|
|
</permission-map>
|
|
<permission-map name="View" acquired="True">
|
|
</permission-map>
|
|
</state>
|
|
<state state_id="rejected" title="Rejected">
|
|
<exit-transition transition_id="mark_as_spam"/>
|
|
<exit-transition transition_id="publish"/>
|
|
<exit-transition transition_id="recall"/>
|
|
</state>
|
|
<state state_id="spam" title="Spam">
|
|
<exit-transition transition_id="publish"/>
|
|
<exit-transition transition_id="recall"/>
|
|
<exit-transition transition_id="reject"/>
|
|
</state>
|
|
<transition transition_id="mark_as_spam" title="Mark as spam" new_state="spam" trigger="USER" before_script="" after_script="">
|
|
<description>Spam comments are invisible to other users.</description>
|
|
<action url="%(content_url)s/content_status_modify?workflow_action=mark_as_spam" category="workflow" icon="">Spam</action>
|
|
<guard>
|
|
<guard-permission>Review comments</guard-permission>
|
|
</guard>
|
|
</transition>
|
|
<transition transition_id="publish" title="Reviewer approves content" new_state="published" trigger="USER" before_script="" after_script="">
|
|
<description>Approving the comment makes it visible to other users.</description>
|
|
<action url="%(content_url)s/content_status_modify?workflow_action=publish" category="workflow" icon="">Approve</action>
|
|
<guard>
|
|
<guard-permission>Review comments</guard-permission>
|
|
</guard>
|
|
</transition>
|
|
<transition transition_id="recall" title="Reviewer recalls comment back to pending state" new_state="pending" trigger="USER" before_script="" after_script="">
|
|
<action url="%(content_url)s/content_status_modify?workflow_action=recall" category="workflow" icon="">Recall</action>
|
|
<guard>
|
|
<guard-permission>Review comments</guard-permission>
|
|
</guard>
|
|
</transition>
|
|
<transition transition_id="reject" title="Reviewer rejects comment" new_state="rejected" trigger="USER" before_script="" after_script="">
|
|
<description>Rejected comments are invisible to other users.</description>
|
|
<action url="%(content_url)s/content_status_modify?workflow_action=reject" category="workflow" icon="">Reject</action>
|
|
<guard>
|
|
<guard-permission>Review comments</guard-permission>
|
|
</guard>
|
|
</transition>
|
|
<variable variable_id="action" for_catalog="False" for_status="True" update_always="True">
|
|
<description>Previous 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 previous transition</description>
|
|
<default>
|
|
|
|
<expression>user/getUserName</expression>
|
|
</default>
|
|
<guard>
|
|
</guard>
|
|
</variable>
|
|
<variable variable_id="comments" for_catalog="False" for_status="True" update_always="True">
|
|
<description>Comment about the last transition</description>
|
|
<default>
|
|
|
|
<expression>python:state_change.kwargs.get('comment', '')</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>When the previous transition was performed</description>
|
|
<default>
|
|
|
|
<expression>state_change/getDateTime</expression>
|
|
</default>
|
|
<guard>
|
|
</guard>
|
|
</variable>
|
|
</dc-workflow>
|