AQL expressions
🔥 This feature is currently considered experimental. Try it out and give feedback by reporting bugs and suggesting new features. It’s not recommended for production use.
🛠️ This feature is available to studio makers.
Sirius Web uses the Acceleo Query Language (AQL) for labels, styles, filters, tools, and custom widgets. This page summarizes the language features that studio makers leverage inside the view editor.
1. Where AQL is used
You will encounter AQL in every representation description type:
-
Labels, tooltips, and conditional styles for diagrams, tables, decks, and forms.
-
Semantic candidate expressions (
semanticCandidatesExpression) on descriptions. -
Palette tools and operations, where expressions compute targets, values, or selections.
-
Table columns, form widgets, or card descriptions that display derived values.
2. Evaluation context
-
selfalways refers to the current semantic element. -
You can access attributes directly (
self.name,self.status) and navigate references (self.owner,self.children). -
When an expression is evaluated inside a table column, card widget, or form field,
selfis the semantic element bound to that column or widget. -
Palette tools run in tool-specific contexts (for example,
selfis the selected element), so double-check the context before writing complex logic.
Use the Query view to inspect the current context and test expressions interactively.
3. Common syntax examples
| Pattern | Example |
|---|---|
Attribute access |
|
Navigation |
|
Filtering |
|
Aggregation |
|
String helpers |
|
Conditional |
|
Collections |
|
Numeric |
|
Boolean |
|
4. Debugging tips
-
Evaluate new expressions in the Query view before using them in the editor.
-
Watch for type errors such as “unresolved feature” or “invalid type: Expecting String, found Boolean”. They usually mean
selfwas not what you expected or you forgot to calltoString. -
Break down long expressions into simpler ones; reuse helper expressions in descriptions or move them into Java services when needed.
5. Learning resources
-
Practice with the Navigate with AQL tutorial.
-
Review the official AQL documentation for advanced operators.