Index: sandbox/workflow/branches/609/inc/class.run_activity.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.run_activity.inc.php	(revision 2249)
+++ sandbox/workflow/branches/609/inc/class.run_activity.inc.php	(revision 2253)
@@ -10,8 +10,8 @@
 	\**************************************************************************/
 
+	require_once(dirname(__FILE__) . SEP . 'common.inc.php'); 				 /* including common deifinitions */
 	require_once(dirname(__FILE__) . SEP . 'class.WorkflowUtils.inc.php'  ); /* superclass source code       */
 	require_once(dirname(__FILE__) . SEP . 'class.basecontroller.inc.php' ); /* module controller            */
 	require_once(dirname(__FILE__) . SEP . 'class.basemodel.inc.php'      ); /* module logic                 */
-	//require_once(dirname(__FILE__) . SEP . 'class.process_factory.inc.php'); /* module process factory class */
 	require_once(dirname(__FILE__) . SEP . 'class.utils.security.php'     ); /* sanitizes input data         */
 
@@ -206,12 +206,12 @@
 		{
 			parent::WorkflowUtils();
-			$this->runtime		= CreateObject('workflow.workflow_wfruntime');
+			$this->runtime		= Factory::getInstance('workflow_wfruntime');
 			$this->runtime->setDebug(_DEBUG);
-			//$this->base_activity	= CreateObject('workflow.workflow_baseactivity');
-			//$this->process		= CreateObject('workflow.workflow_process');
-			$this->GUI		= CreateObject('workflow.workflow_gui');
+			//$this->base_activity	= Factory::getInstance('workflow_baseactivity');
+			//$this->process		= Factory::getInstance('workflow_process');
+			$this->GUI		= Factory::getInstance('workflow_gui');
 			$this->categories 	= CreateObject('phpgwapi.categories');
 
-			$this->workflowSmarty = CreateObject('workflow.workflow_smarty', false);
+			$this->workflowSmarty = Factory::getInstance('workflow_smarty', false);
 			// TODO: open a new connection to the database under a different username to allow privilege handling on tables
 			/* CELEPAR */
@@ -386,5 +386,5 @@
 					return false;
 				}
-				$smarty = CreateObject('workflow.process_smarty');
+				$smarty = Factory::getInstance('process_smarty');
 			}
 
@@ -399,5 +399,5 @@
 				/* #celepar# smarty code*/
 
-				$smarty = CreateObject('workflow.process_smarty');
+				$smarty = Factory::getInstance('process_smarty');
 
 				$smarty->template_dir  = GALAXIA_PROCESSES.SEP.$this->process->getNormalizedName().SEP.'code'.SEP.'templates';
Index: sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php	(revision 2253)
@@ -109,5 +109,5 @@
 	{
 		parent::bo_agent();
-		$this->so_agent = CreateObject('workflow.so_agent_mail_smtp');
+		$this->so_agent = Factory::getInstance('so_agent_mail_smtp');
 		$this->bo_emailadmin = CreateObject('emailadmin.bo');
 		//the showProcessConfigurationFields is not done here, quite harder to build
@@ -466,5 +466,5 @@
 		}
 
-		$process = CreateObject('workflow.workflow_process');
+		$process = Factory::getInstance('workflow_process');
 		$process->getProcess($this->process_id);
 		$this->process_name = $process->getName();
@@ -637,5 +637,5 @@
 					if ($this->process_name=='')
 					{
-						$process = CreateObject('workflow.workflow_process');
+						$process = Factory::getInstance('workflow_process');
 						$process->getProcess($this->process_id);
 						$this->process_name = $process->getName();
@@ -648,5 +648,5 @@
 					if ($this->process_version=='')
 					{
-						$process = CreateObject('workflow.workflow_process');
+						$process = Factory::getInstance('workflow_process');
 						$process->getProcess($this->process_id);
 						$this->process_name = $process->getName();
@@ -683,5 +683,5 @@
 					if (!is_object($this->role_manager))
 					{
-						$this->role_manager = CreateObject('workflow.workflow_rolemanager');
+						$this->role_manager = Factory::getInstance('workflow_rolemanager');
 					}
 					if (!is_object($this->account))
@@ -731,5 +731,5 @@
 							if (!is_object($this->role_manager))
 							{
-								$this->role_manager = CreateObject('workflow.workflow_rolemanager');
+								$this->role_manager = Factory::getInstance('workflow_rolemanager');
 							}
 							if (!is_object($this->account))
Index: sandbox/workflow/branches/609/inc/local/classes/class.wf_role.php
===================================================================
--- sandbox/workflow/branches/609/inc/local/classes/class.wf_role.php	(revision 2249)
+++ sandbox/workflow/branches/609/inc/local/classes/class.wf_role.php	(revision 2253)
@@ -58,6 +58,6 @@
 
 		$this->db = &$GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;
-		$this->roleManager = CreateObject('workflow.workflow_rolemanager');
-		$this->activityManager = CreateObject('workflow.workflow_activitymanager');
+		$this->roleManager = Factory::getInstance('workflow_rolemanager');
+		$this->activityManager = Factory::getInstance('workflow_activitymanager');
 	}
 
Index: sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php
===================================================================
--- sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php	(revision 1385)
+++ sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php	(revision 2253)
@@ -77,5 +77,5 @@
 	{
 		$instanceID = (int) $instanceID;
-		$instance = CreateObject('workflow.workflow_instance');
+		$instance = Factory::getInstance('workflow_instance');
 		if (!$instance->getInstance($instanceID))
 			return false;
@@ -118,5 +118,5 @@
 		$instance = $this->getInstanceObject($instanceID);
 
-		$runActivity = CreateObject('workflow.run_activity');
+		$runActivity = Factory::getInstance('run_activity');
 
 		ob_start();
Index: sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php
===================================================================
--- sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php	(revision 2253)
@@ -68,5 +68,5 @@
 		$flagObject[0] = is_null($this->processManager);
 		if ($flagObject[0])
-			$this->processManager = CreateObject('workflow.workflow_processmanager');
+			$this->processManager = Factory::getInstance('workflow_processmanager');
 
 		$output = array();
@@ -247,5 +247,5 @@
 		$flagObject[0] = is_null($this->acl);
 		if ($flagObject[0])
-			$this->acl = CreateObject('workflow.workflow_acl');
+			$this->acl = Factory::getInstance('workflow_acl');
 
 		$output = $this->acl->getUserPermissions($type, $uid);
@@ -268,5 +268,5 @@
 		$flagObject[0] = is_null($this->acl);
 		if ($flagObject[0])
-			$this->acl = CreateObject('workflow.workflow_acl');
+			$this->acl = Factory::getInstance('workflow_acl');
 
 		$output = $this->acl->getUserGroupPermissions($type, $uid);
Index: sandbox/workflow/branches/609/inc/local/classes/class.JobBase.php
===================================================================
--- sandbox/workflow/branches/609/inc/local/classes/class.JobBase.php	(revision 2249)
+++ sandbox/workflow/branches/609/inc/local/classes/class.JobBase.php	(revision 2253)
@@ -200,5 +200,5 @@
 	final public function createNewInstance($startActivityId, $instanceName=false, $properties=false, $user=false)
 	{
-		$activityManager = CreateObject('workflow.workflow_activitymanager');
+		$activityManager = Factory::getInstance('workflow_activitymanager');
 		$activity = $activityManager->get_activity($startActivityId);
 
Index: sandbox/workflow/branches/609/inc/class.ui_userinterface.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_userinterface.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_userinterface.inc.php	(revision 2253)
@@ -45,5 +45,4 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'];
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		//$smarty = CreateObject('workflow.workflow_smarty');
 		$smarty = Factory::getInstance('workflow_smarty');
 
@@ -132,5 +131,5 @@
 		require_once 'class.so_userinterface.inc.php';
 		$so = new so_userinterface();
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		/* get the user's organization */
Index: sandbox/workflow/branches/609/inc/class.workflow_processmanager.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.workflow_processmanager.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.workflow_processmanager.inc.php	(revision 2253)
@@ -35,5 +35,5 @@
 		{
 			parent::ProcessManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);
-			$this->workflow_acl = CreateObject('workflow.workflow_acl');
+			$this->workflow_acl = Factory::getInstace('workflow_acl');
 
 			/* allow regular users to see the process graph */
Index: sandbox/workflow/branches/609/inc/class.ui_adminprocesses.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_adminprocesses.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_adminprocesses.inc.php	(revision 2253)
@@ -54,5 +54,5 @@
 		parent::bo_workflow_forms('admin_processes');
 
-		$this->workflow_acl = CreateObject('workflow.workflow_acl');
+		$this->workflow_acl = Factory::getInstance('workflow_acl');
 		$denyAccess = true;
 		if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']))
@@ -83,6 +83,6 @@
 		}
 
-		$this->process_manager	= CreateObject('workflow.workflow_processmanager');
-		$this->activity_manager	= CreateObject('workflow.workflow_activitymanager');
+		$this->process_manager	= Factory::getInstance('workflow_processmanager');
+		$this->activity_manager	= Factory::getInstance('workflow_activitymanager');
 
 		$this->form_action = $GLOBALS['phpgw']->link('/index.php', 'menuaction=workflow.ui_adminprocesses.form');
@@ -190,5 +190,5 @@
 		$known_config_items = array_merge($known_config_items, array('Log Options' => 'title', 'log_level' => $log_levels));
 
-		$bo_agent = CreateObject('workflow.bo_agent_mail_smtp');
+		$bo_agent = Factory::getInstance('bo_agent_mail_smtp');
 		$known_config_items = array_merge($known_config_items, $bo_agent->listProcessConfigurationFields());
 
Index: sandbox/workflow/branches/609/inc/class.ui_external_applications.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_external_applications.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_external_applications.inc.php	(revision 2253)
@@ -61,5 +61,5 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'];
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		$this->set_wf_session();
Index: sandbox/workflow/branches/609/inc/engine/config.egw.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/engine/config.egw.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/engine/config.egw.inc.php	(revision 2253)
@@ -305,5 +305,5 @@
 		{
 			// This way we create a new run_activity instance for the next activity
-			$run_activity = CreateObject('workflow.run_activity.go');
+			$run_activity = Factory::getInstance('workflow.run_activity.go');
 			$data = $run_activity->go($activityId, $iid, $auto);
 			return $data;
Index: sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php
===================================================================
--- sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php	(revision 2253)
@@ -1091,5 +1091,5 @@
     $workflow = $GLOBALS['workflow'];
     unset($_REQUEST['iid']);
-    $run_activity = CreateObject('workflow.run_activity');
+    $run_activity = Factory::getInstance('run_activity');
     $run_activity->runtime->instance->parentInstanceId = $this->instance_id;
     $run_activity->runtime->instance->parentActivityId = $this->activity_id;
Index: sandbox/workflow/branches/609/inc/hook_home.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/hook_home.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/hook_home.inc.php	(revision 2253)
@@ -22,5 +22,5 @@
 
 $title = lang("External Applications");
-$bo	= CreateObject('workflow.bo_userinterface');
+$bo	= Factory::getInstance('bo_userinterface');
 $externals 	= $bo -> externals();
 $extra_data = '';
Index: sandbox/workflow/branches/609/inc/class.bo_agent.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.bo_agent.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/class.bo_agent.inc.php	(revision 2253)
@@ -278,5 +278,5 @@
 			if (!(isset($this->process)))
 			{
-				$this->process = CreateObject('workflow.workflow_process');
+				$this->process = Factory::getInstance('workflow_process');
 				$this->process->getProcess($wf_p_id);
 			}
Index: sandbox/workflow/branches/609/inc/class.ui_adminroles.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_adminroles.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_adminroles.inc.php	(revision 2253)
@@ -42,5 +42,5 @@
 		parent::WorkflowUtils();
 
-		$this->workflow_acl = CreateObject('workflow.workflow_acl');
+		$this->workflow_acl = Factory::getInstance('workflow_acl');
 		$denyAccess = true;
 		if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']))
@@ -71,7 +71,7 @@
 		}
 
-		$this->process_manager	= CreateObject('workflow.workflow_processmanager');
-		$this->activity_manager	= CreateObject('workflow.workflow_activitymanager');
-		$this->role_manager	= CreateObject('workflow.workflow_rolemanager');
+		$this->process_manager	= Factory::getInstance('workflow_processmanager');
+		$this->activity_manager	= Factory::getInstance('workflow_activitymanager');
+		$this->role_manager	= Factory::getInstance('workflow_rolemanager');
 		$this->form_action = $GLOBALS['phpgw']->link('/index.php', 'menuaction=workflow.ui_adminroles.form');
 		
Index: sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php	(revision 2253)
@@ -359,5 +359,5 @@
 		function export()
 		{
-			$this->process_manager	= CreateObject('workflow.workflow_processmanager');
+			$this->process_manager	= Factory::getInstance('workflow_processmanager');
 
 			// retrieve process info
Index: sandbox/workflow/branches/609/inc/class.ui_move_instances.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_move_instances.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/class.ui_move_instances.inc.php	(revision 2253)
@@ -36,5 +36,5 @@
 	{
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		$javaScripts = $this->get_common_js();
Index: sandbox/workflow/branches/609/inc/class.ui_adminactivities.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_adminactivities.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_adminactivities.inc.php	(revision 2253)
@@ -73,5 +73,5 @@
 		parent::WorkflowUtils();
 
-		$this->workflow_acl = CreateObject('workflow.workflow_acl');
+		$this->workflow_acl = Factory::getInstance('workflow_acl');
 		$denyAccess = true;
 		if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']))
@@ -106,7 +106,7 @@
 		}
 
-		$this->process_manager	= CreateObject('workflow.workflow_processmanager');
-		$this->activity_manager	= CreateObject('workflow.workflow_activitymanager');
-		$this->role_manager	= CreateObject('workflow.workflow_rolemanager');
+		$this->process_manager	= Factory::getInstance('workflow_processmanager');
+		$this->activity_manager	= Factory::getInstance('workflow_activitymanager');
+		$this->role_manager	= Factory::getInstance('workflow_rolemanager');
 		$this->fs = new FsUtils(); /* gets instance */
 
Index: sandbox/workflow/branches/609/inc/class.ui_phpeditor.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_phpeditor.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_phpeditor.inc.php	(revision 2253)
@@ -45,5 +45,5 @@
 	function ui_phpeditor()
 	{
-		$this->bo = CreateObject('workflow.bo_editor');
+		$this->bo = Factory::getInstance('bo_editor');
 		$this->loadVariables();
 	}
Index: sandbox/workflow/branches/609/inc/hook_sidebox_menu.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/hook_sidebox_menu.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/hook_sidebox_menu.inc.php	(revision 2253)
@@ -17,5 +17,5 @@
 
 {
-	$workflowACL = CreateObject('workflow.workflow_acl');
+	$workflowACL = Factory::getInstance('workflow_acl');
 	$userID = $GLOBALS['phpgw_info']['user']['account_id'];
 	$apptitle = $GLOBALS['phpgw_info']['apps'][$appname]['title'];
Index: sandbox/workflow/branches/609/inc/class.ui_agent_mail_smtp.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_agent_mail_smtp.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/class.ui_agent_mail_smtp.inc.php	(revision 2253)
@@ -29,5 +29,5 @@
 		parent::ui_agent();
 		$this->agent_type = 'mail_smtp';
-		$this->bo_agent = CreateObject('workflow.bo_agent_mail_smtp');
+		$this->bo_agent = Factory::getInstance('bo_agent_mail_smtp');
 	}
 
Index: sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php	(revision 2253)
@@ -47,5 +47,5 @@
 	function draw($tab_index = "")
 	{
-		$this->workflow_acl = CreateObject('workflow.workflow_acl');
+		$this->workflow_acl = Factory::getInstance('workflow_acl');
 
 		$isAdmin = $this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']);
@@ -63,5 +63,5 @@
 
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		$this->set_wf_session();
Index: sandbox/workflow/branches/609/inc/class.ui_monitors.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_monitors.inc.php	(revision 795)
+++ sandbox/workflow/branches/609/inc/class.ui_monitors.inc.php	(revision 2253)
@@ -58,5 +58,5 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('%1 monitoring');
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		$javaScripts = $this->get_common_js();
Index: sandbox/workflow/branches/609/inc/class.ui_adminaccess.inc.php
===================================================================
--- sandbox/workflow/branches/609/inc/class.ui_adminaccess.inc.php	(revision 2233)
+++ sandbox/workflow/branches/609/inc/class.ui_adminaccess.inc.php	(revision 2253)
@@ -63,5 +63,5 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Access Control List');
 		$GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow');
-		$smarty = CreateObject('workflow.workflow_smarty');
+		$smarty = Factory::getInstance('workflow_smarty');
 
 		$javaScripts = $this->get_common_js();
