Public Home Page Form for application

Using bonita 7.2 community on windows 7 pro 64bit

The application that I am making would be deployed on internet. I need to provide a public form based page with various fields which shall get opened to all on internet. people will fill this form and then the back end team will use the same form to starts validating the data filled by users.

When user submits data the form shall just display a success message. I have build the whole process diagram and testing with temporary forms right now from within bonita studio

  1. How can I make this form as home page and accessible by everyone on internet?

  2. Secondly, the form has multiple file upload browse buttons. The back end team will view the uploaded documents and images and verify the data filled in form. How can I allow the validator to view the uploaded image?

Can anyone give some suggestion in this ?

I too would like to know the answer

Hi,

On top of my head, the easiest way to accomplish that would be to add a custom filter to the Bonita webapp. This filter would match on the URL of your application and login to Bonita automatically using a technical user.

Here is a snippet of code to log in Bonita programmatically:

final Map map = new HashMap(); APITypeManager.setAPITypeAndParams(ApiAccessType.LOCAL, map);
        try {
            final LoginAPI loginAPI = TenantAPIAccessor.getLoginAPI();

            // log in to the tenant to create a session
            final APISession apiSession = loginAPI.login(userName, userPassword);
            // set the session in the TomcatSession
            // logger.info("Connection success with[" + userName + "]");

            final HttpSession httpSession = httpRequest.getSession();
            final User user = new User(userName, Locale.ENGLISH.getDisplayName());
            final PermissionsBuilder permissionsBuilder = PermissionsBuilderAccessor.createPermissionBuilder(apiSession);
            final Set<String> permissions = permissionsBuilder.getPermissions();
            SessionUtil.sessionLogin(user, apiSession, permissions, httpSession);
            chain.doFilter(httpRequest, servletResponse);
            return;

Cheers

I would also like to know the answer.

I thought there was a way to login to a living application page by putting the username and password in the url. for example. localhost:8080/bonita/apps/appname/registration?username=anonymous&password=bpm

But when I tested this option it did not work. Is there a way to turn this feature on?

Excellent… Thanks for the suggestion.

I did find a way to login automatically. Hopefully the way I am doing it does not cause any errors with the process running.

I found that if I used the url below it works to automatically login and go directly to the application page. When I tested this before and it didnt work I was using a slightly different url which was for login.jsp

http://localhost:8080/bonita/loginservice?username=helen.kelly&password=bpm&redirectUrl=%2Fbonita%2Fapps%2FDMEFlowSub%2FOpenOrders%2F

Yes your solution does work too!
The only problem is that you have to pass the password of the user in clear text. Might not suit every scenarios.