Hello everybody!
I currently have a process using 2 sub-processes. In a few words, my process will read e-mails coming from SalesForce, and dispatch it in 2 categories (Weblink and Severity). Each category mail is sent to a different sub-process.
Everything is working fine, except one thing :
- I have a form when the mail is a Severity mail. So I have a step which will generate a **link **to this form, and send it by e-mail to concerned people. Here is the code to generate the link :
String host = portalURL;
String port = portalPort;
//Don't forget to update task variable if the Step name is changed
String task = "Approve Severity";
String encodedTask = URLEncoder.encode(task,"UTF-8");
StringBuffer buffer = new StringBuffer(“<a href="”);
buffer.append(portalProtocol);
buffer.append(host);
buffer.append(“:”);
buffer.append(port);
buffer.append(“/bonita/portal/form/processInstance/”)
buffer.append(processInstanceId)
buffer.append(“/task/”)
buffer.append(encodedTask)
buffer.append(“">here”)
return buffer.toString();
- Then, in my form step, I have created a single-user filter (only one account in the company can approve Severity), here is the code :
import org.bonitasoft.engine.identity.User;
User user = apiAccessor.getIdentityAPI().getUserByUserName(“tarotg”);
return user.getId();
- This seems to work, because I can see the task has been assigned to myself in Bonita portal. BUT, when i click on the link, I only have access to an “Overview Page”, as if I haven’t rights on the form :
-When accessing to the form via Bonita Portal, everything is fine, the Task is present int Tasks List and the form is correctly displayed when performing the task :
I noticed in Engine logs that I have some warnings when logging :
2016-03-21 10:21:41.352 +0100 org.bonitasoft.console.common.server.login.datastore.LoginDatastoreExt org.bonitasoft.console.common.server.login.datastore.LoginDatastoreExt login INFO: Impossible to login on the engine API : No user or password 2016-03-21 10:21:41.352 +0100 org.bonitasoft.console.common.server.login.datastore.LoginDatastoreExt org.bonitasoft.console.common.server.login.datastore.LoginDatastoreExt login INFO: Error while logging in the engine API: javax.security.auth.login.LoginException: Impossible to login on the engine API : No user or password 2016-03-21 10:21:49.183 +0100 com.bonitasoft.engine.api.impl.ServerAPIExt org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log WARNING: THREAD_ID=119 | HOSTNAME=DES0007 | TENANT_ID=1 | The API method org.bonitasoft.engine.api.ProfileAPI.getProfilesForUser is deprecated. It will be deleted in a future release. Please plan to update your code to use the replacement method instead. Check the Javadoc for more details.
Do you have any idea why it’s not working? Is there a bug with sub-processes and actors? Or am I sending a wrong link?
Thanks for your help!