h2 data not found ??

1
0
-1

Hi;
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:
../{{context.adtaA04_ref.link}} ?

I do not know where is the problem?
and this is my .bos.
https://drive.google.com/file/d/1Pb1eOuazBnxpUkkaM8nS5_Srhu4Qs-qc/view?u...

Comments

Submitted by delphine.coille... on Tue, 08/06/2019 - 11:38

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.

Submitted by maouachria on Tue, 08/06/2019 - 11:54

I am very glad you answer me, i wish you can help me!!!
this is my .bos
https://drive.google.com/file/d/1Q6BJA77XHv-WLyIbLe4SMQjBWgWO1Are/view?u...

Submitted by maouachria on Tue, 08/06/2019 - 15:17

I want just to know how to save date with business object aggregation relation?

1 answer

1
0
-1

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.

Comments

Submitted by maouachria on Tue, 08/06/2019 - 16:27

1- have you any example how to write script to parse aggregated objects.?
2- What you means by object DAO?

Submitted by maouachria on Tue, 08/06/2019 - 16:38

i try with this exemple:
https://drive.google.com/file/d/1icl0hkmrh9uW1KoTSLdkARPEmSqiBRgx/view?u...

business object message2 has seg1 and seg2 as object attributs.
i add the script but seg1 and seg2 can not saved in message2??

Submitted by antoine.mottier on Mon, 08/12/2019 - 17:45

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.

Submitted by antoine.mottier on Mon, 08/12/2019 - 18:18

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.

Submitted by maouachria on Tue, 08/13/2019 - 18:48

thank sir Antoine.
this .bos to test the proposals find in this forum, my project .bos is this one:
https://drive.google.com/file/d/1FDvtmTPmSyhNfpp55d54GHynJmP0gN_n/view?u...

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?

Notifications