Pool variables: data to be used throughout the entire pool. It exists as a temporary object while the engine server is running.
Almost → Pool variables: data to be used throughout the entire pool. It exists as a temporary object for a CASE.
So for example User1 starts the process and generates Case1 with PoolVariables1; when User2 starts the process and generates Case2 he will get PoolVariables2. PoolVariables2 are only related to Case2 and are totally separate from PoolVariables1.
Local variable: exactly like the pool variable, with the only difference that the scope of this variable is limited to a specific task.
Correct
BDO: Is data that is exported during the execution of the process and stored on an external database. This data can only be looked at through the REST API, or the Java API but it can only be modified while on an active instance/process.
Sort of, here is my reading:
BDM is a model of the data,
BDO are instances of the BDM
BDOs are created and populated during the execution of a process case. Bonita stores the data in a database as a function of the system only and they will persist (be available) as long as they are not deleted. They can be accessed via the queries in the BDM.
External Data is Database data, used as required for records of information rather than a BDO. A record could be considered as an individual BDO and vice-versa. For example the BDO statement SQL select name from BDO where id=1 is the same as from external database SQL select name from mySQL where id=1.
BDO’s take away the need for connection parameters etc. unlike SQL where you need to connect, read, disconnect etc… These can be quite heavy on performance and when you have 10,000 users opening case all the time etc…BDO works well in this case.
Now then what is a BDO? Good question.
A customer is a BDO but is the Customers address a BDO? Depends on context.
To the inland revenue a customer is a BDO and addess is simply an attribute of the customer.
To the land registry the address is the BDO and the customer (owner) is simply an attribute of the address.
Now how to use BDO’s (the CRUD)
When CREATING a new Customer....
Start process/case
Create BDO
Process initializes Business Variables (BDO)
Enter data in form/page
Map data (Using the CONTRACT - Automatic)
Contract saves the Data to BDO
End case/process
When READING a Customer....
Start process/case
Read BDO
Display on Form (using Contract) fields ARE readonly
End case/process
When UPDATING the Customer....version 1 - NO HISTORY
Start process/case
Read BDO
Display on Form (using Contract) fields are NOT readonly
Update data in form/page
Map data (Using the CONTRACT - Automatic)
Contract saves the Data to BDO
End case/process
When UPDATING the Customer....version 2 - WITH HISTORY
Start process/case
Create newBDO
Read oldBDO
Copy data from oldBDO to newBDO
Display on Form (using Contract) fields are NOT readonly
Update data in form/page
Map data (Using the CONTRACT - Automatic)
Contract saves the Data to BDO
End case/process
Doing Update 1 will return only 1 record (BDO) when you do Select customer from customerBDO where id=2 however doing Update 2 will return X records for the number of times a customer has been changed when you do the same select.
This is shown in the Application Page of the Getting Started Tutorial where we return lots of instances of the travel requests…
The question here is do you need to keep HISTORY for the Auditors of changes to data records…some do, some don’t. Do you need to know the when and who changed the status of a customer from Living to Deceased? In today’s world you nearly have to record everything and this where where I think BDO Update version 2 works extremely well.
Then I have the following questions:
How do I sort the data from the new variable to retrieve a specific record?
The BDO’s have their own queries to which you can also add your own customized versions (as in the Getting Started Tutorial).
I would assume once I do that I could simply use a set constructor and change the data.
Yes as per the Managers’ Review in the Getting Started Tutorial
Once I make the change how do I make the change in the actual database?
You can use the SET as discussed above.
Would I be creating new records? Replacing the entire BDO?
Depends as per Update version 1 and Update version 2
I don’t know if my doubts make sense.
Yep, it does…and I hope my answers also do,
regards
Seán
PS: If this reply answers your question, please mark a resolved.