Forms problems when deploying the process to the server

Hi,

I have a process which works as expected from the Studio but when I deploy into the server, one of the forms doesn’t work properly.

I have two forms and two process variables (of type collection) in two different pools. I’m using exactly the same external API to get the data in the two forms :
varName1 = …/API/bpm/activityVariable/{{taskId}}/processVariable1 → first form
varName2 = …/API/bpm/activityVariable/{{taskId}}/processVariable2 → second form

I’m using them to fill a table in each form. When running from the studio both are filled correctly but when I deploy the process into the server, one of the tables (form1) still works but the other (form2) is blank. In the logs I can see that the process variable is not empty.
The main difference between the two forms is that the second one is in a multi-instantiated human task but I’ve tried not using the multi-instantiation (among other things, help please) and it still doesn’t work.

Any idea of what could I be doing wrong?

Thank you in advance.

As you figure out in your test issue is related with the REST API authorization.

In order to finely tune the authorization for REST API calls please take a look at the dedicated documentation page.

Can you try to display the web browser developer tools, go to the network tab and try to reload the form that does not work and see if you can spot the HTTP call to the API/bpm/activityVariable URL?

You can as well check that you don’t have any errors in the Engine log file.

If the HTTP call is successful and you don’t have any error in the Engine log file issue is most likely related to the widget configuration.

If you need more help, sharing your process as a .bos file and/or export the HTTP call result as an HAR file might help to diagnose the source of the error (use Google Drive, Dropbox… to share the files).

First of all, thanks for your quick reply.
The http was throwing the error 403 (forbiden). So I understood why the first form was working: it’s mapped to a user who is also administrator (walter.bates, I think I assigned him for testing). I mapped him to the task with the second form to check if that was the problem and his form works as expected, but I don’t know how I can fix this.

I guess in the studio everything was working because all the users in ACME are also administrators, but that’s not what I want.

Any idea of what I could do to grant permissions to the users who aren’t administrators?

Maybe I misunderstood something but in my case it seems like the profile “User” needs the authorization to access activityVariable so he needs flownode_visualization. I tried to follow the steps in the documentation so I did:

  • $BONITA_HOME\setup\setup.bat pull
    -added to $BONITA_HOME\setup\platform_conf\current\tenant_template_portal\custom_permissions_mapping.properties the following:
    profile|User=[flownode_visualization]
    -$BONITA_HOME\setup\setup.bat push

I’ve been trying to fully understand the documentation but still can’t figure out what else I should do.

Thanks for your help and your time.