More From Camunda BPM: Java External Task Client & BPM Assert

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

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

Java External Task Client 1.4.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 1.4.0 of our Java client.

Receive Local Variables in Fetch & Lock

Using process variables in External Tasks is a handy feature to transfer data from the process engine to external workers and vice versa.

With the latest version of the External Task Client, you can easily fetch local variables of a task – instead of fetching all accessible variables. You can do this by using the new localVariables operation on the topic subscription builder:

client
  .subscribe("topic")
  .localVariables(true)
  .handler(topicHandler)
  .open();

This feature has been around in the REST API already by setting localVariables to true in such a request and can now also be used directly in Java with the External Task Client.

Fetch Extension Properties

The External Task Client now allows you to fetch extension properties – this works well with using the extension properties to send additional data to the task worker – introduced with Camunda BPM 7.14.

This helps you to achieve a fine-grained separation of concerns when it comes to the data flows. You can read more details in our release blog post.

Here is how it works:

<bpmn:serviceTask id="orderPizza" name="Order Pizza" camunda:type="external" camunda:topic="createOrder"> 
  <bpmn:extensionElements>
    <camunda:inputOutput>
      <camunda:inputParameter name="type">${pizzaType}</camunda:inputParameter>
      <camunda:outputParameter name="orderId">${createdOrderId}</camunda:outputParameter>
    </camunda:inputOutput>
    <camunda:properties>
      <camunda:property name="defaultVendorId" value="1034" />
      <camunda:property name="cancelExistingOrder" value="true" />
    </camunda:properties>
  </bpmn:extensionElements>
</bpmn:serviceTask>

In order to fetch those properties, you can use includeExtensionProperties with the topic subscription in the client:

client
  .subscribe("topic")
  .includeExtensionProperties(true)
  .handler(topicHandler)
  .open();

The topic handler will be able to access the extension properties from the locked External Task by using getExtensionProperties() to receive all of them or getExtensionProperty("propertyA") to fetch specific ones.

Asynchronous Task Handling

The External Task Client 1.4.0 allows you to use id-based operations with the External Task Service API, making it easy to handle external tasks asynchronous in external workers.

You can use the following operations by passing an external task id:

  • complete
  • handleFailure
  • handleBpmnError
  • extendLock

BPM Assert 8.0.0

BPM 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.

We upgraded the version of AssertJ to 3.16.1, which is the current version used in Spring Boot 2.3.x and therefore also the latest Camunda Spring Boot Starter. You can read about version compatibility in our guide.

Check out BPM Assert on GitHub.

Multiple Jobs on Process Instance Level

Handling jobs in a process instance is a very common task when testing process models, e.g. to test on jobs’ status or drive the model by executing them.
With BPM Assert this is easy to do by using the static job helper methods of the ProcessEngineTests class like job(activityId).
This allows you to fetch jobs that are created for specific activities, e.g. the job resembling the asynchronous continuation of activity A in the following model.

In some cases, multiple jobs might be bound to the execution of the process instance at the same time. In the sample model depicted here, the job for the asynchronous continuation of activity A, as well as the one for the timer start event of the event subprocess will be bound to the same process instance.

With BPM Assert 8.0.0, we enhanced the job helper method job(activityId) to also handle such models correctly.
It will now return the job created for the provided activity id, given there is one for it in the current process instance under test.

Check out the user guide of BPM Assert for further guidance on how to use the provided assertion methods.

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.

  • The Journey from Camunda BPM to Camunda...

    You might have noticed something a little different about our recent release announcement: Camunda BPM is now Camunda Platform. We’ve renamed our process automation solution to better reflect our mission to help organizations automate any process, anywhere. And, to be perfectly honest, we are also keeping up with what we’re hearing in the field — many of our users and customers already informally refer to “Camunda Platform” or even just “the platform” or simply “Camunda” when talking about the product. During CamundaCon 2020.2, our CEO, Jakob Freund, explained that processes are the algorithms that determine how an organization runs. They define how we work within our own team or across teams, and they influence the way we deal with our...

    Read more
  • Camunda Optimize 3.4.0 Released

    We’re excited to announce the release of Camunda Optimize 3.4.0. Camunda Optimize provides business activity monitoring for workflows, supporting continuous process improvement by providing transparency into your automated workflows and decisions. Business-friendly reports, dashboards and alerts make it possible to identify process bottlenecks and improve end-to-end processes. If you’d like to get started with Optimize 3.4.0 right away, you can download the release here with your Camunda Enterprise Platform customer credentials. And if you’re not yet a Camunda customer, you can sign up here for a free 30-day trial of the Camunda Enterprise Platform, which includes Camunda Optimize. In the rest of this post, we’ll highlight some of the new capabilities introduced in Optimize 3.4.0. Introducing Multi-Measure and Multi-Aggregation Reports...

    Read more
  • Cawemo Enterprise (On-Premises) 1.6 Released

    We’re happy to announce the 1.6 release of Cawemo Enterprise On-Premises. Cawemo is the specification platform of the Camunda stack, enabling all stakeholders to model and collaborate on BPMN and DMN diagrams and related files. The main improvements in this release are: DMN Modeling Cawemo supports modeling of DMN diagrams in addition to BPMN. Enhanced Template Editor In addition to UiPath, Cawemo supports templates for Automation Anywhere and External Service Tasks. Additionally, you are able to define BPMN Errors. Improved Access Rights Capabilities Organizations and projects can have more than one admin now. LDAP integration You can connect your on-premises installation to an LDAP server. As a Camunda Enterprise customer, you can install or upgrade to version 1.6 following our...

    Read more