cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to claim a task when used LDAP identitiy management

ganeshr
Champ in-the-making
Champ in-the-making
I have integrated identitiy management succussfully and able to login using ldap and see the ldap groups in Queued tab in Activiti explorer, however claim button is not showing when task is opened in Queued tab and even complete task button is disabled.
I have set group type as 'assignment' for ldap groups. But still the claim buttion is not showing, because of this unable to claim and complete the task.
10 REPLIES 10

frederikherema1
Star Contributor
Star Contributor
Conditions for showing the buttons are the following:
- Logged in user is not assignee
- User is a candidate for the given task (member of candidate group OR candidateUser)

Check if the method that get's groups for users works well in your custom identityManagemenr-t…


protected void initClaimButton(HorizontalLayout layout) {
    if(!isCurrentUserAssignee() && canUserClaimTask()) {


return taskService.createTaskQuery()
     .taskCandidateUser(ExplorerApp.get().getLoggedInUser().getId())
     .taskId(task.getId())
     .count() == 1;

ganeshr
Champ in-the-making
Champ in-the-making
for user task I have assigned activiti:candidateGroups = ldapgroupX and logged into activiti explorer with user who is member of that group.
  In Queued Tab able to see the ldapgroupX(1) as one task, and when opened that group, task content is showing, only thing is claim and complete actions are not working.

frederikherema1
Star Contributor
Star Contributor
Can you debug the tomcat instance, and see what happens around the lines stated in my previous post? (org.activiti.explorer.ui.task.TaskDetailPanel line 177)

ganeshr
Champ in-the-making
Champ in-the-making
canUserClaimTask() is returning false. But the user is a member of ldapGroupX.

frederikherema1
Star Contributor
Star Contributor
What about the group-manager, what does he return when this is called (TaskQueryImpl):


protected List<String> getGroupsForCandidateUser(String candidateUser) {
    // TODO: Discuss about removing this feature? Or document it properly and maybe recommend to not use it
    // and explain alternatives
    List<Group> groups = Context
      .getCommandContext()
      .getGroupManager()
      .findGroupsByUser(candidateUser);
    List<String> groupIds = new ArrayList<String>();
    for (Group group : groups) {
      groupIds.add(group.getId());
    }
    return groupIds;
  }

That is the direction you should be looking, failing to claim is a result of the modification of the Identity-management, so you should double-check everything..

ganeshr
Champ in-the-making
Champ in-the-making
Thanks for helping , now i am able to claim the task but after claiming the task task page is not showing any content and there is no complete task button. In tomcat console i could see the following error log…
org.activiti.engine.ActivitiException: LDAP user manager doesn't support finding a user by id
        at org.uprr.bpel.workflow.ldap.LDAPUserManager.findUserById(LDAPUserManager.java:50)
        at org.activiti.engine.impl.cmd.GetUserPictureCmd.execute(GetUserPictureCmd.java:41)
        at org.activiti.engine.impl.cmd.GetUserPictureCmd.execute(GetUserPictureCmd.java:28)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.IdentityServiceImpl.getUserPicture(IdentityServiceImpl.java:102)
        at org.activiti.explorer.ui.task.UserDetailsComponent.addUserPicture(UserDetailsComponent.java:85)

   Do i need to provide an option for finding user id in LDAP user manager class?

ganeshr
Champ in-the-making
Champ in-the-making
Thanks..it is working now..

frederikherema1
Star Contributor
Star Contributor
Great to hear that! Are you willing to share your LDAP-implementation, or perhaps a how-to blog? I've come across many people wanting to use LDAP underneath activiti, so might be interesting to have somewhere on github, if you're willing to share  this with the world…

ganeshr
Champ in-the-making
Champ in-the-making