Hi A12 experts,
I encounter the error as attached screenshot while creating a cmd model from several data models linked with relationships.
Some of the validations throw error message but some don’t and I have no clue where did I do wrong.
Kindly have a look
Client.json (5.7 KB)
ClientCDMTest.json (5.4 KB)
ClientContract_relationship.json (2.1 KB)
ClientContract_relationship_client____generated.json (1.4 KB)
ClientContract_relationship_contract____generated.json (1.4 KB)
BrokerClient_relationship.json (2.0 KB)
BrokerClient_relationship_Broker____generated.json (1.4 KB)
BrokerClient_relationship_Client____generated.json (1.4 KB)
Hi @huyen-gentle-brush,
I assume that the relationship ClientContract_relationship is a “1 to n” relationships so that the Group “ClientContract_relationship” in your CDM has a repeatability that is > 1.
The error that you are seeing is completely normal when modeling a rule using a negative language construct in a repeatable context. See the note in the Kernel Language Docs.
You need to specify if this level of the repeat has been created. You can do this using
GroupFilled(RuleGroup). This will have very little effect on the rule in the non-repeatable context. As soon as one field in the group is filled, this partial condition is true.
Thanks for your prompt response.
Your assumption is absolutely correct. I’ll add the GroupFilled(RuleGroup) into the validation
Adding GroupFilled(RuleGroup) into the source models works but I hope it just a temporary solution.
To describe the above issue for easier understanding.
If a document model is created with validation rules verifying a field is filled, this model on its own is valid. In the event this model is then included into another DM/CDM, and repetition set to >1, an error might be triggered.
This behavior is confusing. So as a modeler, I want to be able to create the composed data model without having to adjust the validation rules in the source data models.
Hi @huyen-gentle-brush
Thanks for the feedback. I’ve passed it on to the Kernel team so they can have a look.