jqa-core-framework icon indicating copy to clipboard operation
jqa-core-framework copied to clipboard

Validate constraints only if a precondition is fulfilled

Open obfischer opened this issue 9 years ago • 2 comments

Sometimes a constraint is only usefull under certain preconditions. E.g. I have a global set of contraints and concepts. They are packaged in a seperate jar and declared as dependency of the jQAssistant Maven Plugin in a global parent POM.

For example I have some constraints on a specific YAML configuration file but this file does not exist in all of my projects. To handle this I could formulate a query which covers both cases. This approach is working but make writing Cypher queries more difficult and seems somehow to be wrong. In case the precondition (as part of the query) is not fulfilled the constraints will be reported as fulfilled. But how can I fulfill something what does not exist?

To handle such thinks I would like to have support for preconditions as we know them from http://www.liquibase.org/documentation/preconditions.html. If a precondition is given the constraint will be valided only if the precondition is fulfilled. If not the constraint will be skipped.

obfischer avatar Jan 10 '16 21:01 obfischer