Commit 8431f6e2 authored by Bartek Górny's avatar Bartek Górny

Reimplemented validation flag as publication workflow variable (removed...

Reimplemented validation flag as publication workflow variable (removed document_validation_workflow)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3d3302cc
......@@ -13,11 +13,11 @@
</chain>
<chain>
<type>File</type>
<workflow>dms_file_interaction_workflow, document_publication_workflow, edit_workflow, local_permission_interaction_workflow, -document_validation_workflow</workflow>
<workflow>dms_file_interaction_workflow, document_publication_workflow, edit_workflow, local_permission_interaction_workflow</workflow>
</chain>
<chain>
<type>Image</type>
<workflow>-document_validation_workflow, local_permission_interaction_workflow, edit_workflow, dms_file_interaction_workflow, document_publication_workflow</workflow>
<workflow>edit_workflow, dms_file_interaction_workflow, document_publication_workflow, local_permission_interaction_workflow</workflow>
</chain>
<chain>
<type>PDF</type>
......
......@@ -350,7 +350,7 @@
<string>Index</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_validation_state</string>
<string>State</string>
</tuple>
<tuple>
......@@ -415,7 +415,7 @@
<string>Index</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_validation_state</string>
<string>State</string>
</tuple>
</list>
......
......@@ -99,10 +99,10 @@
<string>my_title</string>
<string>my_url_string</string>
<string>my_url_protocol</string>
<string>my_translated_simulation_state_title</string>
<string>my_option_recursively</string>
<string>my_recursion_depth</string>
<string>external_processing_status_message</string>
<string>my_translated_validation_state_title</string>
</list>
</value>
</item>
......
......@@ -350,7 +350,7 @@
<string>Index</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_validation_state</string>
<string>State</string>
</tuple>
<tuple>
......@@ -407,7 +407,7 @@
<string>Index</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>translated_validation_state</string>
<string>State</string>
</tuple>
</list>
......
......@@ -113,8 +113,8 @@
<string>my_short_title</string>
<string>my_int_index</string>
<string>my_source_reference</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
<string>consistency_state</string>
</list>
</value>
</item>
......
......@@ -251,7 +251,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validation State</string> </value>
<value> <string>Publication State</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......
......@@ -112,10 +112,10 @@
<string>my_language</string>
<string>my_short_title</string>
<string>my_int_index</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
<string>my_source_reference</string>
<string>external_processing_status_message</string>
<string>consistency_state</string>
</list>
</value>
</item>
......
......@@ -279,7 +279,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_workflow.getInfoFor(ob=here, name=\'history\', wf_id=\'external_processing_workflow\')[-1][\'comment\']</string> </value>
<value> <string>python: here.portal_workflow.getInfoFor(ob=here, name=\'comment\', wf_id=\'external_processing_workflow\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -73,7 +73,7 @@
</item>
<item>
<key> <string>state_var</string> </key>
<value> <string>simulation_state</string> </value>
<value> <string>validation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -69,15 +69,20 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
called before submit to check if it is validate\n
or if it can be validated\n
called before submit to check if it is ok\n
otherwise set a special variable and raise validation exception\n
"""\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
ob=state_change.object\n
\n
vstate=ob.getValidationState()\n
if vstate != \'validated\':\n
ob.portal_workflow.doActionFor(ob, \'validate_action\')\n
res = ob.checkConsistency()\n
if res:\n
msg = str(res)\n
state_change.new_state.addVariable(\'consistency_state\', \'missing\')\n
raise ValidationFailed(msg)\n
else:\n
state_change.new_state.addVariable(\'consistency_state\', \'good\')\n
</string> </value>
</item>
<item>
......@@ -121,9 +126,13 @@ if vstate != \'validated\':\n
<value>
<tuple>
<string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>ob</string>
<string>vstate</string>
<string>res</string>
<string>str</string>
<string>msg</string>
</tuple>
</value>
</item>
......
......@@ -69,14 +69,12 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
invalidate document\n
(when it is hidden)\n
when a document is hidden\n
we have to \'uncheck\' its consistency flag\n
so that you know you have to check it again\n
"""\n
\n
ob=state_change.object\n
\n
if ob.getValidationState()==\'validated\':\n
ob.portal_workflow.doActionFor(ob, \'invalidate_action\')\n
state_change.new_state.addVariable(\'consistency_state\', \'not checked\')\n
</string> </value>
</item>
<item>
......@@ -127,7 +125,6 @@ if ob.getValidationState()==\'validated\':\n
<tuple>
<string>state_change</string>
<string>_getattr_</string>
<string>ob</string>
</tuple>
</value>
</item>
......
......@@ -56,6 +56,12 @@
<tuple/>
</value>
</item>
<item>
<key> <string>var_values</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
......@@ -142,4 +148,34 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary>
<item>
<key> <string>comment</string> </key>
<value> <string>uuuuuuuuuuu</string> </value>
</item>
<item>
<key> <string>consistency_state</string> </key>
<value> <string>good</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Variables</string>
<string>VariableDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_expr</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>consistency_state</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2007-01-29
Reimplemented validation flag as publication workflow variable.
2007-01-24
Major refactoring - almost everything changed.
......
463
\ No newline at end of file
466
\ No newline at end of file
......@@ -11,12 +11,10 @@ External Web Page | edit_workflow
External Web Page | external_document_interaction_workflow
External Web Page | external_document_publication_workflow
External Web Page | external_processing_workflow
File | -document_validation_workflow
File | dms_file_interaction_workflow
File | document_publication_workflow
File | edit_workflow
File | local_permission_interaction_workflow
Image | -document_validation_workflow
Image | dms_file_interaction_workflow
Image | document_publication_workflow
Image | edit_workflow
......
dms_file_interaction_workflow
document_publication_workflow
document_staging_workflow
document_validation_workflow
external_document_interaction_workflow
external_document_publication_workflow
external_processing_workflow
......
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