Boyapati Ravi Kumar
Boyapati Ravi Kumar

Reputation: 41

create and persits BDMs using DAOs in Bonita

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.

Upvotes: 0

Views: 601

Answers (1)

Antoine Mottier
Antoine Mottier

Reputation: 1183

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.

Upvotes: 0

Related Questions