Index: /trunk/workflow/inc/class.bo_utils.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_utils.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.bo_utils.inc.php	(revision 5122)
@@ -88,11 +88,29 @@
 			$ret_complement = empty($params['complement']) ? '' : $params['complement'];
 
-			$ajaxConfig = &Factory::newInstance('ajax_config', 'contactcenter');
+			// According to the ldap selected, format de config params to be extracted
+			if ($params['useCCParams'] == "true")
+			{
+				$ldap_indexes = array('module' => 'contactcenter',
+										'host' => 'cc_ldap_host0',
+										'basedn' => 'cc_ldap_context0',
+										'user' => 'cc_ldap_browse_dn0',
+										'passwd' => 'cc_ldap_pw0');
+			}
+			else
+			{
+				$ldap_indexes = array('module' => 'workflow',
+										'host' => 'ldap_host',
+										'basedn' => 'ldap_user_context',
+										'user' => 'ldap_user',
+										'passwd' => 'ldap_password');
+
+			}
+			$ajaxConfig = &Factory::newInstance('ajax_config', $ldap_indexes['module']);
 			$config = $ajaxConfig->read_repository();
 
-			$ldapconfig['host'] = $config['cc_ldap_host0'];
-			$ldapconfig['basedn'] = $config['cc_ldap_context0'];
-			$usuario = $config['cc_ldap_browse_dn0'];
-			$senha = $config['cc_ldap_pw0'];
+			$ldapconfig['host'] = $config[$ldap_indexes['host']];
+			$ldapconfig['basedn'] = $config[$ldap_indexes['basedn']];
+			$usuario = $config[$ldap_indexes['user']];
+			$senha = $config[$ldap_indexes['passwd']];
 
 			if($usuario != "" && $senha != ""){
Index: /trunk/workflow/inc/smarty/wf_plugins/function.wf_select_ldap_users.php
===================================================================
--- /trunk/workflow/inc/smarty/wf_plugins/function.wf_select_ldap_users.php	(revision 3167)
+++ /trunk/workflow/inc/smarty/wf_plugins/function.wf_select_ldap_users.php	(revision 5122)
@@ -33,4 +33,5 @@
 		'handleExpiredSessions' => true,
 		'size_input'            => '20',
+		'useCCParams'			=> true,
 		'opt_id'                => 'dn',
 		'opt_name'              => 'cn',
@@ -40,4 +41,5 @@
 		'handleExpiredSessions',
 		'size_input',
+		'useCCParams',
 		'value_btn',
 		'class_btn',
@@ -77,8 +79,12 @@
 	$handleExpiredSessions = ($handleExpiredSessions === true) ? 'true' : 'false';
 
+	$useCCParams = ($useCCParams === true) ? 'true' : 'false';
+
 	/* campos do componente */
 	$output = <<<EOF
 		<input type="text" id="$name_input" name="$name_input" size="$size_input" />
-		<input type="button" class="$class_btn" value="$value_btn" onclick="search_ldap_users_by_cn(document.getElementById('$name_input').value, '$name', '$opt_id', '$opt_name', $handleExpiredSessions, '$opt_complement')" />
+		<input type="button" class="$class_btn" value="$value_btn" 
+			onclick="search_ldap_users_by_cn(document.getElementById('$name_input').value, '$name', '$opt_id', '$opt_name', 
+					$handleExpiredSessions, '$opt_complement', $useCCParams)" />
 		&nbsp;<img id="$name_img" border="0" src="$imagesPath/loading.gif" style="display:none">
 		<span id="$name_span" style="display:none"><br><br><b>Selecione um nome abaixo: </b><br><br>
Index: /trunk/workflow/js/jscode/wf_select_ldap_users.js
===================================================================
--- /trunk/workflow/js/jscode/wf_select_ldap_users.js	(revision 3167)
+++ /trunk/workflow/js/jscode/wf_select_ldap_users.js	(revision 5122)
@@ -9,5 +9,5 @@
  * @param String opt_name Atributo que será atribuído ao name (innerHTML) das options da combo, por padrão é o 'cn'
  */
-function search_ldap_users_by_cn(cn, target, opt_id, opt_name, handleExpiredSessions, opt_complement)
+function search_ldap_users_by_cn(cn, target, opt_id, opt_name, handleExpiredSessions, opt_complement, useCCParams)
 {  
 	// o parâmetro opt_complement foi acrescentado posteriormente a esta função, devido alguns métodos não utilizá-lo é
@@ -54,5 +54,5 @@
 
 	var url = '$this.bo_utils.search_ldap_users_by_cn';
-	var param = "cn=" + cn + "&target=" + target + "&id=" + opt_id + "&name=" + opt_name + "&complement=" + opt_complement;
+	var param = "cn=" + cn + "&target=" + target + "&id=" + opt_id + "&name=" + opt_name + "&complement=" + opt_complement + "&useCCParams=" + useCCParams;
 
 	document.getElementById(target + "_img").show();
