Knot.x 2.2 released!

Tomasz Michalak

Knot.x 2.2

We are extremely pleased to announce that the Knot.x version 2.2.0 has been released.

New Features

Debuggable Fragments

With Knot.x, you can easily transform your business logic into a configurable graph structure. The graph (task) defines business operations (such as integration with an API) and decisions (if API responds with A then...). Task belongs to a fragment, an abstraction that represents a client request (in some cases it can be an HTTP request, in other, a part of the page). Read more about configurable integrations here.

From now, you can easily debug your business logic directly in your browser. See the Fragments Execution Log modules for more details.

Chrome Extension

It is an awesome tool that extends the Chrome Developer Tools, providing intuitive business logic debugging opportunities for developers, QAs and business analysts. It reads fragment(s) debug data (provided by Fragments Execution Log modules) and visualizes it.

Knot.x Fragments Chrome Extension

You can read more about this new feature here or watch the live coding session.

Pebble Template Engine

Next to Handlebars, we add Pebble templates support! From now, you can use various templates within the single page. What is more, the same as Handlebars, the Pebble processing is thoroughly scalable with the Vert.x Event Bus.

<knotx:snippet data-knotx-task="payments-task">
    <h2>Payment providers</h2>
      {% for this in root['fetchPayments']['_result'] %}
        <p>Payment provider: {{}}</p>
        <p>Payment URL: {{this.paymentUrl}}</p>
      {% endfor %}

You can read more about this new feature here and see the example.

RestfulAPI support

API Communication logic is provided by configurable HTTP Action (note: you can easily provide your custom implementation). HTTP Action configures endpoint details, HTTP request params and expected response data. With Knot.x 2.2 you can fully configure your POST/PUT/PATCH/DELETE/HEAD API requests in the same way as you did it for GET requests.

You can read more about this new feature here.

HOCON configs testing

HoconLoader loads the HOCON configuration files and converts them to JSON. With it, writing contract tests is even simpler.

You can read more about this new feature here.

Upgrade notes

Please note that we upgraded the Knot.x Examples to Knot.x 2.2. See this PR for more details.

API updates

Fragment API

Fragment API introduces the Fragment Operation and contains the FragmentResult model. This upgrade is required only if you implemented custom actions in your project.

  • update package from io.knotx.fragments.handler.api.domain.FragmentResult to io.knotx.fragments.api.FragmentResult

Action API

Action API is extracted from Fragments Handler. This upgrade is required only if you implemented custom actions in your project.

  • replace dependency: knotx-fragments-handler-api -> knotx-fragments-action-api
  • update packages:
    • io.knotx.fragments.handler.api.Action -> io.knotx.fragments.action.api.Action
    • io.knotx.fragments.handler.api.ActionFactory -> io.knotx.fragments.action.api.ActionFactory
  • rename io.knotx.fragments.handler.api.ActionFactory file in ./src/main/resources/META-INF/services to io.knotx.fragments.action.api.ActionFactory

Starter Kit project

Upgrade Gradle

Upgrade the Gradle version defined in ./gradle/wrapper/ to 6.2.1.

Upgrade Gradle plugins

  • Upgrade Docker Gradle plugin defined in ./buildSrc/build.gradle.kts from com.bmuschko:gradle-docker-plugin:5.3.0 to com.bmuschko:gradle-docker-plugin:6.4.0.
  • In the new Knot.x, all Knot.x Gradle plugins are released with each new version of Knot.x. We recommend to configure them in ./settings.gradle.kts:
    pluginManagement {
      val knotxVersion: String by settings
      plugins {
          id("io.knotx.distribution") version knotxVersion
          id("io.knotx.release-base") version knotxVersion
    See knotx-starter-kit/settings.gradle.kts for more details.

Rename Gradle properties

The io.knotx.distribution plugin uses knotx.version and knotx.conf properties defined in ./ In Knot.x 2.2 we renamed those properties:

  • knotx.version -> knotxVersion
  • knotx.conf -> knotxConf and update all references in ./build.gradle.kts

Update Docker script

Replace the ./gradle/docker.gradle.kts with the new version.

Fix references to GitHub resources

When applying scripts from GitHub, please update references from:

apply(from = "")
apply(from = "")

to tag versions:

apply(from = "${"knotxVersion")}/gradle/docker.gradle.kts")
apply(from = "${"knotxVersion")}/gradle/javaAndUnitTests.gradle.kts")

Release Notes

Knot.x Gradle Plugins

  • PR-10 Knot.x release gradle plugins

Knot.x Dependencies

  • PR-33 - Migrate from Maven to Gradle.

Knot.x Commons

  • PR-14 - KnotxServer response configuration - wildcards 41

Knot.x Launcher

No important changes in this version.

Knot.x Junit5

  • PR-56 - Move HoconLoader from the Fragments module to JUnit5.

Knot.x Server Http

  • PR-53 - Enable resolving placeholders without encoding.
  • PR-46 - KnotxServer response configuration - wildcards 41

Knot.x Repository Connector

  • PR-14 - Make filtering allowed headers case-insensitive

Knot.x Fragments

Knot.x Template Engine

  • PR-38 - Knotx/knotx-fragments#135 Extract actions Core & API.
  • PR-21 - Pebble Template Engine

Knot.x Stack

  • PR-110 - Knotx/knotx-fragments#154 Fragments modules refactor.
  • PR-100 - Knotx/knotx-fragments#135 Extract actions Core & API.
  • PR-97 - Knotx/knotx-fragments#92 Extract HTML Fragment Event Consumer.
  • PR-96 - Knotx/knotx-fragements#73 Functional test for various HTTP methods.
  • PR-92 - Knotx/knotx-fragments#92 Functional tests for exposing task metadata.
  • PR-87 - Knotx/knotx-fragments#92 Update scenario with more validations.
  • PR-86 - #85 Different TE (handlebars and pebble) in fragments integration test.
  • PR-78 - Knotx/knotx-fragments#95 Move HTTP Action from Knotx/knotx-data-bridge to Knotx/knotx-fragments.
  • PR-77 - Knotx/knotx-fragments#92 Demo scenario for exposing data from task.
  • PR-76 - Knotx/knotx-template-engine#20 Pebble Template Engine Integration Test
  • PR-74 - knotx/knotx-dependecies#28 Migrate BOM to Gradle & add BOM to Gradle composite build.
  • PR-72 - knotx/knotx-fragments#79 Configuration changes & functional tests..
  • PR-69 - Circuit breaker: _fallback transition && fallback on failure strategy

Knot.x Docker

  • PR-3 - migrate build to Gradle

Knot.x Starter Kit

  • PR-34 - Knotx/knotx-aggregator#19 Releasing with Gradle.
  • PR-35 - Knotx/knotx-fragments#154 Update Fragment modules dependencies.
  • PR-31 - Knotx/knotx-fragments#135 Extract actions Core & API.
  • PR-27 - Knotx/knotx-fragments#118 Update imports.
  • PR-24 - #15 Update Knot.x version and apply API changes.