Index: trunk/workflow/setup/phpgw_en.lang
===================================================================
--- trunk/workflow/setup/phpgw_en.lang	(revision 950)
+++ trunk/workflow/setup/phpgw_en.lang	(revision 1710)
@@ -704,2 +704,6 @@
 file	common	en	File
 firebug	common	en	Firebug
+select only one user	workflow	en	Select only one user
+select one process role	workflow	en	Select one process's role
+default role will be set only if it is mapped on the activity	workflow	en	Default role will be set only if it is mapped on the activity
+without default user	workflow	en	Without default user
Index: trunk/workflow/setup/phpgw_pt-br.lang
===================================================================
--- trunk/workflow/setup/phpgw_pt-br.lang	(revision 950)
+++ trunk/workflow/setup/phpgw_pt-br.lang	(revision 1710)
@@ -704,2 +704,6 @@
 file	common	pt-br	Arquivo
 firebug	common	pt-br	Firebug
+select only one user	workflow	pt-br	Selecione apenas um Usuário
+select one process role	workflow	pt-br	Selecione um Perfil do Processo
+default role will be set only if it is mapped on the activity	workflow	pt-br	O Perfil Padrão será estabelecido somente se estiver mapeado à atividade
+without default user	workflow	pt-br	Sem usuário padrão
Index: trunk/workflow/inc/class.ui_adminactivities.inc.php
===================================================================
--- trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 795)
+++ trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 1710)
@@ -129,4 +129,5 @@
 		$this->t->set_block('admin_activities', 'block_process_roles', 'process_roles');
 		$this->t->set_block('admin_activities', 'block_activity_agents', 'activity_agents');
+		$this->t->set_block('admin_activities', 'block_default_roles', 'default_roles');
 		$this->t->set_block('admin_activities', 'block_select_agents', 'select_agents');
 	
@@ -519,4 +520,9 @@
 		));
 
+		$this->t->set_var(array(
+			'default_user_option_checked_0' => ($activity_info['wf_default_user'][0] != 'p')? "checked='checked'": '',
+			'default_user_option_checked_1' => ($activity_info['wf_default_user'][0] == 'p')? "checked='checked'": '',
+		));
+
 		// fill process roles
 		foreach ($process_roles['data'] as $role)
@@ -528,5 +534,17 @@
 			$this->t->parse('process_roles', 'block_process_roles', True);
 		}
-		
+
+		// fill process roles for activity default role
+		foreach ($process_roles['data'] as $role)
+		{
+			$role_id = 'p' . $role['wf_role_id'];
+			$this->t->set_var(array(
+				'proc_roleId'			=> $role_id,
+				'proc_role_selected'	=> ($role_id == $activity_info['wf_default_user'])? 'selected="selected"' : '',
+				'proc_roleName'			=> $role['wf_name']
+			));
+			$this->t->parse('default_roles', 'block_default_roles', true);
+		}
+
 		// fill agents select
 		foreach ($agents_list as $agent)
Index: trunk/workflow/js/jscode/adminInterface.js
===================================================================
--- trunk/workflow/js/jscode/adminInterface.js	(revision 795)
+++ trunk/workflow/js/jscode/adminInterface.js	(revision 1710)
@@ -7,2 +7,15 @@
 	document.getElementById('toggleLink').innerHTML = (visibility == 'none') ? 'Expandir' : 'Contrair';
 }
+
+function toggleDefaultUserVisibility(divIndex)
+{
+	document.getElementById('div_default_user_option_0').style.display = (divIndex==0)? 'block':'none';
+	document.getElementById('div_default_user_option_1').style.display = (divIndex==1)? 'block':'none';
+
+	if (divIndex == 1){
+		document.getElementById('default_user_temp').value = document.getElementById('default_user').value;
+		document.getElementById('default_user').value = document.getElementById('default_roles').value;
+	} else if (divIndex == 0){
+		document.getElementById('default_user').value = document.getElementById('default_user_temp').value;
+	}
+}
Index: trunk/workflow/templates/default/admin_activities.tpl
===================================================================
--- trunk/workflow/templates/default/admin_activities.tpl	(revision 795)
+++ trunk/workflow/templates/default/admin_activities.tpl	(revision 1710)
@@ -166,13 +166,37 @@
 	</tr>
        <tr class="row_on">
-         <td>{lang_Default_User}</td>
          <td>
+			{lang_Default_User}
+		 </td>
+         <td valign="top">
 			<input type="hidden" name="default_user" id="default_user" value="{wf_default_user}" />
-			<input type="input" name="default_user_desc" id="default_user_desc" value="{wf_default_user_desc}" readonly="true" size="40" />
-			<a href="javascript:void(0)" onclick="openParticipants('default_user', 'uid=1&hidegroups=1');"><img border="0" src="workflow/templateFile.php?file=images/add_user.png" /></a>
-			<button onclick="document.getElementById('default_user_desc').value=''; document.getElementById('default_user').value='*'; return false">Sem usuário padrão</button>
-		<br />
-		{lang_the_default_user_will_only_be_set_if_he_is_mapped_to_a_role_on_the_activity}<br />
-		{lang_setNextUser_directives_can_override_it}
+			<input type="hidden" name="default_user_temp" id="default_user_temp" value="{wf_default_user}" />
+
+			<input type="radio" value="0" {default_user_option_checked_0} onclick="toggleDefaultUserVisibility(0);" id="default_user_option_0" name="default_user_option"/><label for="default_user_option_0">{lang_select_only_one_user}</label>
+			<input type="radio" value="1" {default_user_option_checked_1} onclick="toggleDefaultUserVisibility(1);" id="default_user_option_1" name="default_user_option"/><label for="default_user_option_1">{lang_select_one_process_role}</label>
+
+			<div id="div_default_user_option_0" style="display:none;">
+				<input type="input" name="default_user_desc" id="default_user_desc" value="{wf_default_user_desc}" readonly="true" size="40" />
+				<a href="javascript:void(0)" onclick="openParticipants('default_user', 'uid=1&hidegroups=1');"><img border="0" src="workflow/templateFile.php?file=images/add_user.png" /></a>
+				<button onclick="document.getElementById('default_user_desc').value=''; document.getElementById('default_user').value='*'; return false">{lang_without_default_user}</button>
+				<br>
+				<span style="color: gray">
+					{lang_the_default_user_will_only_be_set_if_he_is_mapped_to_a_role_on_the_activity} ({lang_setNextUser_directives_can_override_it}).
+				</span>
+			</div>
+
+			<div id="div_default_user_option_1" style="display:none;">
+				<select name="default_roles" id="default_roles" onchange="document.getElementById('default_user').value=document.getElementById('default_roles').value;">
+			    <option value="*"></option>
+			    <!-- BEGIN block_default_roles -->
+					<option value="{proc_roleId}" {proc_role_selected}>{proc_roleName}</option>
+		 	    <!-- END block_default_roles -->
+			    </select>
+				<br>
+				<span style="color: gray">
+					{lang_default_role_will_be_set_only_if_it_is_mapped_on_the_activity} ({lang_setNextUser_directives_can_override_it}).
+				</span>
+			</div>
+		<br/>
          </td>
        </tr>
@@ -405,3 +429,8 @@
 if (!{expandTable})
 	toggleTableVisibility('activitiesPropertiesTable');
+
+if (document.getElementById('default_user_option_1').checked)
+	toggleDefaultUserVisibility(1);
+else
+	toggleDefaultUserVisibility(0);
 </script>
