Commit a587b12b authored by Arnaud Fontaine's avatar Arnaud Fontaine

ExpressionMixin: Allow to specify the property storing the TALES Expression.

Until now it was only used in ERP5Catalog where the expression property is
`expression` for both Python Script and SQL Method but this is also needed
for ERP5Workflow `guard_expression` and `variable_expression`.
parent 7aafd50e
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -42,9 +42,7 @@ We don\'t use ExpressConfiguration_displayDownload script, because it would crea ...@@ -42,9 +42,7 @@ We don\'t use ExpressConfiguration_displayDownload script, because it would crea
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -65,17 +63,4 @@ We don\'t use ExpressConfiguration_displayDownload script, because it would crea ...@@ -65,17 +63,4 @@ We don\'t use ExpressConfiguration_displayDownload script, because it would crea
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -66,17 +64,4 @@ ...@@ -66,17 +64,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</item> </item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <value> <string>python: True</string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -68,17 +66,4 @@ ...@@ -68,17 +66,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: True</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getReference|nothing</string> </value> <value> <string>transition/getReference|nothing</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value> <value> <string>user/getIdOrUserName</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value> <value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -24,21 +24,6 @@ ...@@ -24,21 +24,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value> <value> <string>state_change/getHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
</item> </item>
<item> <item>
<key> <string>variable_expression</string> </key> <key> <string>variable_expression</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value> <value> <string>state_change/getDateTime</string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -223,7 +223,7 @@ class TestERP5Workflow(ERP5TypeTestCase): ...@@ -223,7 +223,7 @@ class TestERP5Workflow(ERP5TypeTestCase):
self.assertEqual(transition.guard_group, ('Group1', 'Group2')) self.assertEqual(transition.guard_group, ('Group1', 'Group2'))
# expression # expression
transition.setGuardExpression('python: "Hello, world"') transition.setGuardExpression('python: "Hello, world"')
self.assertEqual(transition.guard_expression.text, 'python: "Hello, world"') self.assertEqual(transition.getGuardExpressionInstance().text, 'python: "Hello, world"')
def test_InteractionGuards(self): def test_InteractionGuards(self):
self.test_TransitionGuards(transition_type='Interaction') self.test_TransitionGuards(transition_type='Interaction')
......
...@@ -207,7 +207,7 @@ class TestWorklist(ERP5TypeTestCase): ...@@ -207,7 +207,7 @@ class TestWorklist(ERP5TypeTestCase):
if variable_value is None: if variable_value is None:
variable_value = worklist_value.newContent(portal_type='Worklist Variable') variable_value = worklist_value.newContent(portal_type='Worklist Variable')
variable_value.setReference('region_uid') variable_value.setReference('region_uid')
variable_value.setVariableExpressionText(v) variable_value.setVariableExpression(v)
if 'variable_base_category_id' in props: if 'variable_base_category_id' in props:
variable_value = worklist_value._getOb('variable_base_category_id', None) variable_value = worklist_value._getOb('variable_base_category_id', None)
v = props.get('variable_base_category_id', None) v = props.get('variable_base_category_id', None)
......
...@@ -64,7 +64,7 @@ class PythonScriptThroughZMI(XMLObject): ...@@ -64,7 +64,7 @@ class PythonScriptThroughZMI(XMLObject):
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
assert False assert False
class PythonScript(XMLObject, ZopePythonScript, ExpressionMixin): class PythonScript(XMLObject, ZopePythonScript, ExpressionMixin('expression')):
""" Script python for ERP5 """ Script python for ERP5
""" """
......
...@@ -60,7 +60,7 @@ def manage_addSQLMethod(self, id, title='', ...@@ -60,7 +60,7 @@ def manage_addSQLMethod(self, id, title='',
REQUEST['RESPONSE'].redirect( 'manage_main' ) REQUEST['RESPONSE'].redirect( 'manage_main' )
return c return c
class SQLMethod(XMLObject, ZSQL, ExpressionMixin): class SQLMethod(XMLObject, ZSQL, ExpressionMixin('expression')):
"""SQLMethod for ERP5. """SQLMethod for ERP5.
""" """
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<string>my_guard_permission_list</string> <string>my_guard_permission_list</string>
<string>my_guard_role_list</string> <string>my_guard_role_list</string>
<string>my_guard_group_list</string> <string>my_guard_group_list</string>
<string>my_guard_expression_text</string> <string>my_guard_expression</string>
<string>my_before_script_list</string> <string>my_before_script_list</string>
<string>my_after_script_list</string> <string>my_after_script_list</string>
<string>my_before_commit_script_list</string> <string>my_before_commit_script_list</string>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_guard_expression_text</string> </value> <value> <string>my_guard_expression</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<string>my_guard_permission_list</string> <string>my_guard_permission_list</string>
<string>my_guard_role_list</string> <string>my_guard_role_list</string>
<string>my_guard_group_list</string> <string>my_guard_group_list</string>
<string>my_guard_expression_text</string> <string>my_guard_expression</string>
<string>my_before_script_list</string> <string>my_before_script_list</string>
<string>my_after_script_list</string> <string>my_after_script_list</string>
</list> </list>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_guard_expression_text</string> </value> <value> <string>my_guard_expression</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<string>my_status_included</string> <string>my_status_included</string>
<string>my_automatic_update</string> <string>my_automatic_update</string>
<string>my_variable_value</string> <string>my_variable_value</string>
<string>my_variable_expression_text</string> <string>my_variable_expression</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<key> <string>right</string> </key> <key> <string>right</string> </key>
<value> <value>
<list> <list>
<string>my_guard_expression_text</string> <string>my_guard_expression</string>
<string>my_guard_group_list</string> <string>my_guard_group_list</string>
<string>my_guard_permission_list</string> <string>my_guard_permission_list</string>
<string>my_guard_role_list</string> <string>my_guard_role_list</string>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_guard_expression_text</string> </value> <value> <string>my_guard_expression</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_variable_expression_text</string> </value> <value> <string>my_variable_expression</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getVariableExpressionText()</string> </value> <value> <string>python: cell.getVariableExpression()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<string>my_guard_permission_list</string> <string>my_guard_permission_list</string>
<string>my_guard_role_list</string> <string>my_guard_role_list</string>
<string>my_guard_group_list</string> <string>my_guard_group_list</string>
<string>my_guard_expression_text</string> <string>my_guard_expression</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_guard_expression_text</string> </value> <value> <string>my_guard_expression</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -28,31 +28,61 @@ ...@@ -28,31 +28,61 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Utils import convertToUpperCase
class ExpressionMixin: def ExpressionMixin(property_reference='expression'):
security = ClassSecurityInfo() """
Mixin for a common pattern where ERP5 objects stores a TALES Expression as text.
def _setExpression(self, value): Usage examples:
Python Script/SQL Method: expression_property (reference=expression)
GuardableMixin: guard_expression_property (reference=guard_expression)
CMFCore.Expression already stores the Expression text as 'text' property and
create a volatile for the instance, so this may seem redundant and we may
have stored an Expression instance directly on the object. However this
would make exported objects depend on CMFCore.Expression and not storing
"directly" user input.
"""
property_reference_uppercase = convertToUpperCase(property_reference)
volatile_attribute_name = '_v_' + property_reference + '_instance'
def _setter(self, value):
"""
_set<PropertyReference>()
"""
try: try:
del self._v_expression_instance delattr(self, volatile_attribute_name)
except AttributeError: except AttributeError:
pass pass
self._baseSetExpression(value) getattr(self, '_baseSet' + property_reference_uppercase)(value)
security.declareProtected(Permissions.AccessContentsInformation, 'getExpressionInstance') def getter(self, default=None):
def getExpressionInstance(self, default=None): """
get<PropertyReference>Instance()
"""
try: try:
return self._v_expression_instance return getattr(self, volatile_attribute_name)
except AttributeError: except AttributeError:
expression = self.getExpression() expression = getattr(self, 'get' + property_reference_uppercase)
# Check if the expression is not None, because Expression(<expression>) # Check if the expression is not None, because Expression(<expression>)
# raises an error in case `expression` is empty or None. # raises an error in case `expression` is empty or None.
if expression: if expression:
result = Expression(expression) result = Expression(expression)
else: else:
result = None result = None
self._v_expression_instance = result setattr(self, volatile_attribute_name, result)
return result return result
InitializeClass(ExpressionMixin) class ExpressionMixin:
security = ClassSecurityInfo()
_setter.__name__ = '_set' + property_reference_uppercase
setattr(Expression, _setter.__name__, _setter)
getter.__name__ = 'get' + property_reference_uppercase + 'Instance'
setattr(ExpressionMixin, getter.__name__, getter)
ExpressionMixin.security.declareProtected(Permissions.AccessContentsInformation,
getter.__name__)
return ExpressionMixin
...@@ -596,7 +596,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -596,7 +596,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
if not vdef.checkGuard(getSecurityManager(), self, ob): if not vdef.checkGuard(getSecurityManager(), self, ob):
return default return default
status = self.getCurrentStatusDict(ob) status = self.getCurrentStatusDict(ob)
variable_expression = vdef.getVariableExpression() variable_expression = vdef.getVariableExpressionInstance()
if status is not None and status.has_key(name): if status is not None and status.has_key(name):
value = status[name] value = status[name]
...@@ -849,7 +849,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -849,7 +849,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
transition_expression_dict = {} transition_expression_dict = {}
if tdef is not None: if tdef is not None:
transition_expression_dict = { transition_expression_dict = {
variable.getCausalityId(): variable.getVariableExpression() variable.getCausalityId(): variable.getVariableExpressionInstance()
for variable in tdef.objectValues(portal_type='Transition Variable') for variable in tdef.objectValues(portal_type='Transition Variable')
} }
...@@ -875,12 +875,12 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -875,12 +875,12 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# Preserve former value # Preserve former value
value = former_status[variable_reference] value = former_status[variable_reference]
else: else:
variable_expression = vdef.getVariableExpression() variable_expression = vdef.getVariableExpressionInstance()
if variable_expression is not None: if variable_expression is not None:
# PATCH : if Default expression for 'actor' is 'user/getUserName', # PATCH : if Default expression for 'actor' is 'user/getUserName',
# we use 'user/getIdOrUserName' instead to store user ID for ERP5 # we use 'user/getIdOrUserName' instead to store user ID for ERP5
# user. # user.
if variable_id == 'actor' and variable_expression == 'user/getUserName': if variable_id == 'actor' and vdef.getVariableExpression() == 'user/getUserName':
expr = userGetIdOrUserNameExpression expr = userGetIdOrUserNameExpression
else: else:
expr = variable_expression expr = variable_expression
...@@ -1123,7 +1123,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -1123,7 +1123,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
for tr_var in tr_var_list: for tr_var in tr_var_list:
reference = self._getOb(tr_var.getCausalityId()).getReference() reference = self._getOb(tr_var.getCausalityId()).getReference()
transition_variable = SubElement(transition_variables, property_id, attrib=dict(id=reference,type='variable')) transition_variable = SubElement(transition_variables, property_id, attrib=dict(id=reference,type='variable'))
transition_variable.text = str(tr_var.getVariableExpressionText()) transition_variable.text = str(tr_var.getVariableExpression())
else: else:
property_value = tdef.getProperty(property_id) property_value = tdef.getProperty(property_id)
property_type = tdef.getPropertyType(property_id) property_type = tdef.getPropertyType(property_id)
...@@ -1293,7 +1293,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -1293,7 +1293,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# Preserve former value # Preserve former value
value = former_status[id] value = former_status[id]
else: else:
variable_expression = vdef.getVariableExpression() variable_expression = vdef.getVariableExpressionInstance()
if variable_expression is not None: if variable_expression is not None:
expr = variable_expression expr = variable_expression
else: else:
...@@ -1346,7 +1346,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -1346,7 +1346,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
for variable in self.getVariableValueList(): for variable in self.getVariableValueList():
if variable.getForCatalog(): if variable.getForCatalog():
variable_id = variable.getReference() variable_id = variable.getReference()
variable_expression = variable.getVariableExpression() variable_expression = variable.getVariableExpressionInstance()
if status.has_key(variable_id): if status.has_key(variable_id):
value = status[variable_id] value = status[variable_id]
elif variable_expression is not None: elif variable_expression is not None:
......
...@@ -32,9 +32,12 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,9 +32,12 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Workflow.mixin.guardable import GuardableMixin from Products.ERP5Workflow.mixin.guardable import GuardableMixin
from Products.ERP5.mixin.expression import ExpressionMixin
class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject, class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"),
GuardableMixin): XMLObject,
GuardableMixin,
ExpressionMixin('variable_expression')):
""" """
A ERP5 Workflow Variable. A ERP5 Workflow Variable.
""" """
...@@ -65,21 +68,3 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject, ...@@ -65,21 +68,3 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject,
PropertySheet.Guard, PropertySheet.Guard,
PropertySheet.WorkflowVariable, PropertySheet.WorkflowVariable,
) )
def _setVariableExpression(self, expression):
if isinstance(expression, basestring) and expression:
self.setVariableExpressionText(expression)
elif isinstance(expression, Expression) and expression.text:
self.variable_expression = expression
else:
self.variable_expression = None
security.declareProtected(Permissions.ModifyPortalContent,
'setVariableExpressionText')
def setVariableExpressionText(self, text):
self.variable_expression = Expression(text)
security.declareProtected(Permissions.AccessContentsInformation,
'getVariableExpressionText')
def getVariableExpressionText(self):
return getattr(self.variable_expression, 'text', '')
...@@ -7,6 +7,7 @@ from App.class_init import InitializeClass ...@@ -7,6 +7,7 @@ from App.class_init import InitializeClass
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from Persistence import Persistent from Persistence import Persistent
from Products.ERP5.mixin.expression import ExpressionMixin
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from Products.CMFCore.utils import _checkPermission from Products.CMFCore.utils import _checkPermission
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
...@@ -16,13 +17,16 @@ from Products.DCWorkflow.Expression import createExprContext ...@@ -16,13 +17,16 @@ from Products.DCWorkflow.Expression import createExprContext
from Products.DCWorkflow.utils import _dtmldir from Products.DCWorkflow.utils import _dtmldir
class GuardableMixin(object): class GuardableMixin(ExpressionMixin('guard_expression')):
''' """
code of methods and functions taken from code of methods and functions taken from
Products.DCWorkflow-2.2.4 > Guard.py Products.DCWorkflow-2.2.4 > Guard.py
'''
guard_expression = Expression('') ExpressionMixin:
_setGuardExpression()
getGuardExpressionInstance(default=None)
"""
guard_expression = None
guard_group = () guard_group = ()
guard_permission = () guard_permission = ()
guard_role = () guard_role = ()
...@@ -88,23 +92,11 @@ class GuardableMixin(object): ...@@ -88,23 +92,11 @@ class GuardableMixin(object):
break break
else: else:
return False return False
guard_expression = self.getGuardExpression() guard_expression = self.getGuardExpressionInstance()
if guard_expression and guard_expression.text: if guard_expression is not None:
expression_context = createExprContext(StateChangeInfo(current_object, expression_context = createExprContext(StateChangeInfo(current_object,
workflow, workflow,
kwargs=kw)) kwargs=kw))
if not guard_expression(expression_context): if not guard_expression(expression_context):
return False return False
return True return True
# Same as WorkflowVariable.variable_expression
def _setGuardExpression(self, text):
if text:
self.guard_expression = Expression(text)
else:
self.guard_expression = None
def _getGuardExpression(self):
if self.guard_expression is None:
return Expression('')
return self.guard_expression
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment