Unable to access the task URL in my own application if the user is other than process initiator
I have created a web application using bonita API's. I am able to login using bonita users. I am able to start the process if I login with the initiator username. But when I login as the next level user, I am unable to access the tasks. Here I am using the dynamic URL which is given in the documentaion. I am getting the below error while I tried to execute the task assigned to that user. Error : "Access denied: you do not have the rights to view this page."
I am giving the series of steps that I have followed. Please suggest me the way to avoid this problem.
I created a simple Leave Management System in bonita, but i am creating a normal java application for login page.
1) Login as Process Initiator (Employee)
2) So I am able to start the process using URL and will be able to show the Bonita form in my application.
3) Then Employee was applied a leave and then he logged out. 4) Another user (Reporting Manager) logged in and he is accessing the flow from another lane in the same pool. He should be able to access the form which is used to approve or reject the leave.
5) I am able to get the Task list for that Report Manager. In that list i provide a button to start that task.
6) When I click on the Start button from the tasks list screen I got the error as "Access denied: you do not have the rights to view this page."
So Reporting manager task is not able to loading into the application. So will anybody check it suggest the correct way.
Thanks and Regards
Venkanna Babu. K
Thanks for the reply Haris, Even i have with the "assignTask=true", but still i am getting the same error. Please check the code i have implemented.
Tasks Pending for <%=user.getFirstName()+" "+user.getLastName() %>
|<%=pendingTask.getId() %>||<%=pendingTask.getName() %>||<%=pendingTask.getPriority() %>||<%=pendingTask.getState() %>||<%=pendingTask.getExpectedEndDate() %><% buffer = new StringBuffer(); ActivityInstance activityInstance = processAPI.getActivityInstance(pendingTask.getId()); buffer.append("http://"); buffer.append("localhost:8080"); buffer.append("/bonita/portal/homepage?ui=form&locale=en&theme="); buffer.append(processDefinitionId); buffer.append("#form="); buffer.append(processDefinition.getName()); buffer.append("--"); buffer.append(processDefinition.getVersion()); buffer.append("--"); buffer.append(activityInstance.getName()); buffer.append("/$entry&mode=app&task="); buffer.append(pendingTask.getId()); buffer.append("&assignTask=true"); %>|
In the above code is in my JSP file. When I click on "Start Task" button the task should be started.
And on more problem is, while I load task form on my application, I was unable submit the form.
For example, I have 4 Roles in my application for different operations. Employee, Report Manager, Project Manager and HR Manager. I am able to start the task but unable to submit from Employee Role, I am not able to start the task from Report Manager, so no case of submit task. I am able to start the task from from Project Manager but unable to Submit the task.
I don't know why these different behaviors, can anybody tell me the solution for my problem.