<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
    </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 encoding="cdata"><![CDATA[

from zExceptions import Unauthorized\n
if REQUEST is not None:\n
  raise Unauthorized\n
\n
portal = context.getPortalObject()\n
ticket = context\n
current_service = portal.restrictedTraverse(current_service_relative_url)\n
assert current_service.getPortalType() == "Service"\n
\n
event_portal_type = "Mail Message"\n
\n
event = portal.portal_catalog.getResultValue(\n
  portal_type=event_portal_type,\n
  default_resource_uid=current_service.getUid(),\n
  default_follow_up_uid=ticket.getUid(),\n
  simulation_state="delivered",\n
)\n
\n
if (ticket.getSimulationState() == \'suspended\') and (event is not None) and (ticket.getResource() == current_service_relative_url):\n
  if (DateTime() - event.getStartDate()) > delay_period_in_days:\n
    ticket.RegularisationRequest_checkToSendUniqEvent(next_service_relative_url, title, text_content, comment)\n
    return event.getRelativeUrl()\n
\n
return None\n


]]></string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>delay_period_in_days, current_service_relative_url, next_service_relative_url, title, text_content, comment, REQUEST=None</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>RegularisationRequest_checkToTriggerNextEscalationStep</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
