Commit 3b08d1b8 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: drop upgrade_slap_interface_workflow

parent 10c213d8
......@@ -13,6 +13,6 @@
</chain>
<chain>
<type>Upgrade Decision</type>
<workflow>edit_workflow, ticket_interaction_workflow, upgrade_decision_workflow, upgrade_slap_interface_workflow</workflow>
<workflow>edit_workflow, ticket_interaction_workflow, upgrade_decision_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, simulate
#from zExceptions import Unauthorized
import transaction
class TestSlapOSCoreProjectSlapInterfaceWorkflow(SlapOSTestCaseMixin):
def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self)
portal = self.getPortalObject()
person_user = self.makePerson()
self.tic()
self.login()
self.compute_node = self.portal.compute_node_module.template_compute_node\
.Base_createCloneDocument(batch_mode=1)
new_id = self.generateNewId()
self.compute_node.edit(
title="compute node %s" % (new_id, ),
reference="TESTCOMP-%s" % (new_id, ),
source_administration=person_user.getRelativeUrl()
)
self.compute_node.validate()
self.upgrade_decision = portal.upgrade_decision_module.newContent(
portal_type="Upgrade Decision",
)
# Value set by the init
self.assertTrue(self.upgrade_decision.getReference().startswith("UD-"),
"Reference don't start with UD- : %s" % self.upgrade_decision.getReference())
self.software_release = self._makeSoftwareRelease()
self.tic()
def _addUpgradeLine(self, aggregate):
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate_value_list=[self.software_release,
aggregate]
)
def beforeTearDown(self):
transaction.abort()
def test_upgrade_decision_approveRegistration_no_line(self):
self.assertRaises(ValueError, self.upgrade_decision.approveRegistration)
def test_upgrade_decision_approveRegistration_no_aggregate(self):
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate=self.software_release.getRelativeUrl()
)
self.assertRaises(ValueError, self.upgrade_decision.approveRegistration)
def test_upgrade_decision_approveRegistration_no_upgrade_scope(self):
self._addUpgradeLine(self.compute_node)
self.assertRaises(TypeError, self.upgrade_decision.approveRegistration)
def test_upgrade_decision_approveRegistration_computer(self):
self._addUpgradeLine(self.compute_node)
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
# Call again does nothing
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
self.tic()
# Call again does nothing again
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
def test_upgrade_decision_approveRegistration_instance_tree(self):
self._makeTree()
self._addUpgradeLine(self.instance_tree)
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
# Call again does nothing
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
self.tic()
# Call again does nothing again
self.upgrade_decision.approveRegistration(
upgrade_scope="ask_confirmation"
)
self.assertEqual("planned",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
def test_upgrade_decision_approveRegistration_computer_auto(self):
self._addUpgradeLine(self.compute_node)
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
# Call again does nothing
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
self.tic()
# Call again does nothing again
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.compute_node.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
def test_upgrade_decision_approveRegistration_instance_tree_auto(self):
self._makeTree()
self._addUpgradeLine(self.instance_tree)
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
# Call again does nothing
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
self.tic()
# Call again does nothing again
# Call again does nothing
self.upgrade_decision.approveRegistration(
upgrade_scope="auto"
)
self.assertEqual("started",
self.upgrade_decision.getSimulationState())
self.commit()
tag = "%s_requestUpgradeDecisionCreation_inProgress" % self.instance_tree.getUid()
self.assertEqual(2,
self.portal.portal_activities.countMessageWithTag(tag))
@simulate('InstanceTree_isUpgradePossible',
'software_release_url', 'return 1')
def test_upgrade_decision_requestUpgrade_instance_tree(self):
self._makeTree()
self._addUpgradeLine(self.instance_tree)
self.tic()
slap_state = self.instance_tree.getSlapState()
self.upgrade_decision.requestUpgrade()
self.assertNotEqual(self.software_release.getUrlString(),
self.instance_tree.getUrlString())
self.upgrade_decision.confirm()
self.upgrade_decision.start()
# Check that url_string change, but slap state doesn't
self.assertNotEqual(self.software_release.getUrlString(),
self.instance_tree.getUrlString())
self.upgrade_decision.requestUpgrade()
self.assertEqual(self.software_release.getUrlString(),
self.instance_tree.getUrlString())
self.assertEqual(slap_state, self.instance_tree.getSlapState())
self.assertEqual('stopped', self.upgrade_decision.getSimulationState())
def test_upgrade_decision_requestUpgrade_instance_tree_no_software_release(self):
self._makeTree()
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate_value_list=[self.instance_tree]
)
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.upgrade_decision.requestUpgrade()
self.assertEqual('started', self.upgrade_decision.getSimulationState())
def test_upgrade_decision_requestUpgrade_compute_node_no_software_release(self):
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate_value_list=[self.compute_node]
)
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.upgrade_decision.requestUpgrade()
self.assertEqual('started', self.upgrade_decision.getSimulationState())
def test_upgrade_decision_requestUpgrade_only_software_release(self):
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate_value_list=[self.software_release]
)
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.upgrade_decision.requestUpgrade()
self.assertEqual('started', self.upgrade_decision.getSimulationState())
def test_upgrade_decision_requestUpgrade_duplicated(self):
self._makeTree()
self.upgrade_decision.newContent(
portal_type="Upgrade Decision Line",
aggregate_value_list=[
self.software_release,
self.instance_tree,
self.compute_node]
)
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.assertRaises(ValueError, self.upgrade_decision.requestUpgrade)
self.assertEqual('started', self.upgrade_decision.getSimulationState())
def test_upgrade_decision_requestUpgrade_compute_node(self):
self._addUpgradeLine(self.compute_node)
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.upgrade_decision.requestUpgrade()
self.tic()
self.assertEqual('stopped', self.upgrade_decision.getSimulationState())
software_installation = self.compute_node.getAggregateRelatedValue(
portal_type='Software Installation')
self.assertEqual('start_requested', software_installation.getSlapState())
self.assertEqual(self.software_release.getUrlString(),
software_installation.getUrlString())
self.assertEqual('validated', software_installation.getValidationState())
@simulate('InstanceTree_isUpgradePossible',
'software_release_url', 'return 0')
def test_upgrade_decision_requestUpgrade_instance_tree_not_possible(self):
self._makeTree()
self._addUpgradeLine(self.instance_tree)
self.assertNotEqual(self.instance_tree.getUrlString(),
self.software_release.getUrlString())
slap_state = self.instance_tree.getSlapState()
self.upgrade_decision.confirm()
self.upgrade_decision.start()
self.tic()
self.upgrade_decision.requestUpgrade()
self.tic()
self.assertEqual('started', self.upgrade_decision.getSimulationState())
self.assertNotEqual(self.instance_tree.getUrlString(),
self.software_release.getUrlString())
self.assertEqual(slap_state,
self.instance_tree.getSlapState())
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudUpgradeSlapInterfaceWorkflow</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudUpgradeSlapInterfaceWorkflow</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>source/portal_workflow/upgrade_slap_interface_workflow/state_draft</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>person_slap_interface_workflow</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>upgrade_slap_interface_workflow</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>manager_bypass</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow</string> </value>
</item>
<item>
<key> <string>state_variable</string> </key>
<value> <string>slap_state</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Upgrade Slap Interface Workflow</string> </value>
</item>
<item>
<key> <string>workflow_managed_permission</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>state_change</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_UpgradeDecision_checkConsistency</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
upgrade_decision = state_change["object"]
from DateTime import DateTime
portal = context.getPortalObject()
# Get required arguments
kwargs = state_change.kwargs
# Required args
# Raise TypeError if all parameters are not provided
try:
message_title = kwargs['message_title']
message = kwargs['message']
destination_relative_url = kwargs['destination_relative_url']
except KeyError:
raise TypeError("UpgradeDecision_requestEvent takes exactly 3 arguments")
resource = portal.service_module.slapos_crm_information.getRelativeUrl()
# create Web message if needed for this ticket
last_event = portal.portal_catalog.getResultValue(
title=message_title,
follow_up_uid=upgrade_decision.getUid(),
sort_on=[('delivery.start_date', 'DESC')],
)
if last_event:
# User has already been notified for this problem.
return last_event
transactional_event = context.REQUEST.get("upgrade_decision_notified_item", None)
if transactional_event is not None:
if (transactional_event.getFollowUpUid() == upgrade_decision.getUid()) and \
(transactional_event.getTitle() == message_title):
return transactional_event
template = portal.restrictedTraverse(
portal.portal_preferences.getPreferredWebMessageTemplate())
event = template.Base_createCloneDocument(batch_mode=1)
event.edit(
title=message_title,
text_content=message,
start_date = DateTime(),
resource = resource,
source=upgrade_decision.getSource(),
destination=destination_relative_url,
follow_up=upgrade_decision.getRelativeUrl(),
)
event.stop()
event.deliver()
upgrade_decision.serialize()
upgrade_decision.REQUEST.set("upgrade_decision_notified_item", event)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>script_UpgradeDecision_notify</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Script</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>UpgradeDecision_notify</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>acquire_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/portal_workflow/upgrade_slap_interface_workflow/transition_notify</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>state_draft</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow State</string> </value>
</item>
<item>
<key> <string>state_permission_role_list_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>state_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Draft</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
<string>before_script/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_checkConsistency</string>
<string>after_script/portal_workflow/upgrade_slap_interface_workflow/script_UpgradeDecision_notify</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Create an event for the Upgrade Decision</string> </value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_notify</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Notify</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </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>id</string> </key>
<value> <string>variable_action</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</string> </key>
<value> <string>transition/getReference|nothing</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </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>id</string> </key>
<value> <string>variable_actor</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</string> </key>
<value> <string>user/getUserName</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </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>id</string> </key>
<value> <string>variable_comment</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</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="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </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>id</string> </key>
<value> <string>variable_error_message</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>0</int> </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>id</string> </key>
<value> <string>variable_history</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</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="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>portal type (use as filter for worklists)</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variable_portal_type</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Variable" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>automatic_update</string> </key>
<value> <int>1</int> </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>id</string> </key>
<value> <string>variable_time</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Variable</string> </value>
</item>
<item>
<key> <string>status_included</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>variable_default_expression</string> </key>
<value> <string>state_change/getDateTime</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -5,4 +5,3 @@ Software Product | commerce_validation_workflow
Upgrade Decision | edit_workflow
Upgrade Decision | ticket_interaction_workflow
Upgrade Decision | upgrade_decision_workflow
\ No newline at end of file
Upgrade Decision | upgrade_slap_interface_workflow
\ No newline at end of file
......@@ -2,4 +2,3 @@ test.erp5.testSlapOSPDMAlarm
test.erp5.testSlapOSPDMSkins
test.erp5.testSlapOSPDMDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm
test.erp5.testSlapOSPDMCreateUpgradeDecisionSkins
\ No newline at end of file
test.erp5.testSlapOSCloudUpgradeSlapInterfaceWorkflow
\ No newline at end of file
upgrade_decision_workflow
\ No newline at end of file
upgrade_slap_interface_workflow
\ No newline at end of file
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