diff --git a/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml b/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml index 77c866d3dae10eb71c919f0e554f29c8ebb9670c..c8c4a5c110f39f8f1318888fbb4aeec68c2d1c21 100644 --- a/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml +++ b/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml @@ -52,6 +52,7 @@ <key> <string>_body</string> </key> <value> <string encoding="cdata"><![CDATA[ +from DateTime import DateTime\n person = state_change[\'object\']\n portal = person.getPortalObject()\n # Get required arguments\n @@ -80,6 +81,8 @@ request_software_instance = portal.portal_catalog.getResultValue(\n title=software_title,\n )\n if (request_software_instance is None):\n + hosting_subscription_reference = "HOSTSUBS-%s" % context.getPortalObject().portal_ids\\\n + .generateNewId(id_group=\'slap_hosting_subscription_reference\', id_generator=\'uid\')\n if (portal.portal_activities.countMessageWithTag(tag) > 0):\n # The software instance is already under creation but can not be fetched from catalog\n # As it is not possible to fetch informations, it is better to raise an error\n @@ -99,6 +102,7 @@ if (request_software_instance is None):\n software_instance.portal_workflow.doActionFor(software_instance, \'validate_action\')\n subscription = portal.getDefaultModule(portal_type=hosting_subscription_portal_type).newContent(\n portal_type=hosting_subscription_portal_type,\n + reference=hosting_subscription_reference,\n title=software_title,\n activate_kw={\'tag\': tag},\n )\n @@ -211,6 +215,7 @@ else:\n <value> <tuple> <string>state_change</string> + <string>DateTime</string> <string>_getitem_</string> <string>person</string> <string>_getattr_</string> @@ -229,14 +234,14 @@ else:\n <string>tag</string> <string>request_software_instance</string> <string>None</string> + <string>context</string> + <string>hosting_subscription_reference</string> <string>NotImplementedError</string> <string>setup_service_relative_url</string> <string>_apply_</string> <string>software_instance</string> <string>subscription</string> - <string>context</string> <string>software_release_document</string> - <string>DateTime</string> <string>sale_order</string> <string>sale_order_line</string> <string>open_order</string> diff --git a/bt5/vifib_slap/bt/revision b/bt5/vifib_slap/bt/revision index f64b48379f00dff32d5bcccd67c0d82c2249eb86..d35d5f782448e98ccbcb1fa8e162c079cc627e52 100644 --- a/bt5/vifib_slap/bt/revision +++ b/bt5/vifib_slap/bt/revision @@ -1 +1 @@ -343 \ No newline at end of file +347 \ No newline at end of file