I use several business variables to store values chosen by user interaction from UI forms.
After each task I want to use a business variable to store the user selection for a certain type and at the end of the process the last form is supposed to display the selected data from each tasks.
A contract is defined for each variable as well as operations that push the data from formInputs.
these formInputs are of course defined in forms, their attributes are matching the corresponding contracts and operations.
The formInput variables do get assigned with the selected values and the submit buttons on each form sends the formOutput that returns the modified formInput.
Unfortunately the business variables do not hold back the selected values once the form is submitted.
I do not understand why a business variables does not retrieve the data from the corresponding formOutput when the contract is matching the expected data.
It seems that no binding is taking place in these cases.
The business variables only hold the data used to initialize them.
The customerDataVar is created by the mean of a script (NewEmptyCustomerData) that assigns default values to its attributes.
Those default values are not used, I just expect them to be updated by the customerDataInput and the operations defined for this purpose once the form is submited.
After running your process it seems that customer information are correctly stored in the CUSTOMERDATA table.
So process seems to just run fine.
Also I saw that you are using an external Oracle database. I would recommend to only keep one database (single source of truth, avoid duplication): either the one defined using the Business Data Model or your external Oracle database.
If you choose to use your external database you can get data from the database to display them in a form using a custom REST API extension (see SQL REST API extension) and you can read and update it from the process using connectors.
Of course BDM is more integrated and easier to use in forms.
I agree that the process runs fine until it ends but it doesn’t display the data chosen and submitted during the previous tasks.
The last task is intended to display what was chosen by the user during the previous tasks.
In your test does the last task form displays what was chosen and submitted or it just displays the default instanciation values?
The issue is about the fact that the submitted formOutputs data is not available once the task is done.
I don’t think so but now do you mean that data submited from formOutput is DB stored before it is assigned to the data.model variable?
The purpose of the data models I created is to have objects I can work with.
those objects are populated with what is retrieved from the oracle db and selected by the user during tasks.
Unless the submitted formOuputs are DB stored during the process, it should not be a problem to use an oracle DB.
As I am not sure we are talking about the same thing I downloaded the SQL REST API extension from Github to give it a try.
The release is done for bonita 7.2.3, is it goining to work for bonita 7.3.3 and 7.4.1?
Following the instuction to install, it gets puzzling at steps 1 and 2:
1)Configure REST API authorization
Edit custom-permissions-mapping.properties file located in <BONITA_HOME>/client/tenants/1/conf/ directory.
Add a the following permission on a new line at the end of the file: profile|User=[demoPermission]
In my bonita 7.3.3 custom-permissions-mapping.properties is found in different places than the one stated in the install process.
H:\BonitaBPMCommunity-7.3.3\workspace\tomcat\setup\platform_conf\initial\tenant_template_portal
H:\BonitaBPMCommunity-7.3.3\plugins\org.bonitasoft.studio.console.libs_7.3.3.201610061535\tomcat\setup\platform_conf\initial\tenant_template_portal
Wich file should be used, both?
2)Setting up the data source
These instructions apply to a standard Tomcat H2 bundle.
Edit the conf/Catalina/localhost/bonita.xml file and add a new data source:
Also two files are found in different locations, I assume the first one is the good one?
I just update the installation instruction for SQL data source REST API extension.
You can access this new version in the 7.4 branch on GitHub (should be compatible with 7.2/7.3 as well). You can also download the latest version of the extension from GitHub.
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.