Bonita 7.6.3 - creating forms from contracts


Hello guys!
I've tried to create forms from contracts. So firstly, I've created globally a business variable. Then, on each activity, I've created contracts from that business variable and then I've created form based on this contract. It did map all the properties of the object, so it seemed fine. Then, I've used the same business variable and created the same contract on another activity, which mapped the data to form as well.
However, when I executed the process and written the data in activity 1, the data was NOT persistent and was NOT visible in activity 2. Why's that?

2 answers


Thank you my friend

But the problem occurs when I click on UI Design


Submitted by joe.pappas on Thu, 03/15/2018 - 15:37

Hi, you'll have to expand your comment. What do you mean by 'the problem'


Hi, my guess is that you're not retrieving the data from the Business Data Model. Have a look at the formInput variable of your generated form for activity 2. My guess is it's an empty JSON rather than a REST API call to retrieve the persisted data. See: (note bold line and update with your own variable names)

Now define the form for the Manager review task. Start by automatically generating the form from the context, then add widgets to display the request details for the manager to review. Follow these steps:

In Bonita Studio, select the Manager review task and go to the Details panel, Execution tab, Contract pane.

At the top-right of the Details panel, click the UI Designer icon. This generates a form and opens it in the UI Designer.

Change the form name to reviewTravelRequest.

Add a variable to get the information that the user enters in the request form. To do this:

In the Variables tab, click Create a new variable.
Specify the name, request.
Set the Type to External API.
Set the value to ../{{}}.
Click Save.


Submitted by studentnaferi on Wed, 03/14/2018 - 06:44

Thanks for the feedback. can't this be automatically done, i.e., aut-generated?

Submitted by joe.pappas on Wed, 03/14/2018 - 15:01

One approach would be to change the formOutput variable described above to the REST API call to retrieve the data and then create a new variable to send back the updated data. Be sure to change the "Data sent on click" on the Submit button to the new variable. Not quite auto generated but close :)