Anonymous avatar Anonymous committed edbca83

Edited online

Comments (0)

Files changed (1)

 
 * Declarar el servicio //**ShiroActivitiSessionService**// y llamar al método //**attachUsername2Session()**// una vez se haya iniciado sesión (probablemente en el //**AuthController**// de Shiro - linea 45 -)
 
+== Lista de Todas las Tareas ==
+
+El plugin de Activiti para Grails contiene tres vistas de tareas (myTasks, unassignedTasks y allTasks), en esta última vista (en la versión 5.7 del plugin) por defecto no se presentan los usuarios que pueden ejecutar la tareas, para ello es necesario modificar en //**allTaskList.gsp**// el scriptlet que inicia en la linea 66 por el siguiente código:
+
+{{{
+#!java
+
+def users = []
+																		def userList=[:]
+																		def userIds = ActivitiUtils.activitiService.getCandidateUserIds(taskInstance.id)
+																		def groups
+																		def groupIds
+																		if (!applicationContext.getBean('pluginManager').hasGrailsPlugin('activitiSpringSecurity')) {
+																		
+																		def User = grailsApplication.getDomainClass(grailsApplication.config.securityConfig.userLookup.userDomainClassName).clazz
+																		  users = User."findAllBy${GrailsNameUtils.getClassNameRepresentation(grailsApplication.config.securityConfig.userLookup.usernamePropertyName)}InList"(userIds)
+																		
+																			for (id in userIds) {
+									                        groups = ActivitiUtils.identityService.createGroupQuery().groupMember(id).orderByGroupId().asc().list()
+									                        
+									                                        }		       
+																		} else {
+																		  def User = grailsApplication.getDomainClass(grailsApplication.config.grails.plugins.springsecurity.userLookup.userDomainClassName).clazz
+																		  users = User."findAllBy${GrailsNameUtils.getClassNameRepresentation(grailsApplication.config.grails.plugins.springsecurity.userLookup.usernamePropertyName)}InList"(userIds)
+																			
+																		}
+																		for (user in users) {
+															          groups = ActivitiUtils.identityService.createGroupQuery().groupMember(user.id).orderByGroupId().asc().list()
+															          groupIds = groups?" ${groups.collect{it.name}}":""
+																				userList[user.username]="${user.username}${groupIds}"
+																			}
+}}}
+
 = Scripts =
 
 = Tests =
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.