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.

  • Header image that reads, "Camunda Automation Platform 7.18.0-alpha4 Released

    Camunda Automation Platform 7.18.0-alpha4 Released

    We are pleased to announce the next alpha release of Camunda Platform Runtime 7.18. This release features the following improvements: Support for H2 2.1 Traditional Chinese translations are available Improved status monitoring of batch jobs Improved safety of executing a batch operation on the Batch Operation page 8 Bug Fixes You can download Camunda for free or run it with Docker. For a complete list of all improvements, take a look at the release notes. Please also see the list of known issues. If you want to dig in deeper, you can find the source code on GitHub. Support for H2 2.1 This release adds support for the H2 database in version 2.1, which provides fixes for vulnerabilities. Enterprise customers...

    Read more
  • A title slide that reads "Camunda Optimize 3.9.0 alpha3 Released

    Camunda Optimize 3.9.0 alpha3 Released

    We’re excited to announce a new release of Camunda Optimize. 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, improve end-to-end processes, and evaluate the success of your process automation initiative. In the rest of this post, we’ll highlight some of the new capabilities introduced in Optimize 3.9.0 alpha3. What’s new? Ease of adding new reports to dashboard Reports are added to dashboards to design an individual overview of the performance of your processes. Adding reports to dashboards was already possible with previous versions of Optimize, but now we’ve reduced the number of steps to do...

    Read more
  • A Technical Sneak Peek into Camunda’s Connector...

    Learn what a connector is made of, how the code for a connector roughly looks, and how connectors can be operated in various scenarios. Since this is a preview, details are subject to change.

    Read more

Ready to get started?

Still have questions?