Repository navigation
TIE 0.5.0
Definitions can now be written back as JSON or YAML, and fields can compute their value with an expression. Programmable fields come with a new optional module, tie-jexl. Without expressions, 0.5.0 behaves like 0.4.0.
Added
DefinitionWriter.toJson/toYaml: a definition built with the Java API, or loaded, written as the documentDefinitionLoaderreads back.- The definition is validated first.
- Keys follow the schema order and defaults are left out, so equal definitions give the same text.
- Literal credentials are written as
***.
- Programmable fields:
expressionon a field computes its final value.- On import, expressions run after the other steps of every field, in declaration order. They see
value, the other fields, the parent record (parent,parent.parent),todayand the context variables. The result is converted to the field's type and validated. - On export, they run over the supplied values.
- New SPI
ExpressionEngine(Tie.Builder.expressionEngine) and line error codeEXPRESSION_FAILED.
- On import, expressions run after the other steps of every field, in declaration order. They see
- New module
tie-jexl:JexlExpressionEngine, with Apache Commons JEXL in a restricted sandbox:- no class access, loops,
newor side effects; - misspelt names are errors;
- functions
tie:age,tie:years,tie:blank,tie:date,tie:formatandtie:coalesce.
- no class access, loops,
- Spring Boot starter: registers a
JexlExpressionEnginewhentie-jexlis on the classpath.
fields:
- { name: birthDate, type: DATE }
- name: idDocument
expression: "value != null ? value : (tie:age(birthDate) < 16 ? parent.idDocument : null)"Tie tie = Tie.builder().expressionEngine(new JexlExpressionEngine()).build();
String yaml = DefinitionWriter.toYaml(definition);Changed
FieldDefinitionhas a newexpressioncomponent, so its canonical constructor changed. The builder is unaffected.- A credential equal to
***, whatDefinitionWriterwrites for a literal one, is now a configuration problem. copyFromof a field with anexpressionis now a configuration problem.
Artifacts
| Artifact | |
|---|---|
io.github.tie-integration-engine:tie-core:0.5.0 |
The library |
io.github.tie-integration-engine:tie-jexl:0.5.0 |
Optional programmable fields with Apache Commons JEXL (new) |
io.github.tie-integration-engine:tie-spring-boot-starter:0.5.0 |
Optional Spring Boot 4 auto-configuration |
Available on Maven Central:
<dependency>
<groupId>io.github.tie-integration-engine</groupId>
<artifactId>tie-core</artifactId>
<version>0.5.0</version>
</dependency>The jars, with their sources and javadoc, are attached below. Requires Java 25.
Documentation
- README and CHANGELOG.
- Full diff: v0.4.0...v0.5.0.
- Modules: tie-core, tie-jexl (new) and tie-spring-boot-starter.