business variables do not retrieve the values from the formOutput


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.

1 answer


You have to use an OPERATION in the process steps to set the process variable with the returned Contract Data.

Select your Task->Details area->Execution Tab->Operations

Add the necessary code to set your process variable from the Contract input.


PS: As this reply answers your question, please mark as resolved.


Submitted by francois.gendre on Wed, 01/11/2017 - 13:40

Hi, I am allready doing this, it is written in the first sentence of the second paragraph:

A contract is defined for each variable as well as operations that push the data from formInputs.

Maybe the way those retruned values are assigned through the "operations" is not correct but the validation status doesn't say anything about it.

You can check it with those print screens:


Submitted by antoine.mottier on Thu, 01/19/2017 - 10:33

How did you create the instance of customerDataVar? Did you use the default value of the business variable?

If possible can you export and share your diagram (.bos file)?



Submitted by francois.gendre on Fri, 01/20/2017 - 14:39

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.

the project can be found there:

Submitted by antoine.mottier on Mon, 01/23/2017 - 10:59

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.

Submitted by francois.gendre on Tue, 01/24/2017 - 11:47

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?

Submitted by francois.gendre on Tue, 01/24/2017 - 12:22

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 file located in /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 is found in different places than the one stated in the install process.

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?


Submitted by antoine.mottier on Thu, 02/23/2017 - 11:40

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.