Commit d89a10a0 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_mysql_innodb_catalog: Replace translation join into a separate query.

Translation table seems to be often picked before other conditions by
MariaDB's query planner.
When there is at least one other condition on a query which require a
join (ex: category-based relation, delivery-table-based date
comparison, ...) this may not be the most efficient execution plan.
Instead, put translation lookup into its own separate query, in a way
similar to security_uid lookup. This way, two separate execution plans
can be used to execute the overall operation.
One drawback is that the new query does not know of any portal_type
condition, so all possible original values are listed along with their
respective portal types.
This does not seem to affect query performance, and on most common
(and simple) cases where a translated value is used, like module
listboxes, the query planner should be able to eliminate irrelevant
entries as such queries are already expected to provide a list of
relevant portal types and to lack condition nesting.
Preserve custom related keys: these are used when selecting or sorting,
while the scriptable keys are used when applying a condition.
Note on UI tests: mass workflow transition listbox is not supposed to be
sorted. It's bad that these tests all rely on row order, and also bad
that they all check the whole listbox. They should pick the line they
care about and not check the rest - except for one test whose purpose
would be to check the whole list anyway.
parent 4059e29e
Pipeline #6840 passed with stage
in 0 seconds
......@@ -51,57 +51,79 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1
<!-- we have a listbox with 3 lines, one for validation_state of all documents (draft), one for 2 Draft Foos, the other for 1
Validated Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>2 records</td>
<td>3 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>3</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[3]/a</td>
<td>Validated</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
......
......@@ -57,35 +57,57 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 1 line, for 1 Draft Foo -->
<!-- we have a listbox with 2 line, for all documents by validaiton_state, and for 1 Draft Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>1 records</td>
<td>2 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
......
......@@ -51,57 +51,79 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1
<!-- we have a listbox with 3 lines, one for all Drafts by validation state, one for 2 Draft Foos, the other for 1
Validated Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>2 records</td>
<td>3 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>3</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Custom Dialog Action</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[3]/a</td>
<td>Validated</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
......
......@@ -102,36 +102,58 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 1 line for 2 Draft Foos -->
<!-- we have a listbox with 2 lines, one for all documents by validation state, and one for 2 Draft Foos -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>1 records</td>
<td>2 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<!-- It's the number of element which will be validate -->
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
<tr>
......
......@@ -62,35 +62,57 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 1 line, for 1 Draft Foo -->
<!-- we have a listbox with 2 line, one for all documents by validation state, one for 1 Draft Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>1 records</td>
<td>2 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
......
......@@ -64,35 +64,57 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with 1 line, for 1 Draft Foo -->
<!-- we have a listbox with 2 lines, one for all documents by validation state, one for 1 Draft Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>1 records</td>
<td>2 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
......
......@@ -41,16 +41,16 @@
<td>Change State</td>
</tr>
<!-- we have a listbox with too lines, one for bars one for foos -->
<!-- we have a listbox with 4 lines, two for all documents by validation state, one for bars one for foos -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>2 records</td>
<td>4 records</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
......
......@@ -77,12 +77,12 @@
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[5]/select</td>
<td>label=Invalidate Action</td>
</tr>
......
......@@ -76,66 +76,101 @@ This is currently an expected failure.
<td>//input[@class="listbox_set_page workflow_action_listbox_set_page"]</td>
<td>\13</td>
</tr>
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1
<!-- we have a listbox with 3 lines, one for all documents by validation_state, one for 2 Draft Foos, the last one for 1
Validated Foo -->
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number workflow_action_listbox-current-page-total-number"]</td>
<td>2 records</td>
<td>3 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>3</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>type</td>
<td>//input[@class="listbox_set_page workflow_action_listbox_set_page"]</td>
<td>2</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>//input[@class="listbox_set_page workflow_action_listbox_set_page"]</td>
<td>\13</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[5]/select</td>
<td>label=Validate Action</td>
</tr>
<tr>
<td>type</td>
<td>//input[@class="listbox_set_page workflow_action_listbox_set_page"]</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>//input[@class="listbox_set_page workflow_action_listbox_set_page"]</td>
<td>\13</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Validated</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
......
......@@ -50,56 +50,79 @@
<td>select_action</td>
<td>Change State</td>
</tr>
<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1
<!-- we have a listbox with 3 lines, one for all documents by validation state, one for 2 Draft Foos, the last one for 1
Validated Foo -->
<tr>
<td>assertText</td>
<td>//span[@class=&quot;listbox-current-page-total-number workflow_action_listbox-current-page-total-number&quot;]</td>
<td>2 records</td>
<td>3 records</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[1]/a</td>
<td>3</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-0 ')]/td[4]/a</td>
<td>Foo Validation Workflow</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[1]/a</td>
<td>2</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[3]/a</td>
<td>Draft</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
<td>select</td>
<td>//tr[@class='workflow_action_listbox-data-line-0 DataA']/td[5]/select</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-1 ')]/td[5]/select</td>
<td>label=Custom Action No Dialog</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[1]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[1]/a</td>
<td>1</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[2]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[2]/a</td>
<td>Foo</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[3]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[3]/a</td>
<td>Validated</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='workflow_action_listbox-data-line-1 DataB']/td[4]/a</td>
<td>//tr[contains(concat(' ',normalize-space(@class),' '),' workflow_action_listbox-data-line-2 ')]/td[4]/a</td>
<td>Foo Workflow</td>
</tr>
<tr>
......
<workflow_chain>
<chain>
<type>Bar</type>
<workflow>edit_workflow, foo_workflow</workflow>
<workflow>edit_workflow, foo_workflow, bar_validation_workflow</workflow>
</chain>
<chain>
<type>Foo</type>
<workflow>edit_workflow, foo_workflow</workflow>
<workflow>edit_workflow, foo_workflow, foo_validation_workflow</workflow>
</chain>
<chain>
<type>Foo Line</type>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>creation_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>bar_validation_workflow</string> </value>
</item>
<item>
<key> <string>initial_state</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Access contents information</string>
<string>View</string>
<string>Add portal content</string>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>state_var</string> </key>
<value> <string>validation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Bar Validation Workflow</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="States" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>states</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Draft</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>really_validate</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Purposedly using the wrong title for translation testing !</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>invalidated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validated</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Purposedly using the wrong title for translation testing !</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>validated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidated</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>really_invalidate</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transitions" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transitions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>action that will mark the document as invalidated</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>really_invalidate</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>invalidated</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidate</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>action that will mark the document as validated</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>really_validate</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>validated</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getId|nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The name of the user who performed the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actor</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Comments about the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>comment</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<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>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>custom_workflow_variable</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<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>Error message if validation failed</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>error_message</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides access to workflow history</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>history</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Time of the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>time</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>creation_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>foo_validation_workflow</string> </value>
</item>
<item>
<key> <string>initial_state</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Access contents information</string>
<string>View</string>
<string>Add portal content</string>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>state_var</string> </key>
<value> <string>validation_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Foo Validation Workflow</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="States" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>states</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>draft</string> </value>
</item>
<item>
<key> <string>permission_roles</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Draft</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>really_validate</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>Access contents information</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
<item>
<key> <string>View</string> </key>
<value>
<tuple>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
</tuple>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>invalidated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidated</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StateDefinition" module="Products.DCWorkflow.States"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>validated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validated</string> </value>
</item>
<item>
<key> <string>transitions</string> </key>
<value>
<tuple>
<string>really_invalidate</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transitions" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transitions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>action that will mark the document as invalidated</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>really_invalidate</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>invalidated</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invalidate</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>action that will mark the document as validated</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>really_validate</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string>validated</string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Validate</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>action</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>transition/getId|nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The name of the user who performed the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>actor</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>user/getIdOrUserName</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Comments about the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>comment</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'comment\', \'\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<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>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>custom_workflow_variable</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<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>Error message if validation failed</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>error_message</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Provides access to workflow history</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>history</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>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getHistory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Time of the last transition</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>time</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>state_change/getDateTime</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Bar | edit_workflow
Bar | foo_workflow
Bar | bar_validation_workflow
Foo Line | pricing_interaction_workflow
Foo | edit_workflow
Foo | foo_workflow
Foo | foo_valiation_workflow
\ No newline at end of file
bar_validation_workflow
foo_workflow
foo_validation_workflow
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='causality_state',
message_context='causality_state',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedCausalityStateQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='causality_state',
message_context='causality_state_title',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedCausalityStateTitleQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='opportunity_state',
message_context='opportunity_state',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedOpportunityStateQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='opportunity_state',
message_context='opportunity_state_title',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedOpportunityStateTitleQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
operator_value_dict, logical_operator, _ = search_key.processSearchValue(
detect_like=True,
search_value=search_value,
default_logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
row_list = context.SQLCatalog_zSearchTranslation(
language=context.getPortalObject().Localizer.get_selected_language(),
message_context='portal_type',
logical_operator=logical_operator,
translated_message_dict=operator_value_dict,
)
if row_list:
return SimpleQuery(
group=group,
portal_type=list({x.portal_type for x in row_list}),
)
# No translation, match nothing.
return SimpleQuery(uid=-1)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedPortalTypeQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='simulation_state',
message_context='simulation_state',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedSimulationStateQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='simulation_state',
message_context='simulation_state_title',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedSimulationStateTitleQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='validation_state',
message_context='validation_state',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedValidationStateQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return context.SQLCatalog_makeTranslationQuery(
search_value=search_value,
column_id='validation_state',
message_context='validation_state_title',
search_key=search_key,
group=group,
logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslatedValidationStateTitleQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from collections import defaultdict
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
operator_value_dict, logical_operator, _ = search_key.processSearchValue(
detect_like=True,
search_value=search_value,
default_logical_operator=logical_operator,
comparison_operator=comparison_operator,
)
original_message_dict = defaultdict(set)
for row in context.SQLCatalog_zSearchTranslation(
language=context.getPortalObject().Localizer.get_selected_language(),
message_context=message_context,
logical_operator=logical_operator,
translated_message_dict=operator_value_dict,
):
original_message_dict[row.original_message].add(row.portal_type)
query_list = [
ComplexQuery(
SimpleQuery(
group=group,
comparison_operator='=',
**{column_id: original_message}
),
SimpleQuery(
group=group,
portal_type=list(portal_type_set),
),
logical_operator='and',
)
for original_message, portal_type_set in original_message_dict.iteritems()
]
if len(query_list) == 1:
return query_list[0]
if query_list:
return ComplexQuery(query_list, logical_operator='or')
# No translation, match nothing.
return SimpleQuery(uid=-1)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Python Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_value, column_id, message_context, search_key=None, group=None, logical_operator=None, comparison_operator=None</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeTranslationQuery</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Python Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
SELECT original_message, portal_type
FROM translation
<dtml-sqlgroup where>
<dtml-sqltest language type="string" op="eq"> <dtml-and>
<dtml-sqltest message_context type="string" op="eq"> <dtml-and>
<dtml-sqlgroup>
<dtml-if expr="'=' in translated_message_dict">
<dtml-sqltest column="translated_message" type="string" op="eq" expr="translated_message_dict['=']" multiple> <dtml-var logical_operator>
</dtml-if>
<dtml-if expr="'!=' in translated_message_dict">
<dtml-sqltest column="translated_message" type="string" op="ne" expr="translated_message_dict['!=']" multiple> <dtml-var logical_operator>
</dtml-if>
<dtml-if expr="'<' in translated_message_dict"><dtml-in expr="translated_message_dict['<']" prefix="value">
<dtml-sqltest column="translated_message" type="string" op="lt" expr="value_item"> <dtml-var logical_operator>
</dtml-in></dtml-if>
<dtml-if expr="'<=' in translated_message_dict"><dtml-in expr="translated_message_dict['<=']" prefix="value">
<dtml-sqltest column="translated_message" type="string" op="le" expr="value_item"> <dtml-var logical_operator>
</dtml-in></dtml-if>
<dtml-if expr="'>' in translated_message_dict"><dtml-in expr="translated_message_dict['>']" prefix="value">
<dtml-sqltest column="translated_message" type="string" op="gt" expr="value_item"> <dtml-var logical_operator>
</dtml-in></dtml-if>
<dtml-if expr="'>=' in translated_message_dict"><dtml-in expr="translated_message_dict['>=']" prefix="value">
<dtml-sqltest column="translated_message" type="string" op="ge" expr="value_item"> <dtml-var logical_operator>
</dtml-in></dtml-if>
<dtml-if expr="'like' in translated_message_dict"><dtml-in expr="translated_message_dict['like']" prefix="value">
<dtml-sqltest column="translated_message" type="string" op="like" expr="value_item"> <dtml-var logical_operator>
</dtml-in></dtml-if>
<dtml-if expr="logical_operator == 'and'">1<dtml-else>0</dtml-if>
</dtml-sqlgroup>
</dtml-sqlgroup>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL Method" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>language\n
message_context\n
logical_operator\n
translated_message_dict</string> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_zSearchTranslation</string> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>SQL Method</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SQLCatalog_zSearchTranslation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -3,5 +3,14 @@
<key>full_text | SQLCatalog_makeFullTextQuery</key>
<key>quick_search_text | SQLCatalog_makeQuickSearchQuery</key>
<key>search_text | SQLCatalog_makeSearchTextQuery</key>
<key>translated_causality_state | SQLCatalog_makeTranslatedCausalityStateQuery</key>
<key>translated_causality_state_title | SQLCatalog_makeTranslatedCausalityStateTitleQuery</key>
<key>translated_opportunity_state | SQLCatalog_makeTranslatedOpportunityStateQuery</key>
<key>translated_opportunity_state_title | SQLCatalog_makeTranslatedOpportunityStateTitleQuery</key>
<key>translated_portal_type | SQLCatalog_makeTranslatedPortalTypeQuery</key>
<key>translated_simulation_state | SQLCatalog_makeTranslatedSimulationStateQuery</key>
<key>translated_simulation_state_title | SQLCatalog_makeTranslatedSimulationStateTitleQuery</key>
<key>translated_title | SQLCatalog_makeTranslatedTitleQuery</key>
<key>translated_validation_state | SQLCatalog_makeTranslatedValidationStateQuery</key>
<key>translated_validation_state_title | SQLCatalog_makeTranslatedValidationStateTitleQuery</key>
</key_list>
\ No newline at end of file
......@@ -3,8 +3,19 @@ erp5_mysql_innodb/SQLCatalog_catalogTransformationList
erp5_mysql_innodb/SQLCatalog_getDocumentValueList
erp5_mysql_innodb/SQLCatalog_makeQuickSearchQuery
erp5_mysql_innodb/SQLCatalog_makeSearchTextQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedCausalityStateQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedCausalityStateTitleQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedOpportunityStateQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedOpportunityStateTitleQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedPortalTypeQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedSimulationStateQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedSimulationStateTitleQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedTitleQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedValidationStateQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedValidationStateTitleQuery
erp5_mysql_innodb/SQLCatalog_makeTranslationQuery
erp5_mysql_innodb/SQLCatalog_zGetDocumentValueList
erp5_mysql_innodb/SQLCatalog_zSearchTranslation
erp5_mysql_innodb/z0_drop_alarm
erp5_mysql_innodb/z0_drop_catalog
erp5_mysql_innodb/z0_drop_category
......
......@@ -3,3 +3,12 @@ advanced_search_text | SQLCatalog_makeQuickSearchQuery
full_text | SQLCatalog_makeFullTextQuery
search_text | SQLCatalog_makeSearchTextQuery
translated_title | SQLCatalog_makeTranslatedTitleQuery
translated_simulation_state_title | SQLCatalog_makeTranslatedSimulationStateTitleQuery
translated_validation_state_title | SQLCatalog_makeTranslatedValidationStateTitleQuery
translated_simulation_state | SQLCatalog_makeTranslatedSimulationStateQuery
translated_validation_state | SQLCatalog_makeTranslatedValidationStateQuery
translated_portal_type | SQLCatalog_makeTranslatedPortalTypeQuery
translated_causality_state | SQLCatalog_makeTranslatedCausalityStateQuery
translated_causality_state_title | SQLCatalog_makeTranslatedCausalityStateTitleQuery
translated_opportunity_state | SQLCatalog_makeTranslatedOpportunityStateQuery
translated_opportunity_state_title | SQLCatalog_makeTranslatedOpportunityStateTitleQuery
\ No newline at end of file
......@@ -162,3 +162,59 @@ class TestGUISecurity(ERP5TypeTestCase):
self.loginAs() # user without permission to access protected property
self.assertNotIn(protected_property_markup, self.portal.foo_module.foo.Foo_viewSecurity())
def test_translated_state_title_lookup(self):
"""
Tests that looking up document which have the same translated state title
but different states are found, and conversely same state document but with
different title are not found.
Note: not testing security, but here because this is one of the rare unit
tests which install erp5_ui_test.
"""
self.login()
portal = self.portal
newContent = portal.foo_bar_module.newContent
foo_1 = newContent(portal_type='Foo')
foo_1.reallyValidate()
foo_2 = newContent(portal_type='Foo')
foo_2.reallyValidate()
foo_2.reallyInvalidate()
bar_1 = newContent(portal_type='Bar')
bar_1.reallyValidate()
bar_2 = newContent(portal_type='Bar')
bar_2.reallyValidate()
bar_2.reallyInvalidate()
# Test sanity checks:
# - Foo: "correct" title
self.assertEqual(foo_1.getTranslatedValidationStateTitle(), 'Validated')
self.assertEqual(foo_2.getTranslatedValidationStateTitle(), 'Invalidated')
# - Bar: reversed title
self.assertEqual(bar_1.getTranslatedValidationStateTitle(), 'Invalidated')
self.assertEqual(bar_2.getTranslatedValidationStateTitle(), 'Validated')
self.tic()
self.assertItemsEqual(
portal.portal_catalog(
select_list=['translated_validation_state_title'],
uid=[
foo_1.getUid(),
foo_2.getUid(),
bar_1.getUid(),
bar_2.getUid(),
],
translated_validation_state_title='Validat%',
# Note: not actually tested, just checking nothing raises when this is
# provided.
sort_on=(('translated_validation_state_title', 'ASC'), ),
).dictionaries(),
[
{
'path': foo_1.getPath(),
'uid': foo_1.getUid(),
'translated_validation_state_title': 'Validated',
}, {
'path': bar_2.getPath(),
'uid': bar_2.getUid(),
'translated_validation_state_title': 'Validated',
}
],
)
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