0

I use Bonita Community Edition Version : 2022.1 on MacOS Monterey

I developed a simple process, with business object / data / variable, a web form input with contracts, etc.

The form is containing :

  • Bonita auto generated fields auto binded to the business object
  • a custom widget because I wanted to update some fields when the user type input other fields (auto calculation). It’s composed of 6 fields which interact between them. It’s working fine.

The issue is coming when I try to bind the custom fields to the business object. The data from the Bonita auto generated fields are saved in the DB but the custom fields.

I really tried to deep dive into official forum, stack, google and other but I couldn’t find any documentation or example on how the binding is done with the custom widget output.

starball
  • 20,030
  • 7
  • 43
  • 238

1 Answers1

0

You need your custom widget to use a Bidirectional Bond property for each calculated value you have (in your case, 6 of them).

Then, bind each of these six Bidirectional Bond properties to Form Variables. This makes them usable for the next step.

Then go to the JavaScript code of your formOutput form variable. This JavaScript code builds the JSON object that is sent from the browser to the server when submitting a form. You'll need to include the Form Variables bound to your custom widget here.

This gets them submitted to the Bonita server.

From there, the form's contract needs to know about those variables and store them as needed (presumably as process variables which you then do stuff with).

starball
  • 20,030
  • 7
  • 43
  • 238