<?xml version="1.0"?>
<dc-workflow workflow_id="sector"
             xmlns:i18n="http://xml.zope.org/namespaces/i18n"
             i18n:domain="euphorie"
             title="Sector workflow"
             description="One-state workflow for sector objects, giving edit access to its contents to the sector user."
             state_variable="review_state" initial_state="hidden"
             i18n:attributes="title; description">
 <permission>Euphorie: Add new RIE Content</permission>
 <permission>Access contents information</permission>
 <permission>Add portal content</permission>
 <permission>Change portal events</permission>
 <permission>Modify portal content</permission>
 <permission>View</permission>
 <permission>Euphorie: Publish a survey</permission>

 <state state_id="hidden" title="Active" i18n:attributes="title">
   <description i18n:translate="">
     The One And Only state
   </description>
  <permission-map name="Euphorie: Add new RIE Content"
                  acquired="False">
    <permission-role>Sector</permission-role>
    <permission-role>CountryManager</permission-role>
    <permission-role>Manager</permission-role>
  </permission-map>
  <permission-map name="Euphorie: Publish a survey"
                  acquired="False">
    <permission-role>Sector</permission-role>
    <permission-role>CountryManager</permission-role>
    <permission-role>Manager</permission-role>
  </permission-map>
  <permission-map name="Access contents information"
                  acquired="False">
    <permission-role>Authenticated</permission-role>
    <permission-role>Sector</permission-role>
    <permission-role>Manager</permission-role>
    <permission-role>CountryManager</permission-role>
  </permission-map>
  <permission-map name="Add portal content"
                  acquired="False">
    <permission-role>Sector</permission-role>
    <permission-role>Manager</permission-role>
    <permission-role>CountryManager</permission-role>
  </permission-map>
  <permission-map name="Change portal events"
                  acquired="False">
    <permission-role>Sector</permission-role>
    <permission-role>Manager</permission-role>
    <permission-role>CountryManager</permission-role>
  </permission-map>
  <permission-map name="Modify portal content"
                  acquired="False">
    <permission-role>Sector</permission-role>
    <permission-role>Manager</permission-role>
    <permission-role>CountryManager</permission-role>
  </permission-map>
  <permission-map name="View"
                  acquired="True">
    <permission-role>Authenticated</permission-role>
    <permission-role>Sector</permission-role>
    <permission-role>Manager</permission-role>
    <permission-role>CountryManager</permission-role>
  </permission-map>
 </state>

 <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 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>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>
