h2 data not found ??
I create a BDM with business objects, each of them has others business object as attributs.
for each task in process, i assigned a form that was create from contrat, this contrat contains these business objetcts;
After running this process, there are no data in H2 data base? also, i can not display this data when i use:
I do not know where is the problem?
and this is my .bos.
Hi, Thank you for your .bos, but I can't download it and it would be useful to answer. Could you please send a new link? Thanks.
After reviewing your process I think I understand why data is not recorded in your H2 database at form submission. Everything looks fine in the form, nevertheless you need to set up operations in Bonita Studio to update the BDM object with the value from form output.
When you are on a task, go to Execution/Operations, set up your target business object, the operation and write a script to parse all aggregated objects. You can find it in the documentation in Operations section.
Please pay attention to the fact that you should not use the object DAO in the right operand of your script.
I hope it helps. If that's the case I'll let you validate my answer, it might be helpful for other members.
1- have you any example how to write script to parse aggregated objects.?
2- What you means by object DAO?
i try with this exemple:
business object message2 has seg1 and seg2 as object attributs.
i add the script but seg1 and seg2 can not saved in message2??
First a quick comment on the process you shared: in the process configuration, the username to use when running the process from the Studio is "Moufida " with a space at the end. This failed because the user is registered without this white space at the end: "Moufida". I recommend to fix this configuration issue. I'll continue my investigation based on your example.
In order to start, your process need to receive the data defined in the contract. In your example the contract include one complex input named "message2Input" with a single attribute "labelmpsg2". I can confirm this work correctly in your example (the form sent the data expected by the contract).
The default value of your process business variable named "message2", is set using a Groovy script that will use the contract "message2Input", "labelmpsg2" attribute value.
This is correct and I can successfully execute this and see the attribute "labelmpsg2" of your business variable being stored in the test database used for business data (h2 database embedded in Bonita Studio).
Note that your business variable "message2" is of type "Message2". This type has an attribute named "labelmpsg2" of type "string", but also two other attributes "se1" and "se2" of type "Seg1" and "Seg2". I cannot find any data for those two attributes because you don't initialize them in "message2" default value. So if you want to initialized "se1" and "se2" attributes you need to update the "message2" default value script and optionally update the contract and form to get the data from the user.
Note that you probably don't need to define "seg1" and "seg2" business variable as the data is already part of "message2" business variable.
thank sir Antoine.
this .bos to test the proposals find in this forum, my project .bos is this one:
do I have to initialized all the business variables even those that I use only in the business tasks? ?
as in the previous bos!!!
if yes, how i can do it?