<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
        <tuple/>
      </tuple>
    </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>_body</string> </key>
            <value> <string>from Products.ERP5Type.Message import translateString\n
\n
request = context.REQUEST\n
portal = context.getPortalObject()\n
\n
# generate a random tag\n
tag = \'folder_workflow_action_%s\' % random.randint(0, 1000)\n
\n
for parameters in listbox:\n
  doc = portal.restrictedTraverse(parameters[\'listbox_key\'])\n
  if same_type(parameters[\'workflow_action\'], \'\'):\n
    doc.activate(tag=tag).Base_workflowStatusModify(batch=1,\n
                                        workflow_action=parameters[\'workflow_action\'],\n
                                        workflow_id=parameters[\'workflow_id\'],\n
                                        comment=comment)\n
  else:\n
    for workflow_action, workflow_id in zip(\n
             parameters[\'workflow_action\'], parameters[\'workflow_id\']):\n
      doc.activate(activity=\'SQLQueue\', tag=tag).Base_workflowStatusModify(batch=1,\n
                                        workflow_action=workflow_action,\n
                                        workflow_id=workflow_id,\n
                                        comment=comment)\n
\n
context.activate(after_tag=tag).getTitle()\n
\n
return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n
                         context.absolute_url(), form_id,\n
                        translateString("Workflow modification in progress.")))\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>listbox, comment=\'\', form_id=\'view\', **kw</string> </value>
        </item>
        <item>
            <key> <string>errors</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
        <item>
            <key> <string>func_code</string> </key>
            <value>
              <object>
                <klass>
                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>co_argcount</string> </key>
                        <value> <int>3</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>listbox</string>
                            <string>comment</string>
                            <string>form_id</string>
                            <string>kw</string>
                            <string>Products.ERP5Type.Message</string>
                            <string>translateString</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>request</string>
                            <string>portal</string>
                            <string>random</string>
                            <string>tag</string>
                            <string>_getiter_</string>
                            <string>parameters</string>
                            <string>_getitem_</string>
                            <string>doc</string>
                            <string>same_type</string>
                            <string>zip</string>
                            <string>workflow_action</string>
                            <string>workflow_id</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <tuple>
                <string></string>
                <string>view</string>
              </tuple>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Folder_modifyWorkflowStatus</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
