How do i make use of the Bonita Provided Data Access Objects (DAOs) variables to create new instance of the Business Data Models (BDMs) Object and persist it.
Asked
Active
Viewed 483 times
1 Answers
0
In order to create a new object instance, simply declare it as part of your process business variables and initialize it:
- Select process pool
- Go to "Data" tab
- Select "Pool variables" sub-tab
- In "Business variables" section click on "Add..." button
You can initialize it either:
- Using the business variable default value:
- In "Business variables" section click on "Add..." or "Edit..." button
- In the "Default value" field click on the pencil icon to bring the Groovy script editor.
- Use the Groovy script editor to create a script that create a new instance of your business variable Java object.
- or using an operation on a task:
- Select the task.
- Go to "Execution" tab, "Operations" sub-tab.
- Click on "Add" button.
- On the drop-down list on the left select your business variable.
- Make sure the operation is set to "Instantiate with". If operation is different (e.g. "Takes value of"), click on the operation link and use the drop-down list to select "Instantiate with".
- Click on the pencil icon on the right to bring the Groovy script editor.
- Use the Groovy script editor to create a script that create a new instance of your business variable Java object.

Antoine Mottier
- 1,185
- 1
- 8
- 13