Business Central unable to authorize a user for claiming/starting a task assigned to a role, using database login module
Issue
BPMS 6.1.0
installation has been configured to use a custom database login module (with a table of roles and their mapped users listed) to authorize users belonging to a group/role for claiming/starting tasks. However, for the following scenario it does not seem to work properly.
e.g. There is a task that can be executed byRole1
role.
- Login to
business-central
using a useruser1
which is not mapped to this roleRole1
- Add the role to the user
user1
- try to claim or star the task (e.g. via REST)
This throws the following exception.
Caused by: org.jbpm.services.task.exception.PermissionDeniedException: User '[UserImpl:'15426']' does not have permissions to execute operation 'Claim' on task id 425
at org.jbpm.services.task.internals.lifecycle.MVELLifeCycleManager.evalCommand(MVELLifeCycleManager.java:104) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.internals.lifecycle.MVELLifeCycleManager.taskOperation(MVELLifeCycleManager.java:341) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.impl.TaskInstanceServiceImpl.claim(TaskInstanceServiceImpl.java:119) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.commands.ClaimTaskCommand.execute(ClaimTaskCommand.java:52) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.commands.ClaimTaskCommand.execute(ClaimTaskCommand.java:33) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:54) [jbpm-human-task-jpa-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:67) [drools-persistence-jpa-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.task.impl.command.CommandBasedTaskService.execute(CommandBasedTaskService.java:139) [jbpm-human-task-core-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.kie.services.impl.UserTaskServiceImpl.execute(UserTaskServiceImpl.java:921) [jbpm-kie-services-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.jbpm.services.cdi.impl.UserTaskServiceCDIImpl$Proxy$_$$_WeldClientProxy.execute(UserTaskServiceCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
at org.kie.remote.services.cdi.ProcessRequestBean.doTaskOperation(ProcessRequestBean.java:315) [kie-remote-services-6.2.0.Final-redhat-4.jar:6.2.0.Final-redhat-4]
... 55 more
- How to solve this kind of problem?
Environment
- Red Hat JBoss BPM Suite (BPMS)
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.