From 50ab97c9c11b719caee2af86ab05ad80144910fc Mon Sep 17 00:00:00 2001 From: tan-tan-kanarek Date: Sun, 8 Mar 2015 18:22:12 +0200 Subject: [PATCH] Support loading engine from server side --- ...ctivitiBusinessProcessNotificationPlugin.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/event_notification/providers/bpm/providers/activiti/ActivitiBusinessProcessNotificationPlugin.php b/plugins/event_notification/providers/bpm/providers/activiti/ActivitiBusinessProcessNotificationPlugin.php index 074d5b17c1d..daec3db2928 100644 --- a/plugins/event_notification/providers/bpm/providers/activiti/ActivitiBusinessProcessNotificationPlugin.php +++ b/plugins/event_notification/providers/bpm/providers/activiti/ActivitiBusinessProcessNotificationPlugin.php @@ -72,11 +72,20 @@ public static function getObjectClass($baseClass, $enumValue) { if($baseClass == 'kBusinessProcessProvider') { - if(class_exists('Kaltura_Client_BusinessProcessNotification_Enum_BusinessProcessProvider') && $enumValue == Kaltura_Client_BusinessProcessNotification_Enum_BusinessProcessProvider::ACTIVITI) - return 'kActivitiBusinessProcessProvider'; - - if(class_exists('KalturaBusinessProcessProvider') && $enumValue == KalturaBusinessProcessProvider::ACTIVITI) + if(defined('KalturaBusinessProcessProvider::ACTIVITI')) + { + if($enumValue == KalturaBusinessProcessProvider::ACTIVITI) + return 'kActivitiBusinessProcessProvider'; + } + elseif(defined('Kaltura_Client_BusinessProcessNotification_Enum_BusinessProcessProvider::ACTIVITI')) + { + if($enumValue == Kaltura_Client_BusinessProcessNotification_Enum_BusinessProcessProvider::ACTIVITI) + return 'kActivitiBusinessProcessProvider'; + } + elseif($enumValue == self::getActivitiBusinessProcessProviderCoreValue(ActivitiBusinessProcessProvider::ACTIVITI)) + { return 'kActivitiBusinessProcessProvider'; + } } if($baseClass == 'BusinessProcessServer' && $enumValue == self::getActivitiBusinessProcessProviderCoreValue(ActivitiBusinessProcessProvider::ACTIVITI))