What are you looking for?

More From Camunda BPM: Node.js External Task Client, Spring Boot Starter & Assert

  • Blog
  • >
  • More From Camunda BPM: Node.js External Task Client, Spring Boot Starter & Assert

Alongside our Camunda BPM 7.13.0 release, we’re excited to announce the following releases:

You can read all about the Camunda BPM 7.13.0 release in the dedicated blog post.


Node.js External Task Client 2.0.0

The External Task Clients help you to decouple your services from the Workflow Engine – a common use case, for example, in microservices architectures. We’ve released version 2.0.0 of our Node.js client.

Node 8 support is deprecated with versions >2.0.0.

Logging Levels in Node.js Client

In production, you usually don’t care about every time the client queries for new jobs. These log entries make debugging harder because errors get buried. But during development, it is important to check if jobs are acquired and fetching works as expected.

To accommodate both use cases, the default logger now supports log levels. The default level is info. You can change the logging level like this:

<span class="token keyword">const</span> <span class="token punctuation">{</span> Client<span class="token punctuation">,</span> logger <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"camunda-external-task-client-js"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> client <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Client</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  use<span class="token punctuation">:</span> logger<span class="token punctuation">.</span><span class="token function">level</span><span class="token punctuation">(</span><span class="token string">'error'</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
  baseUrl<span class="token punctuation">:</span> <span class="token string">"https://localhost:8080/engine-rest"</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

To emulate the previous logging behavior, you can use the debug logging level. You can learn more about the logger in the docs.

Keycloak Auth Interceptor for Node.js Client

Keycloak provides a single sign-on solution and allows centralized user management for all your applications. If you secure the Camunda REST-API this way, it can become difficult to access it from an external service.

The Keycloak Auth Interceptor modifies the request headers of the requests to work with your Keycloak-secured REST-API. To instantiate a client with the Keycloak Interceptor, you will have to configure your Authentication first:

<span class="token keyword">const</span> <span class="token punctuation">{</span>
  Client<span class="token punctuation">,</span>
  KeycloakAuthInterceptor
<span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">"camunda-external-task-client-js"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> keycloakAuthentication <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">KeycloakAuthInterceptor</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  tokenEndpoint<span class="token punctuation">:</span> <span class="token string">"https://your.keyclock.domain/realms/your-realm/protocol/openid-connect/token"</span><span class="token punctuation">,</span>
  clientId<span class="token punctuation">:</span> <span class="token string">"your-client-id"</span><span class="token punctuation">,</span>
  clientSecret<span class="token punctuation">:</span> <span class="token string">"your-client-secret"</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> client <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Client</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  baseUrl<span class="token punctuation">:</span> <span class="token string">"https://localhost:8080/engine-rest"</span><span class="token punctuation">,</span>
  interceptors<span class="token punctuation">:</span> keycloakAuthentication
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

Read more about the details here.

Assert 6.0.0

Assert helps you test your processes conveniently in Java. The latest release adds more testing and convenience features to make checking your processes quick and thorough.

Check out Assert on GitHub.

Find Elements by Name

Tests should be expressive. To aid in this, Assert now has the convenience function findId(), which will search for the ID of an element with a particular name.

Tests that would typically contain a nondescriptive ID like

<span class="token function">assertThat</span><span class="token punctuation">(</span>processInstance<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isWaitingAt</span><span class="token punctuation">(</span><span class="token string">"Task_0834dhg"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

can now be written using the Task name

<span class="token function">assertThat</span><span class="token punctuation">(</span>processInstance<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isWaitingAt</span><span class="token punctuation">(</span><span class="token function">findId</span><span class="token punctuation">(</span><span class="token string">"Process Invoice"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

Read more about it in our user guide.

Assertions for Joining Gateways

With Assert 6.0.0 it is now possible to run assertions on joining gateways, even though they are no active tasks.
The assertions can be used like any other Element:

<span class="token function">assertThat</span><span class="token punctuation">(</span>processInstance<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">isWaitingAt</span><span class="token punctuation">(</span><span class="token string">"JoiningGateway"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

Spring Boot Starter 7.13.0

The Camunda Engine can be embedded into your Spring Boot project using the Spring Boot starter.

Starting with the release Camunda BPM 7.13.0, Spring Boot starter is now part of the core platform. Therefore, it will also follow the 7.x release cycle of the core platform in the future.

You can read the details in the Camunda BPM Run release post.

Register for the Webinar

If you’re not already registered, be sure to secure a spot at the release webinar. You can register for free here.

Your Feedback Matters!

With every release, we strive to improve Camunda BPM, and we rely on your feedback! Feel free to share your ideas and suggestions with us.

You can contact us via the Camunda user forum.

Try All Features of Camunda

Related Content

Announcing our new SAP integration: find out what inspired us to build the solution, how it works and what you can expect (hint: flexibility, speed and reduced risk).
We're excited to announce the 8.6 release of Camunda. Check out what's new.
We're excited to announce the September 2024 alpha release of Camunda. Check out what's new.