i’ve got a problem with the Bonita 7 UI Designer Button (Bonita 7 Community Edition)
I try to load the contents of a Table Widget when i click on a button. Therefore i created a button, set the action to “POST” and entered the URL to an API Call. I leave the “Data sent on click” part empty. Both “Successful response value” and “Failed response value” are mapped to empty String variables. The first one is used to fill the table and the second one is displayed for debugging reasons…
The following happens:
If I enter a relative path like “…/API/bdm/businessData/com.company.model.KnowledgebaseEintrag?q=find&p=0&c=10” and click on the button in preview mode, everything works as expected and the table is filled correctly. If I start the process and do the same in the corresponding task, I receive an empty error message (“”)
I’m guessing that the relative path is converted to the absolute path when the button is clicked on the running task and that there is a problem with resolving the current user.
Based on the description of your use case I can suggest two options:
One is to search as user type in search field. I create an example that illustrate that. Main limitation is that multiple queries are sent to the server.
The second option would be to create a custom widget to perform the GET REST API call.
Currently a custom widget is require because “button” widget does not support GET operation. Such feature will be added in a future release.
Hi, it can be solved using a button, in action choose “GET”, and in url to call put the api call, in successful response value put a variable that holds the response, in this case json.
This is an example process, which includes the very step that is failing, for i’m not allowed to share the whole process.
It includes what i’m really trying to achieve: A search functionality. I created a custom query for the bdm for searching both in the titles and the description (beschreibung) of the specific bdm.
Is there any other way to load the content of a table dynamically, as there is no GET type on the button widget?
Thanks for your answer. I came to the same conclusion and implemented a direct search as shown in your example, after i quickly attempted a to create a GET custom widget (it didn’t work out quite well, as i’m a absolute jquery/AngularJS beginner). Until i delve deeper into the matter, your example is adequate
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.