Hello,
I fill my BDM from database, now how to clean data in BDM before I query from database?
I try isDeleted like this but it’s not work.
isDeleted
Thanks and Best Regards,
Anna
Hello,
I fill my BDM from database, now how to clean data in BDM before I query from database?
I try isDeleted like this but it’s not work.
isDeleted
Thanks and Best Regards,
Anna
the problem isn’t the IsDeleted expression but the Takes Value of expression
Here I would create a script (pencil) to do something like…
import com.company.model.MyBDM;
MyBDM newMyBDM = new MyBDM ();
newMyBDM .setField1(resultset.getString(“”));
newMyBDM .setField2(resultset.getString(“”));
newMyBDM .setField3(resultset.getString(“”));
return newMyBDM;
regards
Seán
PS: if this answers your query please mark as Resolved
Can you explain a little bit more the use case?
From the image you shared I understand that you are mixing a MySQL connector and BDM. That is kind of unusual as BDM take care of persistence in its own database and so you should not need any extra database nor database connector.
To delete a business data from business data storage (i.e. the BDM database), you need to use the “Is deleted” operation.
Can you share your process so I can take a look at the way you are creating and deleting the business data?
Hi Antoine, bonne année
as mentioned below, I think that while BDM is well stated, it is the proper use of BDM that is confusing.
It might be worthwhile in the documentation to have a bit more information on what is BDM data and what is external data and how they should be used correctly.
For example in the documentation it is stated Invoices, orders etc. are valid for BDM, this is true but only for the lifetime of the processes that use the data. They then must be archived off to external databases to be kept for other systems, auditing etc. This is not mentioned anywhere.
Otherwise as Anna as found, and others will I’m sure, BDM will become a bloated mess that people have to sort out later.
One reason I’ve not fully used BDM’s as I can’t get them to fit my processes.
To me they are an excellent way of persisting Parameters rather than using the current method, of having to define them for each process, that just doesn’t work for me.
regards
Seán
Hi Seán and happy new year!
Actually it is totally valid to store in BDM data that have a life cycle longer than a process instance. It is actually the main advantages of business data: to be able to be used by multiple process instances and process definitions. It is also safe to have other systems reading data directly from business data database (with an appropriate sizing and configuration of the RDBMS).
About dealing with data that pile up in the business data database I think two options are valid:
Hello Sean,
This is my script in Takes value of expression
import com.company.model.MstDeployType;
List newMstDeployTypes = new ArrayList();
while(resultset.next()){
MstDeployType newMstDeployType = new MstDeployType();
newMstDeployType.setDeployTypeId(resultset.getString("DEPLOY_TYPE_ID"));
newMstDeployType.setDeployTypeName(resultset.getString("DEPLOY_TYPE_NAME"));
newMstDeployTypes.add(newMstDeployType);
}
return newMstDeployTypes;
My script similar like your script but my BDM never delete & the data always pile up. Any idea?
Thanks and Best Regards,
Anna
Hi Anna,
Thanks for that, and after reading your latest post I started to think about the use of BDM…
And I don’t think it’s being used effectively, something that maybe someone from Bonitasoft could write a feature about… The Proper Use of BDM …
From Data Handling Overview and Business Data Model we see that
Business (Data) variables for information that
This is all well and good, but as you have found your BDM database is filling up.
The thing that’s missing is it must have a life relevancy.
Once the BDM data is finished with it needs to be archived (or simply deleted) from the database.
One way of doing this is to save all the data to an external database rather than in the BDM.
What you need here is a BDM Scrubber, to clean the BDM database of old data. How that is defined is missing from the BDM.
I must admit while I feel BDM has value, certainly for internal work, for storing data I’ve never really been comfortable with it over using traditional External Databases…
We much prefer the latter approach for data management capabilities etc.
Now…if Bonitasoft modified BDM slightly to work differently, with an external database that would change things.
…BDM should be linkable to a view or schema from a database and use that. That’s what I think should happen rather than use it’s own databases.
regards
Seán