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.

  • Camunda BPM Telemetry: Community FAQ

    Camunda BPM version 7.14 includes the option to turn on Telemetry as explained in this earlier blogpost. This anonymous data will be used to help us better understand what people are really doing with the engine and will make it easier for us to highlight the community influence on future roadmaps.  When any of us stakeholders bring new potential features to the table for an upcoming release, our opinion on its own isn’t enough to shift the roadmap. Any good proposal needs to be data-driven. At the moment, a lot of the data I bring along with my proposals comes from forum posts, individual requests on JIRA, and one-on-one conversations with community members at user groups or other events. This...

    Read more
  • Cawemo Enterprise 1.4 Released

    We’re happy to announce the 1.4 release of Cawemo Enterprise On-Premises. Cawemo is the BPMN process specification platform of the Camunda stack. It enables all stakeholders to model and collaborate on files related to business process diagrams. The main improvements in this release are: Catalog and Templates You can now create and manage Templates which you can sync down to your Camunda Modeler and re-use, for example to connect your processes via Service Tasks with RPA Bots. Camunda Modeler Plugin Cloud Connect 2.0 Use the latest version of the Plugin to keep track of Templates you created in Cawemo and use them directly in the Camunda Modeler. As a Camunda Enterprise customer, you can install or upgrade to version 1.4...

    Read more
  • Camunda Modeler 4.3.0 Released

    Camunda Modeler v4.3.0 comes with a ton of improvements for users working heavily with variables and templates.

    Read more