We are currently having an issue with Relationship Links not persisiting when a document is saved.
We are using a Drop-Down for the binding.
There are 3 Models involved “Belegliste”, “Beleg” and “Kostenart”. They have the following relations: Belegliste (1) - (n) Beleg, Belegliste (n) - (m) Kostenart and Beleg (1) - (1) Kostenart.
We use a CDM and CFM for Belegliste, in there we use a childActivity binding to add a Beleg with another CDM/CFM. The binding we have issues with are on the Beleg CDM/CFM. Both Beleg and Belegliste are persisted as well as their links. What does not save is the selected Kostenart in the Beleg CFM. Here we cannot create a new document and only select from the already existing ones.
The link is present after saving the Beleg, but no longer present when saving the Belegliste.
There is another issue we have with the binding. The selected item does not show up in the dropdown unless we select it two times.
-
Nothing selected:
-
Kostenart selected (both the bottom fields are from Kostenart_DM):
-
Kostenart selected second time:
I have uploaded the Workspace to GoogleDrive and would love to know if there is something we can try/do to fix those 2 issues.
Hi @simon-flat-thread
Can you check the CDM modeling and re-test. I think the following is happening.
- You create a new “Belegliste” using BeleglisteMitBelegen_CDM and _CFM
- You add a “Beleg” to the “Belegliste” using child activity that references BeleglisteMitBelegen_CDM and _CFM
- BelegKostenart is referenced in the CDM used for the Child Activity so everything seems to be okay. (See above screenshot).
- However, BelegKostenart is not referenced in BeleglisteMitBelegen_CDM so this data is not saved when saving the complete composed Document
Adding this relationship into the top-level CDM should resolve the issue.
In my tests, this also resolved the other issue that you saw relating to the drop-down.
Hey @malcolm-silver-ice, thanks for the quick reply!
When adding the relation into the CDM I get an error:
How did you manage to add the relation?
Hi @simon-flat-thread
I got the same error. As I was simply testing your problem I did the following:
- Use the 3dot menu next to “Kostenart” to open the Group Editor.
- Selected “Exclude Computation Rules”.
This will remove the Computation Rules “BelegartComp” so that it’s not causing problems. You can then re-add it to the CDM if it’s necessary.
The background to this error is that the rule should only fire if the repeatable group “BeleglisteBeleg” has been created.
GroupFilled(/BeleglisteBeleg)