Getting Validity of Functional Chains

image

Greetings,

Using P4C, how can I extract the data from a functional chain object that it is invalid?

Looking at the FC (functional chain) class in the java layer, there is no “isValid()” getter. Looking at the Java layer through a decompiler I can see that there is a constraint class that the FC class implements. Any pointers on how to get this “invalid” tag from Capella in Python is greatly appreciated.

I guess the problem here is that the object itself isn’t invalid but the functional chain.
This is because your element doesn’t have any OutgoingInvolvements or PreviousFunctionalChainInvolvement. So maybe your python routine should search for objects within a functional chain that does not have any OutgoingInvolvements AND does not have any PreviousFunctionalChainInvolvement.
Best regards

I did have this kind of check before, but using custom validation rules there are other cases which can make functional chains invalid. It would make more sense to just find out where in Capella this “invalid” is stored and pull from there.

Right now I am trying to find where in the Capella model these rule checks are stored as seen in the image below.