Index: /sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php
===================================================================
--- /sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php	(revision 2253)
+++ /sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php	(revision 2264)
@@ -68,14 +68,29 @@
 
 		$this->registerFileInfo('bo_participants', 'class.bo_participants.inc.php', 'inc');
+		$this->registerFileInfo('so_agent_mail_smtp', 'class.so_agent_mail_smtp.inc.php', 'inc');
 
-		/* registering egw class example */
+		/* registering egw external classes */
 		$this->registerFileInfo('phpgw', 'class.phpgw.inc.php', '', EGW_INC_ROOT);
 		$this->registerFileInfo('db', 'class.db.inc.php', '', EGW_INC_ROOT);
 		$this->registerFileInfo('accounts', 'class.accounts.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('config', 'class.config.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('common', 'class.common.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('session', 'class.session.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('nextmachs', 'class.nextmatchs.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('categories', 'class.categories.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('listbox', 'class.listbox.inc.php', '', EGW_INC_ROOT);
+		$this->registerFileInfo('phpmailer', 'class.phpmailer.inc.php', '', EGW_INC_ROOT);
+
+		/**
+		 * It can cause some troubles. A class named 'bo' must be instantiated by a
+		 * Factory::getInstance('bo') call, that isn't really intuitive.. Something to
+		 * think about...
+		 */
+		$this->registerFileInfo('bo', 'class.bo.inc.php', 'emailadmin/inc', EGW_SERVER_ROOT);
 
 
 		/**
 		 * TODO - This is a veeery big workaround to maintain compatibility with
-		 * processes that uses the old not-static factory. So, we made this wrapper
+		 * processes that uses the old non-static factory. So, we made this wrapper
 		 * (adapter) that just calls the new and cute static factory class in the
 		 * right way. It should be removed as soon as possible.
Index: /sandbox/workflow/branches/609/inc/class.run_activity.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/class.run_activity.inc.php	(revision 2253)
+++ /sandbox/workflow/branches/609/inc/class.run_activity.inc.php	(revision 2264)
@@ -211,5 +211,5 @@
 			//$this->process		= Factory::getInstance('workflow_process');
 			$this->GUI		= Factory::getInstance('workflow_gui');
-			$this->categories 	= CreateObject('phpgwapi.categories');
+			$this->categories 	= Factory::getInstance('categories');
 
 			$this->workflowSmarty = Factory::getInstance('workflow_smarty', false);
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 2253)
+++ /sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php	(revision 2264)
@@ -110,5 +110,5 @@
 		parent::bo_agent();
 		$this->so_agent = Factory::getInstance('so_agent_mail_smtp');
-		$this->bo_emailadmin = CreateObject('emailadmin.bo');
+		$this->bo_emailadmin = Factory::getInstance('bo');
 		//the showProcessConfigurationFields is not done here, quite harder to build
 		$this->ProcessConfigurationFieldsdefault = array(
@@ -312,5 +312,5 @@
 	function init()
 	{
-		$this->mail = CreateObject('phpgwapi.phpmailer');
+		$this->mail = Factory::getInstance('phpmailer');
 		//set the $this->conf
 		$this->getProcessConfigurationFields($this->activity->getProcessId());
@@ -674,5 +674,5 @@
 					if (!is_object($this->account))
 					{
-						$this->account = CreateObject('phpgwapi.accounts');
+						$this->account = Factory::getInstance('accounts');
 					}
 					$ask_user = $this->instance->getOwner();
@@ -687,5 +687,5 @@
 					if (!is_object($this->account))
 					{
-						$this->account = CreateObject('phpgwapi.accounts');
+						$this->account = Factory::getInstance('accounts');
 					}
 					$my_subset = array('wf_activity_name' => $this->activity->getName());
@@ -718,5 +718,5 @@
 							if (!is_object($this->account))
 							{
-								$this->account = CreateObject('phpgwapi.accounts');
+								$this->account = Factory::getInstance('accounts');
 							}
 							$ask_user = $this->account->name2id($second_part);
@@ -735,5 +735,5 @@
 							if (!is_object($this->account))
 							{
-								$this->account = CreateObject('phpgwapi.accounts');
+								$this->account = Factory::getInstance('accounts');
 							}
 							$my_subset = array('wf_role_name' => $second_part);
Index: /sandbox/workflow/branches/609/inc/local/classes/class.wf_mail.php
===================================================================
--- /sandbox/workflow/branches/609/inc/local/classes/class.wf_mail.php	(revision 795)
+++ /sandbox/workflow/branches/609/inc/local/classes/class.wf_mail.php	(revision 2264)
@@ -39,5 +39,5 @@
 		$requiredConfiguration = array('mail_smtp_profile' => false);
 		$configuration = $GLOBALS['workflow']['wf_runtime']->process->getConfigValues($requiredConfiguration);
-		$bo_emailadmin = CreateObject('emailadmin.bo');
+		$bo_emailadmin = Factory::getInstance('bo');
 		$profileData = $bo_emailadmin->getProfile($configuration['mail_smtp_profile']);
 
Index: /sandbox/workflow/branches/609/inc/class.bo_workflow_forms.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/class.bo_workflow_forms.inc.php	(revision 795)
+++ /sandbox/workflow/branches/609/inc/class.bo_workflow_forms.inc.php	(revision 2264)
@@ -90,5 +90,5 @@
 			$this->sort_mode	= $this->order . '__' . $this->sort;
 			$this->search_str	= get_var('find', 'any', '');
-			$this->nextmatchs	= CreateObject('phpgwapi.nextmatchs');
+			$this->nextmatchs	= Factory::getInstance('nextmatchs');
 			
 			// number of rows allowed
Index: /sandbox/workflow/branches/609/inc/engine/config.egw.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/engine/config.egw.inc.php	(revision 2253)
+++ /sandbox/workflow/branches/609/inc/engine/config.egw.inc.php	(revision 2264)
@@ -325,5 +325,5 @@
 	function galaxia_get_config_values($parameters=array())
 	{
-			$config = CreateObject('phpgwapi.config');
+			$config = Factory::getInstance('config');
 			$config->read_repository();
 
Index: /sandbox/workflow/branches/609/inc/hook_home.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/hook_home.inc.php	(revision 2253)
+++ /sandbox/workflow/branches/609/inc/hook_home.inc.php	(revision 2264)
@@ -42,5 +42,5 @@
 }
 $extra_data .= "</table></div>";
-$portalbox = CreateObject('phpgwapi.listbox',
+$portalbox = Factory::getInstance('listbox',
 	Array(
 		'title'     => $title,
Index: /sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php	(revision 2253)
+++ /sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php	(revision 2264)
@@ -102,5 +102,5 @@
 			$this->start		= (int)get_var('start', 'any', 0);
 			$this->search_str	= get_var('find', 'any', '');
-			$this->nextmatchs	= CreateObject('phpgwapi.nextmatchs');
+			$this->nextmatchs	= Factory::getInstance('nextmatchs');
 		}
 
Index: /sandbox/workflow/branches/609/inc/class.bo_monitors.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/class.bo_monitors.inc.php	(revision 2233)
+++ /sandbox/workflow/branches/609/inc/class.bo_monitors.inc.php	(revision 2264)
@@ -1397,10 +1397,10 @@
 		/* prepare the environment to load some configuration values from other module */
 		$GLOBALS['phpgw']->db =& Factory::getInstance('WorkflowObjects')->getDBExpresso();
-		$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
-		$GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions');
+		$GLOBALS['phpgw']->common = Factory::getInstance('common');
+		$GLOBALS['phpgw']->session = Factory::getInstance('sessions');
 		function lang($a){return $a;};
 
 		/* get the required configuration */
-		$BOEmailAdmin = Factory::newForeignInstance('emailadmin', 'bo');
+		$BOEmailAdmin = Factory::getInstance('bo')
 		$profileList = $BOEmailAdmin->getProfileList();
 		$profile = $BOEmailAdmin->getProfile($profileList[0]['profileID']);
Index: /sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php
===================================================================
--- /sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php	(revision 2253)
+++ /sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php	(revision 2264)
@@ -106,8 +106,8 @@
 		require_once(dirname(__FILE__) . SEP . 'engine' . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'GraphViz.php');
 
-		$config_values = CreateObject('phpgwapi.config','workflow');
+		$config_values = Factory::getInstance('config', 'workflow');
 		$config_values->read_repository();
-		$conf_db = $config_values->config_data;	
-		$db = CreateObject('phpgwapi.db');
+		$conf_db = $config_values->config_data;
+		$db = Factory::getInstance('db');
 		$db->connect(
 			$conf_db['database_name'],
