Lightweight SPARQL-based model validation for Archi. It exports your model as RDF, runs SPARQL-based validation, and reports violations directly in the jArchi console.
- Validate Archi models directly from inside Archi
- Define rules declaratively in SPARQL
- Feedback directly in the jArchi console
- Works on Windows without admin rights
- Requires the jArchi plugin
- Open your model in Archi
- Run the
ArchiRules.ajsscript via jArchi- Exports the model as RDF (Turtle)
- Executes SPARQL rules in the
rulesfolder - Reports violations in the jArchi console
- Review validation results in the console
β 0 elements violate rule C1
β 2 elements violate rule C2: Customer Support; Order Fulfilment
β 233 elements violate rule C3
If there are 100 or fewer violations, element names are shown. If more, only the count is displayed.
# An element may not be composed (directly or indirectly) of itself.
PREFIX archimate: <http://www.opengroup.org/xsd/archimate/3.0/#>
SELECT ?x WHERE {
?x archimate:Composition+ ?x .
}All files should be placed in a folder on your system, for example:
C:\Users\YourName\Downloads\ArchiRules\
Folder contents after installation:
ArchiRules\
βββ validate.js # jArchi script
βββ validate.cmd # Batch file to run all SPARQL rules
βββ rules\ # SPARQL rules (e.g. C1.rq, C2.rq, ...)
βββ tools\ # (created by the user in step 2)
β βββ jdk\ # Portable JDK
β βββ jena\ # Apache Jena
βββ output\ # RDF export and validation results (created after first run)
To use the validate.js script inside Archi:
- Open Archi
- Go to
Scripts β Scripts Manager, and click New Archi Script - Name the new script
ArchiRules - In the script editor, paste the following line (adjust the path if needed):
load("C:\\Users\\YourName\\Downloads\\ArchiRules\\validate.js");
- Save the script
Manually download and extract the following tools:
- Java JDK (portable): Java Downloads (x64 Compressed Archive)
- Apache Jena: Apache Jena Downloads (Apache Jena Commands)
Place them in the tools\ directory as shown above.
MIT