<?xml version="1.0" encoding="UTF-8"?>
<dc-workflow xmlns:tal="http://xml.zope.org/namespaces/tal"
workflow_id="dcworkflow"
title="Some DCWorkflow"
description="Some Description"
state_variable="review_state"
initial_state="visible" 
tal:define="info python: context.getWorkflowInfo(options['workflow_id'])"
tal:attributes="workflow_id info/id;
                title info/title;
                description info/description;
                manager_bypass info/manager_bypass;
                state_variable info/state_variable;
                initial_state info/initial_state"><tal:case 
tal:condition="info/creation_guard">
 <instance-creation-conditions 
tal:define="creation_guard info/creation_guard">
   <guard><tal:case 
tal:condition="creation_guard/guard_permissions">
    <guard-permission 
tal:repeat="permission creation_guard/guard_permissions"
tal:content="permission">PERMISSION</guard-permission></tal:case><tal:case 
tal:condition="creation_guard/guard_roles">
    <guard-role 
tal:repeat="role creation_guard/guard_roles"
tal:content="role">ROLE</guard-role></tal:case><tal:case 
tal:condition="creation_guard/guard_groups">
    <guard-group 
tal:repeat="group creation_guard/guard_groups"
tal:content="group">GROUP</guard-group></tal:case><tal:case 
tal:condition="creation_guard/guard_expr">
    <guard-expression 
tal:content="creation_guard/guard_expr">EXPR</guard-expression></tal:case>
   </guard>
 </instance-creation-conditions></tal:case><tal:case 
tal:condition="info/groups">
 <group 
tal:repeat="group info/groups"
tal:content="group">GROUP</group></tal:case><tal:case 
tal:condition="info/permissions">
 <permission 
tal:repeat="permission info/permissions"
tal:content="permission">PERMISSION</permission></tal:case><tal:case 
tal:condition="info/state_info">
 <state state_id="pending"
title="Waiting for reviewer"
tal:repeat="state info/state_info"
tal:attributes="state_id state/id;
                title state/title"><tal:case 
tal:condition="state/description">
  <description 
tal:content="state/description">DESCRIPTION</description></tal:case><tal:case 
tal:condition="state/transitions">
  <exit-transition transition_id="TRANSITION_ID"
tal:repeat="exit state/transitions"
tal:attributes="transition_id exit"/></tal:case><tal:case 
tal:condition="state/permissions">
  <permission-map name=""
acquired="True"
tal:repeat="perm state/permissions"
tal:attributes="name perm/name;
                acquired perm/acquired"><tal:case 
tal:condition="perm/roles">
   <permission-role 
tal:repeat="role perm/roles"
tal:content="role">ROLE</permission-role></tal:case>
  </permission-map></tal:case><tal:case 
tal:condition="state/groups">
  <group-map name=""
tal:repeat="group state/groups"
tal:attributes="name python: group[0]">
   <group-role 
tal:repeat="role python: group[1]"
tal:content="role">ROLE</group-role>
  </group-map></tal:case><tal:case 
tal:condition="state/variables">
  <assignment name="VAR_NAME"
type="VAR_TYPE"
tal:repeat="var state/variables"
tal:attributes="name var/name;
                type var/type"
tal:content="var/value">VALUE</assignment></tal:case>
 </state></tal:case><tal:case 
tal:condition="info/transition_info">
 <transition transition_id="Publish"
title="Reviewer publishes content"
new_state="published"
trigger="USER"
before_script=""
after_script=""
tal:repeat="transition info/transition_info"
tal:attributes="transition_id transition/id;
                title transition/title;
                new_state transition/new_state_id;
                trigger transition/trigger_type;
                before_script transition/script_name;
                after_script transition/after_script_name"><tal:case 
tal:condition="transition/description">
  <description 
tal:content="transition/description">DESCRIPTION</description></tal:case>
  <action url="URL"
category="CATEGORY"
tal:condition="transition/actbox_name"
tal:attributes="url transition/actbox_url;
                icon transition/actbox_icon;
                category transition/actbox_category"
tal:content="transition/actbox_name">ACTION NAME</action>
  <guard><tal:case 
tal:condition="transition/guard_permissions">
   <guard-permission 
tal:repeat="permission transition/guard_permissions"
tal:content="permission">PERMISSION</guard-permission></tal:case><tal:case 
tal:condition="transition/guard_roles">
   <guard-role 
tal:repeat="role transition/guard_roles"
tal:content="role">ROLE</guard-role></tal:case><tal:case 
tal:condition="transition/guard_groups">
   <guard-group 
tal:repeat="group transition/guard_groups"
tal:content="group">GROUP</guard-group></tal:case><tal:case 
tal:condition="transition/guard_expr">
   <guard-expression 
tal:content="transition/guard_expr">EXPRESSION</guard-expression></tal:case>
  </guard><tal:case 
tal:condition="transition/variables">
  <assignment name="VAR_NAME"
tal:repeat="var transition/variables"
tal:attributes="name var/name"
tal:content="var/expr">EXPRESSION</assignment></tal:case>
 </transition></tal:case><tal:case 
tal:condition="info/worklist_info">
 <worklist worklist_id="reviewer_queue"
title="For Review"
tal:repeat="worklist info/worklist_info"
tal:attributes="worklist_id worklist/id;
                title worklist/title"><tal:case 
tal:condition="worklist/description">
  <description 
tal:content="worklist/description">DESCRIPTION</description></tal:case>
  <action url="URL"
category="CATEGORY"
tal:condition="worklist/actbox_name"
tal:attributes="url worklist/actbox_url;
                category worklist/actbox_category;
                icon worklist/actbox_icon"
tal:content="worklist/actbox_name">ACTION NAME</action>
  <guard><tal:case 
tal:condition="worklist/guard_permissions">
   <guard-permission 
tal:repeat="permission worklist/guard_permissions"
tal:content="permission">PERMISSION</guard-permission></tal:case><tal:case 
tal:condition="worklist/guard_roles">
   <guard-role 
tal:repeat="role worklist/guard_roles"
tal:content="role">ROLE</guard-role></tal:case><tal:case 
tal:condition="worklist/guard_groups">
   <guard-group 
tal:repeat="group worklist/guard_groups"
tal:content="group">GROUP</guard-group></tal:case><tal:case 
tal:condition="worklist/guard_expr">
   <guard-expression 
tal:content="worklist/guard_expr">EXPRESSION</guard-expression></tal:case>
  </guard>
  <match name="review_state"
values="pending" 
tal:repeat="match worklist/var_match"
tal:attributes="name python: match[0];
                values python: match[1]"/>
 </worklist></tal:case><tal:case 
tal:condition="info/variable_info">
 <variable variable_id="action"
for_catalog="True"
for_status="True"
update_always="True"
tal:repeat="variable info/variable_info"
tal:attributes="variable_id variable/id;
                for_catalog variable/for_catalog;
                for_status variable/for_status;
                update_always variable/update_always"><tal:case 
tal:condition="variable/description">
  <description 
tal:content="variable/description">DESCRIPTION</description></tal:case>
  <default>
   <value type="VAR_TYPE"
tal:attributes="type variable/default_type"
tal:condition="variable/default_value"
tal:content="variable/default_value">VALUE</value>
   <expression 
tal:condition="variable/default_expr"
tal:content="variable/default_expr">EXPRESSION</expression>
  </default>
  <guard><tal:case 
tal:condition="variable/guard_permissions">
   <guard-permission 
tal:repeat="permission variable/guard_permissions"
tal:content="permission">PERMISSION</guard-permission></tal:case><tal:case 
tal:condition="variable/guard_roles">
   <guard-role 
tal:repeat="role variable/guard_roles"
tal:content="role">ROLE</guard-role></tal:case><tal:case 
tal:condition="variable/guard_groups">
   <guard-group 
tal:repeat="group variable/guard_groups"
tal:content="group">GROUP</guard-group></tal:case><tal:case 
tal:condition="variable/guard_expr">
   <guard-expression 
tal:content="variable/guard_expr">EXPRESSION</guard-expression></tal:case>
  </guard>
 </variable></tal:case><tal:case 
tal:condition="info/script_info">
 <script script_id="SCRIPT_ID"
type="Script (Python)"
filename="/path/to/SCRIPT_ID.py"
module=""
function=""
tal:repeat="script info/script_info"
tal:attributes="script_id script/id;
                type script/meta_type;
                filename script/filename;
                module script/module;
                function script/function"/></tal:case>
</dc-workflow>
