<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Camunda</title>
    <description>The latest articles on Forem by Camunda (@camunda).</description>
    <link>https://forem.com/camunda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F4009%2F5f19c07c-1c70-4bb2-9d51-dc8f742d6eb7.png</url>
      <title>Forem: Camunda</title>
      <link>https://forem.com/camunda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/camunda"/>
    <language>en</language>
    <item>
      <title>From Insights to Action: Harnessing Camunda Optimize for Effective Development</title>
      <dc:creator>Samantha Holstine</dc:creator>
      <pubDate>Mon, 26 Feb 2024 13:00:00 +0000</pubDate>
      <link>https://forem.com/camunda/from-insights-to-action-harnessing-camunda-optimize-for-effective-development-5bd2</link>
      <guid>https://forem.com/camunda/from-insights-to-action-harnessing-camunda-optimize-for-effective-development-5bd2</guid>
      <description>&lt;p&gt;As a new Camunda user, I am actively learning the wide toolset the product has to offer and understanding its impact on my new role at Camunda. While navigating through the &lt;a href="https://academy.camunda.com/" rel="noopener noreferrer"&gt;Camunda Academy&lt;/a&gt; tutorials, my curiosity prompted me to explore all of Camunda’s components, leading me to discover &lt;a href="https://docs.camunda.io/optimize/components/what-is-optimize/?&amp;amp;utm_medium=social&amp;amp;utm_source=youtube&amp;amp;utm_content=video&amp;amp;utm_term=devrel-sam-optimize-devs" rel="noopener noreferrer"&gt;Optimize&lt;/a&gt;. As a developer, I was hesitant at first to learn more about a feature that is primarily designed for business logic, but immediately saw how developers can leverage its features to enhance their development process and gain valuable information. This blog post will guide you through my findings as I learn more about Camunda and Optimize, using a simple &lt;a href="https://camunda.com/blog/2024/01/creating-engaging-trivia-experiences-developers-perspective/" rel="noopener noreferrer"&gt;trivia game&lt;/a&gt; as a practical illustration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Error and Incident Optimization
&lt;/h2&gt;

&lt;p&gt;One of the key features of Optimize is its ability to help developers optimize their processes to produce fewer errors in the long term. By leveraging &lt;a href="https://docs.camunda.io/optimize/components/userguide/creating-reports/#creating-a-single-report/?&amp;amp;utm_medium=social&amp;amp;utm_source=youtube&amp;amp;utm_content=video&amp;amp;utm_term=devrel-sam-optimize-devs" rel="noopener noreferrer"&gt;premade reports&lt;/a&gt;, developers can identify incident hotspots and bottlenecks using heatmaps.&lt;/p&gt;

&lt;p&gt;When adding a “Locate incident hotspots on a heatmap” template to an Optimize dashboard, developers can produce a visual representation of incidents based on both the resolution duration—how long it takes to resolve a specific issue—and by count—how many incidents occurred. By hovering over any task on the heatmap, developers can quickly analyze the duration and frequency of incidents. Additionally, filters can be applied to narrow down the data, such as by date and time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rvcyhwhdoq0wheiptva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rvcyhwhdoq0wheiptva.png" alt="Trivia-timespent-optimize" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at our trivia game example, the heatmap can display the average time each trivia game spends at a specific task, in this case getting a hint from OpenAI. However, if this task was attached to a specific piece of code, developers can easily identify where there may be issues, like a bug in the code or a service that is down.&lt;/p&gt;

&lt;p&gt;Another useful template in Optimize is the “locating bottlenecks” report. This heatmap showcases the average time spent on each part of a process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbt3fueyset6r69p630n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbt3fueyset6r69p630n.png" alt="Trivia-bottlenecks-optimize" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, in the trivia game, answering questions and displaying messages took the longest amount of time. By analyzing this data in their product, developers can identify potential areas of improvement or automation. This information can help optimize the code and improve the overall user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Custom Reports
&lt;/h2&gt;

&lt;p&gt;In addition to pre-built templates, Optimize allows developers to create their own custom reports. With a blank report, developers have the freedom to display any data they desire. For instance, the number of categories played in the trivia game can be showcased.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnxzmutetjj3zlv1lfr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnxzmutetjj3zlv1lfr1.png" alt="Trivia-categories-optimize" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s not surprising to see that science/nature was our top category at a developer conference! This provides a comprehensive overview of the process’s performance and user preferences, as well as information about specific variables to make sure they’re producing the correct values.&lt;/p&gt;

&lt;h2&gt;
  
  
  In-depth Process Analysis
&lt;/h2&gt;

&lt;p&gt;Optimize offers an &lt;a href="https://docs.camunda.io/optimize/components/userguide/process-analysis/task-analysis/?&amp;amp;utm_medium=social&amp;amp;utm_source=youtube&amp;amp;utm_content=video&amp;amp;utm_term=devrel-sam-optimize-devs" rel="noopener noreferrer"&gt;analysis tab&lt;/a&gt; that provides additional insights into data and performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgz54ydtytjjf8jnl47ns.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgz54ydtytjjf8jnl47ns.png" alt="Trivia-task-analysis-optimize" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://docs.camunda.io/optimize/components/userguide/process-analysis/task-analysis/" rel="noopener noreferrer"&gt;“&lt;/a&gt;&lt;a href="https://docs.camunda.io/optimize/components/userguide/process-analysis/task-analysis/" rel="noopener noreferrer"&gt;Task Analysis” tab&lt;/a&gt;, developers can explore heatmaps that highlight outliers, indicating process instances that deviate from the average, which helps identify potential issues or inefficiencies in the process. From there, the instance IDs and more details can help developers dive into issues about specific tasks or parts of the process. Using the task analysis can be helpful to ensure new versions of a process runs similarly, as well as tracking improvements between versions.Similarly, the &lt;a href="https://docs.camunda.io/optimize/components/userguide/process-analysis/branch-analysis/" rel="noopener noreferrer"&gt;“Branch Analysis” tab&lt;/a&gt; provides the probability of instances following a desired path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1b4mxzemsc0dc4pdvcr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1b4mxzemsc0dc4pdvcr.png" alt="Trivia-branch-analysis-optimize" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, in the trivia game, developers can analyze how many players who received hints were able to reach the winning path. These insights can guide further improvements and optimizations.&lt;/p&gt;

&lt;p&gt;Optimize also offers a &lt;a href="https://docs.camunda.io/optimize/components/userguide/additional-features/ml-dataset/" rel="noopener noreferrer"&gt;machine learning-ready data set&lt;/a&gt;, enabling developers to export and analyze their data using machine learning techniques. This means the data is already formatted and structured to align with machine learning algorithms to make predictions for future instances based on existing instances. The machine learning-ready data set simplifies the process of integrating Optimize with machine learning models and allows for &lt;a href="https://camunda.com/blog/2023/05/ai-powered-process-optimization-ml-ready-dataset/" rel="noopener noreferrer"&gt;more advanced analysis and predictions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s Review
&lt;/h2&gt;

&lt;p&gt;No matter what type of developer you are—whether you’re an enterprise professional, a startup enthusiast, an engineering manager, or just starting your coding journey—Optimize offers a diverse range of insights that cater to your specific needs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Efficient Issue Resolution&lt;/strong&gt; : By utilizing Optimize’s error and incident optimization features, developers can identify and address bottlenecks and issues efficiently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comprehensive Performance Views:&lt;/strong&gt;  Custom reports and dashboards provide a comprehensive view of the application’s performance and user interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In-Depth Analysis for Improvement&lt;/strong&gt; :  The in-depth analysis features enable developers to gain deeper insights into the data and identify areas for further improvement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Optimize empowers developers to improve their code, improve user experiences, and drive better business outcomes. For a visual exploration of these capabilities, don’t forget to check out our &lt;a href="https://www.youtube.com/watch?v=yQ2QThYdnvA" rel="noopener noreferrer"&gt;video overview&lt;/a&gt;. Feel free to engage in discussions and share your experiences in the Optimize forum category—it’s a great platform for further insights and community collaboration. For additional resources and detailed guides, explore the following links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://academy.camunda.com/" rel="noopener noreferrer"&gt;Camunda Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.camunda.io/optimize/components/what-is-optimize/?&amp;amp;utm_medium=social&amp;amp;utm_source=youtube&amp;amp;utm_content=video&amp;amp;utm_term=devrel-sam-optimize-devs" rel="noopener noreferrer"&gt;Optimize Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Presentation: &lt;a href="https://page.camunda.com/camundacon-2023-optimize-re-introduced" rel="noopener noreferrer"&gt;Optimize Re-Introduced – Why starting with Optimize was never that easy —  3 Use Cases you have to know&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Video: &lt;a href="https://www.youtube.com/watch?v=yQ2QThYdnvA" rel="noopener noreferrer"&gt;How Developers Can Make the Most of Camunda Optimize&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The post &lt;a href="https://camunda.com/blog/2024/02/insights-to-action-camunda-optimize-effective-development/" rel="noopener noreferrer"&gt;From Insights to Action: Harnessing Camunda Optimize for Effective Development&lt;/a&gt; appeared first on &lt;a href="https://camunda.com" rel="noopener noreferrer"&gt;Camunda&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gettingstarted</category>
      <category>camunda</category>
      <category>processorchestration</category>
      <category>processautomation</category>
    </item>
    <item>
      <title>Pro-code, Low-code, and the Role of Camunda</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Mon, 11 Dec 2023 14:15:33 +0000</pubDate>
      <link>https://forem.com/camunda/pro-code-low-code-and-the-role-of-camunda-2k2j</link>
      <guid>https://forem.com/camunda/pro-code-low-code-and-the-role-of-camunda-2k2j</guid>
      <description>&lt;h4&gt;
  
  
  Pro-code is our heart and soul, but people and processes are diverse. Our optional low-code features support more use cases without getting in the way of pro-code developers.
&lt;/h4&gt;

&lt;p&gt;Developers regularly ask me about Camunda’s product strategy. Especially around the Camunda 8 launch they raised concerns that we “forgot our roots” or “abandoned our developer-friendliness” — the exact attributes that developers love us for. They presume that we “jumped on the low-code train” instead, because we now have funding and need to “chase the big dollars.” As a developer at heart myself I can tell you that nothing is further from the truth, so let me explain our strategy in this post.&lt;/p&gt;

&lt;p&gt;Here is the &lt;strong&gt;TL/DR&lt;/strong&gt; : We will stay 100% developer-friendly and pro-code is our heart and soul (or bread and butter if you prefer). But people that create process solutions are diverse, as are the processes that need to be automated. So for some use cases low-code does make sense, and it is great to be able to support those cases. But low-code features in Camunda are optional and do not get in the way of pro-code developers.&lt;/p&gt;

&lt;p&gt;For example, your worker code can become a reusable &lt;a href="https://docs.camunda.io/docs/components/connectors/introduction-to-connectors/"&gt;&lt;strong&gt;Connector&lt;/strong&gt;&lt;/a&gt; (or be replaced by an out-of-the-box one) that is configured in the BPMN model using element templates. But you don’t have to use that and can just stay in your development environment to code your way forward. This flexibility allows you to use Camunda for a wide variety of use cases, which prevents business departments from being forced into shaky low-code solutions just because IT lacks resources.&lt;/p&gt;

&lt;p&gt;But step by step…&lt;/p&gt;

&lt;h3&gt;
  
  
  Camunda 8 loves developers
&lt;/h3&gt;

&lt;p&gt;First of all, Camunda 8 focuses on the developer experience in the same way — or even more strongly — than former Camunda versions. The whole point of providing Camunda as a product was to break out of unhandy huge BPM or low-code suites, that are simply impossible to use in professional software engineering projects (see &lt;a href="https://blog.bernd-ruecker.com/camunda-closes-100-million-series-b-funding-round-to-automate-any-process-anywhere-c82013bdaacf#8635"&gt;&lt;strong&gt;the Camunda story here&lt;/strong&gt;&lt;/a&gt; for example). This hasn’t changed. The heart of Camunda is around bringing process orchestration into the professional software developers toolbelt.&lt;/p&gt;

&lt;p&gt;Especially with Camunda 8, we put a lot of focus on providing an excellent developer experience and a great programming model. And we now also extend that beyond the Java ecosystem. We might still have to do some homework here and there (for example getting the Spring integration to a supported product component 2024) — but it is very close to what we always had. Let me give you some short examples (you can find &lt;a href="https://github.com/berndruecker/customer-onboarding-camunda-8-springboot"&gt;&lt;strong&gt;working code on GitHub&lt;/strong&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Writing worker code (aka Java Delegates):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/60c54cb9c45dec8d12b937ffa07a7b65/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/60c54cb9c45dec8d12b937ffa07a7b65/href"&gt;https://medium.com/media/60c54cb9c45dec8d12b937ffa07a7b65/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the Spring Boot Starter as Maven dependency:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/8b6f8d2cae1868bd4ae7778f3603127e/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/8b6f8d2cae1868bd4ae7778f3603127e/href"&gt;https://medium.com/media/8b6f8d2cae1868bd4ae7778f3603127e/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Writing a JUnit test case (with an in-memory engine):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/c1e5a8e01021edfd2b0e9c9585576971/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/c1e5a8e01021edfd2b0e9c9585576971/href"&gt;https://medium.com/media/c1e5a8e01021edfd2b0e9c9585576971/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only real change from Camunda version 7 to 8 is that the orchestration engine (or workflow engine if you prefer that term) runs as a separate Java process. So the above Spring Boot Starter actually starts a client that connects to the engine, not the whole engine itself. I wrote about why this is a huge advantage in &lt;a href="https://dev.to/camunda/moving-from-embedded-to-remote-workflow-engines-5f9h"&gt;&lt;strong&gt;moving from embedded to remote workflow engines&lt;/strong&gt;&lt;/a&gt;. Summarized, it is about isolating your code from the engine’s code and simplifying your overall solution project (think about optimizing the engine configuration or resolving third-party dependency version incompatibilities).&lt;/p&gt;

&lt;p&gt;The adjusted architecture without relational database allows us to continuously look at scalability and performance and make big leaps with Camunda 8, allowing use cases we could not tackle with Camunda 7 (e.g. multiple thousands of process instances per second, geo-redundant active/active datacenters, etc.).&lt;/p&gt;

&lt;p&gt;A common misconception is that you have to use our cloud/SaaS offering, but this is not true. You can &lt;a href="https://docs.camunda.io/docs/next/self-managed/about-self-managed/"&gt;&lt;strong&gt;run the engine self-managed as well&lt;/strong&gt;&lt;/a&gt; and there are different options to do that. The SaaS offering is an additional possibility you can leverage, freeing you from thinking about how to run and operate Camunda, but it is up to you if you want to make use of it.&lt;/p&gt;

&lt;p&gt;This is a general recurring theme in Camunda 8: We added more possibilities you can leverage to make your own life easier — but we do not force anyone to use them.&lt;/p&gt;

&lt;p&gt;The prime example of new possibilities are our low-code accelerators (e.g. &lt;a href="https://camunda.com/platform/modeler/connectors/"&gt;&lt;strong&gt;Connectors&lt;/strong&gt;&lt;/a&gt;). Let’s quickly dive into why we do low-code next before touching on how Connectors can help more concretely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Existing customers adopt Camunda for many use cases
&lt;/h3&gt;

&lt;p&gt;We learned from our customers that they want to use Camunda for a wide variety of use cases. Many of the use cases are core end-to-end business processes, like customer onboarding, order fulfillment, claim settlement, payment processing, trading, or the like.&lt;/p&gt;

&lt;p&gt;But customers also need to automate simpler processes. Those processes are less complex, less critical, and typically less valuable, but still those processes are there and automating them has a return on investment or is simply necessary to fulfill customer expectations. Good examples are around master data changes (e.g. address or bank account data), bank transfer limits, annual mileage reports for insurances, delay compensation, and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ud1dBwf8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/922/0%2AXymXq_jGVngKBkI0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ud1dBwf8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/922/0%2AXymXq_jGVngKBkI0.png" alt="" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the past, organizations often did not consider using Camunda for those processes, as they could not set up and staff software development projects for simpler, less critical processes.&lt;/p&gt;

&lt;p&gt;And the non-functional requirements for those simpler process automation solutions differ. While the super critical high complex use cases are always implemented with the help of the IT team, to make sure the quality meets the expectations for this kind of solution and everything runs smoothly, the use cases on the lower end of that spectrum don’t have to comply with the same requirements. If they are down, it might not be the end of the world. If they get hacked, it might not be headline news. If there are wired bugs, it might just be annoying. So it is probably OK to apply a different approach to create solutions for these less critical processes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Categorizing use cases
&lt;/h3&gt;

&lt;p&gt;The important thing is to make a conscious choice and not apply the wrong approach for the process at hand. What we have seen working successfully is to categorize use cases and place them into three buckets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red&lt;/strong&gt; : Processes are mission critical for the organization. They are also complex to automate and probably need to operate at scale. Performance and information security can be very relevant, and regulatory requirements might need to be fulfilled. Often we talk about core end-to-end business processes here, but sometimes also other processes might be that critical. For these use cases you need to do professional software engineering using industry best practices like version control, automated testing, continuous integration and continuous delivery. The organization wants to apply some governance, for example around which tools can be used and what best practices need to be applied.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yellow&lt;/strong&gt; : Processes are less critical, but still the organization’s operations would be seriously affected if there are problems. So you need to apply a healthy level of governance, but need to accept that solutions are not created in the same quality as for red use cases, mostly because you simply have a shortage of software developers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Green&lt;/strong&gt; : Simple automations, often being very local to one business unit or even an individual. These are often quick fixes stitched together to make one’s life a bit easier, but the overall organization might not even recognize if they break apart. For those uncritical use cases, the organization can afford leaving a lot of freedom to people, so typically there is no governance or quality assurance applied.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While the red use cases are traditionally done with Camunda, and the green use cases are traditionally done with Office-like tooling or low-code solutions (like Airtable or Zapier), the yellow bucket gets interesting. And this is a long tail of processes, that all needs to be automated with a fair level of governance, quality assurance and information security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QYEOD3qL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Abo2COBvqC4x5fz9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QYEOD3qL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Abo2COBvqC4x5fz9h.png" alt="" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We already know organizations using Camunda for those yellow use cases. In order to do this and to ease solution creation, they developed low-code tooling on top of Camunda. A prime example is &lt;a href="https://camunda.com/blog/2018/07/camunda-days-nyc-goldman-sachs-workflow-platform/"&gt;&lt;strong&gt;Goldman Sachs, who built a quite extensive platform based on Camunda 7&lt;/strong&gt;&lt;/a&gt; (side note: they also&lt;a href="https://camunda.com/blog/2022/03/why-goldman-sachs-built-a-brand-new-platform/"&gt;&lt;strong&gt;talk about a differentiation between core banking use cases and the long tail of simpler processes across the firm in later presentations&lt;/strong&gt;&lt;/a&gt;). Speaking to those customers we found a recurring theme and used this feedback to design product extensions that those organizations could have used off-the-shelf (if it would have been there when they started). And we designed this solution to not get in the way of professional software developers when implementing red use cases around critical core processes.&lt;/p&gt;

&lt;p&gt;I am not going into too much detail around all of those low code accelerators in this post, but it is mostly around &lt;a href="https://camunda.com/platform/modeler/connectors/"&gt;&lt;strong&gt;Connectors&lt;/strong&gt;&lt;/a&gt;, rich forms, data handling, the out-of-the-box experience of tools like Tasklist, and browser-based tooling.&lt;/p&gt;

&lt;p&gt;For me it is important to re-emphasize the pattern mentioned earlier: Those accelerators are an offer — you don’t have to use them. And if you look deeper, those accelerators are not mystic black boxes. A Connector, for example, is “just” a reusable &lt;a href="https://docs.camunda.io/docs/components/concepts/job-workers/"&gt;&lt;strong&gt;job worker&lt;/strong&gt;&lt;/a&gt; with a focused properties panel (if you are interested in code, check out any of our &lt;a href="https://github.com/camunda/connectors/tree/main/connectors"&gt;&lt;strong&gt;existing out-of-the-box Connectors&lt;/strong&gt;&lt;/a&gt;), whereas the property panel can even be &lt;a href="https://github.com/camunda/connectors/blob/main/connectors/http/rest/pom.xml#L86"&gt;&lt;strong&gt;generated from Java code&lt;/strong&gt;&lt;/a&gt;. &lt;a href="https://marketplace.camunda.com/"&gt;&lt;strong&gt;Camunda Marketplace&lt;/strong&gt;&lt;/a&gt; helps you to make this reusable piece of functionality discoverable. Existing Connectors are available in their source and can be extended if needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--atMI6_-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AwegtI1zLFS3BjXBK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--atMI6_-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AwegtI1zLFS3BjXBK.png" alt="" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Democratization and acceleration by Connectors
&lt;/h3&gt;

&lt;p&gt;There are two main motivations to use Connectors.&lt;/p&gt;

&lt;p&gt;Software developers might simply become more productive by using them, and this is what we call &lt;strong&gt;acceleration&lt;/strong&gt;. For example, it might simply be quicker to use a Twilio Connector instead of figuring out the REST API for sending an SMS and how it is best called from Java. As mentioned, if this is not true for you, e.g. because you have an internal library you simply use to hide the complexity of using Twilio, this is great, then you just keep using that. Also, when you want to write more JUnit tests, it might be simpler to write integration code in Java yourself. This is fine! You are not forced to use Connectors, it is an offer, and if it makes your life easier, use them.&lt;/p&gt;

&lt;p&gt;The other more important advantage is that it allows a more diverse set of people to take part in solution creation, which is referred to as &lt;strong&gt;democratization&lt;/strong&gt;. So for example, a tech-savvy business person could probably stitch together a simpler process using Connectors, even if they cannot write any programming code. Remember, we are talking about the long tail of simpler processes (yellow) here.&lt;/p&gt;

&lt;p&gt;A powerful pattern then is that software developers &lt;strong&gt;enable&lt;/strong&gt; other roles within the organization. One way of doing this can be to have a &lt;a href="https://dev.to/mary_grace/how-do-you-create-and-grow-a-center-of-excellence-4719-temp-slug-4306740"&gt;&lt;strong&gt;Center of Excellence&lt;/strong&gt;&lt;/a&gt; where custom Connectors are built specifically shaped around the needs of the organization. And those Connectors are then used by other roles to stitch together the processes. One big advantage is that your IT team has control over how Connectors are built and used, allowing them to enforce important governance rules, e.g. around information security or secret handling (something which is a huge problem with typical low code solutions).&lt;/p&gt;

&lt;p&gt;You could also mix different roles in one team creating a solution, and the developer can focus on the technical problems to set up Connectors properly, and more business-like people can concentrate on the process model. And of course there are many nuances in the middle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--djVADiWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AR97S7d25pSpbGKd_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--djVADiWA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AR97S7d25pSpbGKd_.png" alt="" width="800" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is comparable to a situation we know from software vendors embedding Camunda into their software for customization. Their software product then typically comes with a default process model and consultants can customize the processes to end-customer needs within certain limits the software team built-in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoiding the danger zone when doing vendor rationalization and tool harmonization
&lt;/h3&gt;

&lt;p&gt;Many organizations currently try to reduce the number of vendors and tools they are using. This is understandable on many levels, but it is very risky if the different non-functional requirements of green, yellow, and red processes are ignored.&lt;/p&gt;

&lt;p&gt;For example, procurement departments might not want to have multiple process automation tools. But for them, the difference between Camunda and a low-code vendor is not very tangible as they both automate processes.&lt;/p&gt;

&lt;p&gt;For red use cases, customers can still easily argue why they cannot use a low-code tool because those tools simply don’t fit into professional software development approaches. But for yellow use cases, this gets much more complicated to argue. This can lead to a situation where low-code tools, made for green use cases, are applied for yellow ones. This might work for very simple yellow processes, but can easily become risky if processes are getting too complex, or simply if requirements around stability, resilience, easing maintenance, scalability or information security rise over time. This is why I consider this a big danger zone for companies to be in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--siEBx48h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2A5rwLp4uJ6SWGvHXe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--siEBx48h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2A5rwLp4uJ6SWGvHXe.png" alt="" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Camunda’s low-code acceleration features allow you to use Camunda in more yellow use cases, as you don’t have to involve software developers for everything. But if non-functional requirements rise, you can always fulfill those with Camunda, as it is built for red use cases as well. Just as an example, you could start adding automated tests whenever the solution starts to be too shaky. Or you could scale operations, if you face an unexpected high demand (think of flight cancellations around the Covid pandemic — this was a yellow use case for airlines, but it became highly important to be able to process them efficiently basically overnight).&lt;/p&gt;

&lt;p&gt;To summarize: It’s better to target yellow use cases with a pro-code solution like Camunda with added low-code acceleration layers that you can use, but don’t have to. This prevents risky situations with low-code solutions that cannot cope with rising non-functional requirements.&lt;/p&gt;

&lt;p&gt;And to link back to our product strategy: With Camunda 8 we worked hard to allow even “redder” use cases (because of improved performance, scalability, and resilience), as well as more yellow use cases at the same time. So you can go further left (red) and right (yellow) at the same time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In today’s post I re-emphasized that Camunda is and will be developer-friendly. Pro-code (red) use cases are our bread and butter business, and honestly those are super exciting use cases where we can play to our strengths. This is strategically highly relevant, even if you might see a lot of marketing messaging around low-code accelerations at the moment.&lt;/p&gt;

&lt;p&gt;Those low-code accelerators allow building less complex solutions (yellow) too, where typically other roles take part in solution creation (democratization, acceleration, and enablement). This helps you to reduce the risk of using the wrong tool for yellow use cases ending up in headline news.&lt;/p&gt;

&lt;p&gt;You can read more about our &lt;a href="https://dev.to/mary_grace/camundas-vision-for-low-code-59c1-temp-slug-270223"&gt;&lt;strong&gt;vision for low-code here&lt;/strong&gt;&lt;/a&gt;, or if you’re curious about how our Connectors work, feel free to check out &lt;a href="https://docs.camunda.io/docs/components/connectors/introduction-to-connectors/"&gt;&lt;strong&gt;our docs to learn more&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>processautomation</category>
      <category>camunda</category>
      <category>workflow</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>Prioritizing Our DevRel Backlog with Form Builder, DMN, and a Process Model</title>
      <dc:creator>Mary Thengvall</dc:creator>
      <pubDate>Mon, 22 May 2023 19:32:16 +0000</pubDate>
      <link>https://forem.com/camunda/prioritizing-our-devrel-backlog-with-form-builder-dmn-and-a-process-model-42oj</link>
      <guid>https://forem.com/camunda/prioritizing-our-devrel-backlog-with-form-builder-dmn-and-a-process-model-42oj</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fite8djojb17cgel4x9lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fite8djojb17cgel4x9lb.png" alt="A process model that shows the beginning of a prioritization table" width="800" height="418"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Developer Relations teams typically have a wide variety of skills to meet community members where they are and help them get where they need to be. These skills can range from programming, creating content, and giving technical presentations, to mentoring community members on the best ways to use the product, running community programs, and communicating feedback to internal teams on ways to improve the product experience. But when the backlog grows faster than tasks can be completed, how do we prioritize the work that’s in front of us, ensuring we’re working on the most impactful items?&lt;/p&gt;

&lt;p&gt;I recently faced this predicament on my own team here at Camunda. I needed to not only help my team decide which projects to prioritize but also help our coworkers understand how (and why) we respond to new requests.&lt;/p&gt;

&lt;p&gt;While I could have written and published an internal strategy doc that listed our reasoning, information overload sets in quickly, and I’d rather not ask Camunda employees (Camundi) to read yet another page in our internal wiki every time they have a request. Instead, I turned to DMN and Camunda Platform 8’s new features to build a process model with an integrated form. While it’s not yet perfect, it’s already benefiting my team! How did I get here?&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Identify the criteria for prioritization
&lt;/h2&gt;

&lt;p&gt;I chose to start with a &lt;a href="https://docs.camunda.io/docs/guides/create-decision-tables-using-dmn/"&gt;DMN table&lt;/a&gt;, which would be the foundation of the model. Before I could build this table, however, I had to identify the criteria we would use to prioritize the DevRel team’s work. Many DevRel teams prioritize tasks based on impact on the developer community, alignment with the company’s goals, or level of effort.&lt;/p&gt;

&lt;p&gt;In our case, the assumption is that the work being submitted to this form is independent of the projects we’ve already taken on as a team for the quarter. This allowed me to keep our criteria simple: alignment with the team goals and the urgency of the task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QZUbtyHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/devrel-priorities-dmn-camunda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QZUbtyHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/devrel-priorities-dmn-camunda.png" alt="A DMN table showing how Timing and 2023 Goals feed into our DevRel Priorities" width="800" height="646"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create a decision table
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0_t0H_eF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/decision-table-camunda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0_t0H_eF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/decision-table-camunda.png" alt="Decision-table-camunda" width="398" height="752"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this criteria defined, it’s time to create the DMN table. These tables map the input values (timing and goals) to the output value (priority) based on a set of rules. A nice perk of building the prioritization rules into this table is that as our criteria change over time, I can update the table and the new rules will take effect immediately. Because the table is versioned, I can revert to a previous iteration at any time if necessary.&lt;/p&gt;

&lt;p&gt;The first thing I had to define was the input data which the decision table will use to process requests. In my case, I used the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input:&lt;/strong&gt; 2023 Goals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expression:&lt;/strong&gt; goals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type:&lt;/strong&gt; string&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predefined Values:&lt;/strong&gt; “healthy C8 community” “successful C8 community” “C8 community onboarding” “other”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: While filling in predefined values is optional, I found it helpful when populating the decision rules.&lt;/p&gt;

&lt;p&gt;I set the second input (Timing) with fairly general ranges: this week, month, or quarter, and next week, month, or quarter, as well as no specific timeframe.&lt;/p&gt;

&lt;p&gt;I kept the output value very straightforward: yes or no, with a possible exception that could be raised to me if necessary. Lastly, I’ve used the &lt;a href="https://docs.camunda.io/docs/components/best-practices/modeling/choosing-the-dmn-hit-policy/#single-result-decision-tables"&gt;hit policy “first”&lt;/a&gt; in order to evaluate the rules from top to bottom and stop when a match is found.&lt;/p&gt;

&lt;p&gt;The end result is a decision matrix that allows us to easily filter company requests that meet these specific goals and aren’t urgent (e.g. can be completed this month, next month, or next quarter). For anything that falls into the “this week” or “next week” timing, it’s likely going to be a no, unless it’s a very high-priority task that also aligns with our goals; in this case, the request is  flagged as a possible exception in need of review. The outcome is a fairly straightforward model that outlines when we can prioritize requests and when we’ll need to either reconsider them at a later time or simply say no.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JW9NwAkM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/decision-matrix-camunda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JW9NwAkM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/decision-matrix-camunda.png" alt="A decision matrix that shows our goals, timing possibilities, and whether we can help." width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create a form to populate the decision table
&lt;/h2&gt;

&lt;p&gt;I repurposed a simple Google form we’ve used for years, using the &lt;a href="https://docs.camunda.io/docs/guides/utilizing-forms/"&gt;Camunda Form Builder&lt;/a&gt; so I could integrate it with my decision table.&lt;/p&gt;

&lt;p&gt;Once the form was created, I made sure the &lt;em&gt;key&lt;/em&gt; for the questions around the goals and the timing matched up with the &lt;em&gt;expression&lt;/em&gt; in my DMN table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9z2qdKw9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/form-builder-camunda-combined-1-1024x839.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9z2qdKw9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/form-builder-camunda-combined-1-1024x839.jpg" alt="" width="800" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Integrate the form and decision table into a process model
&lt;/h2&gt;

&lt;h3&gt;
  
  
  An idea is submitted &amp;amp; evaluated
&lt;/h3&gt;

&lt;p&gt;The next step was to create a process model using &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/launch-cloud-modeler/"&gt;Web Modeler&lt;/a&gt;. This model represents the process of prioritizing tasks, including collecting the criteria via the form, applying the decision table to determine the priority of the task, and communicating the decision to the appropriate Camundi. Let’s take a look at the current model:&lt;/p&gt;

&lt;p&gt;The first section of the model includes the completion of the form, the DMN table which helps us prioritize the task, and an automated Slack message (using our &lt;a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/slack/"&gt;Slack Connector&lt;/a&gt;) that notifies the DevRel team a new request has been submitted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wd5x3Oc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/devrel-prioritization-process-model-camunda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wd5x3Oc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/devrel-prioritization-process-model-camunda.png" alt="Devrel-prioritization-process-model-camunda" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I connected the form to the model by copying the JSON from the code editor in the form builder and pasting it into the properties panel of the user task “Complete DevRel Request Form.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3l9RLYug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/form-builder-task-json.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3l9RLYug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/form-builder-task-json.png" alt="Form-builder-task-json" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1vYKBHQB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/user-task-json.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1vYKBHQB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/user-task-json.png" alt="User-task-json" width="719" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then added a Business Rule task and connected it to the DMN table I created by associating the following fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I copied the ID for the &lt;em&gt;Decision&lt;/em&gt; from the Decision Requirements Diagram (DRD) view and pasted it in the &lt;em&gt;Called Decision: Decision ID&lt;/em&gt; field for the Business Rule task.&lt;/li&gt;
&lt;li&gt;In the &lt;em&gt;Result Variable&lt;/em&gt; field, I pasted the output name from my DMN table (&lt;em&gt;abilityToHelp&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was important to me to minimize blockers (including myself) for these requests and better enable my team to take action, so I wanted to make sure the entire team would be alerted whenever someone filled out the form. Using the &lt;a href="https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/slack/"&gt;Slack Connector&lt;/a&gt;, I set up an alert to go directly to our team channel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HduWt_x0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/slack-connector-camunda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HduWt_x0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/slack-connector-camunda.png" alt="Slack-connector-camunda" width="708" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next iteration will include a link to the specific request, in addition to the results of the DMN table so it will be easy to see at a glance whether additional insight is needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  The decision is validated
&lt;/h3&gt;

&lt;p&gt;The next step in our process is to validate the decisions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--srhcSS0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/validate-decision.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--srhcSS0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/validate-decision.png" alt="Validate-decision" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two decision gateways here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do you need help making a decision?&lt;/strong&gt;  The DMN table will automatically determine this step, moving requests directly to &lt;em&gt;Look at automated decision&lt;/em&gt; if the answer is a clear &lt;em&gt;yes&lt;/em&gt; or &lt;em&gt;no.&lt;/em&gt; If the answer from the DMN table is &lt;em&gt;abilityToHelp = “possible exception,”&lt;/em&gt; it will be flagged and go the &lt;em&gt;Escalate to Manager&lt;/em&gt; route. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do you agree with the decision?&lt;/strong&gt; When I was first designing this process, our Community Manager Maria Alcantara made the excellent observation that there may be times when users disagree with the automated decision. If this is the case, requests should be escalated to the manager.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right now, looking at the automated decision as well as making the decision are user tasks that have to be managed within &lt;a href="https://docs.camunda.io/docs/components/tasklist/introduction-to-tasklist/"&gt;Tasklist&lt;/a&gt;. If users need to escalate to manager in either case, they can type in a variable &lt;em&gt;agree = false&lt;/em&gt; for the first question and &lt;em&gt;doThing = false&lt;/em&gt; for the second. In the next iteration of this model, I’d like to have a Slack integration that allows us to say yes or no to both of these questions in order to move forward seamlessly.&lt;/p&gt;

&lt;p&gt;The end result of all these decisions is that we have a clear path forward: we’re either going to tackle this project or not.&lt;/p&gt;

&lt;h3&gt;
  
  
  The outcome is communicated
&lt;/h3&gt;

&lt;p&gt;Feedback loops are important to us at Camunda, so I wanted to make sure no matter what the decision was, there was a follow-up with the person who requested help.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hIu0vE03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/communicate-outcome.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hIu0vE03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2023/05/communicate-outcome.png" alt="Communicate-outcome" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rather than listing every Camundi in the Requester DMN table, I chose to include variants of our team members’ names: first name and first + last name, in lowercase as well as camelcase, since DMN tables are case sensitive. The output is &lt;em&gt;groupCamundi&lt;/em&gt; with either the value of &lt;em&gt;devrelTeam&lt;/em&gt; or_ colleague._&lt;/p&gt;

&lt;p&gt;These final tasks are all user tasks, but again, there are opportunities to include automation here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Trello card in our task board based on the form.&lt;/li&gt;
&lt;li&gt;Send a refusal message to the individual who submitted the request.&lt;/li&gt;
&lt;li&gt;Notify the requester when the task is moved to the &lt;code&gt;done&lt;/code&gt; column in our task board.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We could likely even turn the form into a Slack bot that then pings the appropriate team member. In short, there are all sorts of possible iterations here, which we’ll definitely explore as we roll this out company-wide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Be more productive
&lt;/h2&gt;

&lt;p&gt;I have high hopes that this process model will continue to help us prioritize our work more effectively, ensuring we focus our efforts on the tasks that will have the greatest impact on our community members as well as Camunda company goals. Additionally, by streamlining the prioritization process, we are able to complete tasks more quickly and efficiently, improving our overall productivity.&lt;/p&gt;

&lt;p&gt;While this prioritization of tasks might seem like a relatively small and perhaps insignificant issue compared to the other items on our plate, this DMN table, form, and process model will serve as the foundation for future team endeavors and resource-planning. Here’s to solving “mole hills” before they turn into mountains!&lt;/p&gt;

&lt;p&gt;What have you created with Camunda lately? Let us know over &lt;a href="https://forum.camunda.io/c/contributions/14"&gt;in our forum&lt;/a&gt;. I’d love to hear how process models have made your day-to-day work easier!&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://camunda.com/blog/2023/05/prioritizing-devrel-backlog-form-builder-dmn-process-model/"&gt;Prioritizing Our DevRel Backlog with Form Builder, DMN, and a Process Model&lt;/a&gt; appeared first on &lt;a href="https://camunda.com"&gt;Camunda&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devrel</category>
      <category>camunda</category>
      <category>bpmn</category>
      <category>automation</category>
    </item>
    <item>
      <title>Zeebe, or How I learned To Stop Worrying And Love Batching</title>
      <dc:creator>Christopher Kujawa</dc:creator>
      <pubDate>Sat, 04 Mar 2023 09:44:55 +0000</pubDate>
      <link>https://forem.com/camunda/zeebe-or-how-i-learned-to-stop-worrying-and-love-batching-4l8p</link>
      <guid>https://forem.com/camunda/zeebe-or-how-i-learned-to-stop-worrying-and-love-batching-4l8p</guid>
      <description>&lt;h3&gt;
  
  
  Zeebe, or How I learned To Stop Worrying And Love Batch Processing
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Hi, I’m Chris, Senior Software Engineer at Camunda. I have worked now for around seven years at Camunda and on the Zeebe project for almost six years, and was recently part of a hackday effort to improve Zeebe’s process execution latency&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the past, we have heard several reports from users where they have described that the process execution latency of &lt;a href="https://camunda.com/platform/zeebe/" rel="noopener noreferrer"&gt;Zeebe&lt;/a&gt;, our cloud-native workflow decision engine for &lt;a href="https://camunda.com/platform/" rel="noopener noreferrer"&gt;Camunda Platform 8&lt;/a&gt;, is sometimes sub-optimal. Some of the reports raised that the latency between certain tasks in a process model is too high, others that the general process instance execution latency is too high. This of course can also be highly affected by the used hardware and wrong configurations for certain use cases, but we also know we have something to improve.&lt;/p&gt;

&lt;p&gt;At the beginning of this year and after almost three years of COVID-19, we finally sat together in a meeting room with whiteboards to improve the situation for our users. We called that performance hackdays. It was a nice, interesting, and fruitful experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basics
&lt;/h3&gt;

&lt;p&gt;To dive deeper into what we tried and why, we first need to elaborate on what process instance execution latency means, and what influences it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F903%2F0%2AWelxptAuI7RWHgMw" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F903%2F0%2AWelxptAuI7RWHgMw" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The image above is a &lt;a href="https://docs.camunda.io/docs/next/components/concepts/processes/" rel="noopener noreferrer"&gt;process model&lt;/a&gt;, from which we can create an instance. The execution of such an instance will go from the start to the end event; this is the process execution latency.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Since Zeebe is a complex distributed system, where the process engine is based on a distributed streaming platform, there are several influencing factors for the process execution latency. During our performance hackdays, we tried to sum up all potential factors and find several bottlenecks which we can improve. In the following post, I will try to summarize this on a high level and mention them shortly.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Stream processing
&lt;/h4&gt;

&lt;p&gt;To execute such a process model, as we have seen above, Zeebe uses a concept called &lt;a href="https://docs.camunda.io/docs/next/components/zeebe/technical-concepts/internal-processing/#stateful-stream-processing" rel="noopener noreferrer"&gt;stream processing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Each element in the process &lt;a href="https://docs.camunda.io/docs/next/components/zeebe/technical-concepts/internal-processing/#state-machines" rel="noopener noreferrer"&gt;has a specific lifecycle&lt;/a&gt;, which is divided into the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F402%2F0%2AKAV3RA8qCxr3lLtK" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F402%2F0%2AKAV3RA8qCxr3lLtK" alt="BPMN Elements Lifecycle" width="402" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;BPMN Elements Lifecycle divided into Command/Events&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;One command asks to change the state of a certain element and an event that confirms the state change. Termination can happen when elements are canceled either internally by events or outside by users.&lt;/p&gt;

&lt;p&gt;Commands drive the execution of a process instance. When Zeebe’s stream processor processes a command, state changes are applied (e.g. process instances are modified). Such modifications are confirmed via follow-up events. To split the execution into smaller pieces, not only are follow-up events produced, but also follow-up commands. All of these follow-up records are persisted. Later, the follow-up commands are further processed by the stream processor to continue the instance execution. The idea behind that is that these small chunks of processing should help to achieve high concurrency by alternating execution of different instances on the same partition.&lt;/p&gt;

&lt;h4&gt;
  
  
  Persistence
&lt;/h4&gt;

&lt;p&gt;Before a new command on a partition can be processed, it must be replicated to a quorum (typically majority) of nodes. This procedure is called commit. Committing ensures a record is durable, even in case of complete data loss on an individual broker. The exact semantics of &lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/clustering/#commit" rel="noopener noreferrer"&gt;committing&lt;/a&gt; are defined by the &lt;a href="https://raft.github.io/" rel="noopener noreferrer"&gt;raft protocol&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AYJh5jPKwTFXkQL8b" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AYJh5jPKwTFXkQL8b" alt="CommitDocs" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Source: https://docs.camunda.io/docs/components/zeebe/technical-concepts/clustering/#commit&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;Committing of such records can be affected by network latency, for sending the records over the wire. But also by disk latency since we need to persist the records on disk on a quorum of nodes before we can mark the records as committed.&lt;/p&gt;

&lt;h4&gt;
  
  
  State
&lt;/h4&gt;

&lt;p&gt;Zeebe’s state is stored in &lt;a href="https://rocksdb.org/" rel="noopener noreferrer"&gt;RocksDB&lt;/a&gt;, which is a key-value store. RocksDB persists data on disk with a &lt;a href="https://en.wikipedia.org/wiki/Log-structured_merge-tree" rel="noopener noreferrer"&gt;log-structured merge tree&lt;/a&gt; (LSM Tree) and is made for fast storage environments.&lt;/p&gt;

&lt;p&gt;The state contains information about deployed process models and current process instance executions. It is separated per partition, which means a RocksDB instance exists per partition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance hackdays
&lt;/h3&gt;

&lt;p&gt;When we started with the performance hackdays, we already had necessary infrastructure to run benchmarks for our improvements. We made heavy use of the &lt;a href="https://github.com/camunda-community-hub/camunda-8-benchmark" rel="noopener noreferrer"&gt;Camunda Platform 8 benchmark toolkit&lt;/a&gt; maintained by &lt;a href="https://github.com/falko" rel="noopener noreferrer"&gt;Falko Menge&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Furthermore, we run weekly benchmarks (the so-called medic benchmark) where we test for throughput, latency, and general stability. Benchmarks are run for four weeks to detect potential bugs, regressions, memory leaks, performance regressions, and more as early as possible. This, all the infrastructure around it (like &lt;a href="https://github.com/camunda/zeebe/tree/main/monitor" rel="noopener noreferrer"&gt;Grafana dashboards&lt;/a&gt;,) and knowledge about how our system performs were invaluable to make such great progress during our hackdays.&lt;/p&gt;

&lt;h4&gt;
  
  
  Measurement
&lt;/h4&gt;

&lt;p&gt;We measured our results continuously, and this is necessary to see if you are on the right track. For every small proof of concept (POC), we ran a new benchmark:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AyYeZs1hXlB_CPNbf" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AyYeZs1hXlB_CPNbf" alt="Screenshot of benchmarks over the week" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Screenshot of benchmarks over the week&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;In our benchmark, we used a process based on some user requirements:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AByPWm21YnUTKM4ol" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AByPWm21YnUTKM4ol" alt="Benchmark Process" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Benchmark Process&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;Our target was a throughput of around 500 process instances per second (PI/s) with a process execution latency goal for one process instance under one second for the 99th percentile (p99). P99, meaning 99% of all process instance executions should be executed in under one second.&lt;/p&gt;

&lt;p&gt;The benchmarks have been executed in the Google Kubernetes Engine. For each broker node, we assigned one &lt;a href="https://cloud.google.com/compute/docs/general-purpose-machines" rel="noopener noreferrer"&gt;&lt;strong&gt;n2-standard-8&lt;/strong&gt;&lt;/a&gt; node to reduce the influence of other pods running on the same node.&lt;/p&gt;

&lt;p&gt;Each broker pod had the following configuration:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkat9kpcuvxj72ow4nd2e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkat9kpcuvxj72ow4nd2e.png" alt="Benchmark Config" width="264" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Benchmark configuration&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;There were also some other configurations we played around with during our different experiments, but the above were the general ones. We had eight brokers running, which gives us the following partition distribution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ./partitionDistribution.sh 8 24 4
Distribution:
P\N| N 0| N 1| N 2| N 3| N 4| N 5| N 6| N 7
P 0| L | F | F | F | - | - | - | -  
P 1| - | L | F | F | F | - | - | -  
P 2| - | - | L | F | F | F | - | -  
P 3| - | - | - | L | F | F | F | -  
P 4| - | - | - | - | L | F | F | F  
P 5| F | - | - | - | - | L | F | F  
P 6| F | F | - | - | - | - | L | F  
P 7| F | F | F | - | - | - | - | L  
P 8| L | F | F | F | - | - | - | -  
P 9| - | L | F | F | F | - | - | -  
P 10| - | - | L | F | F | F | - | -  
P 11| - | - | - | L | F | F | F | -  
P 12| - | - | - | - | L | F | F | F  
P 13| F | - | - | - | - | L | F | F  
P 14| F | F | - | - | - | - | L | F  
P 15| F | F | F | - | - | - | - | L  
P 16| L | F | F | F | - | - | - | -  
P 17| - | L | F | F | F | - | - | -  
P 18| - | - | L | F | F | F | - | -  
P 19| - | - | - | L | F | F | F | -  
P 20| - | - | - | - | L | F | F | F  
P 21| F | - | - | - | - | L | F | F  
P 22| F | F | - | - | - | - | L | F  
P 23| F | F | F | - | - | - | - | L
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each broker node had 12 partitions assigned. We used a replication factor of four because we wanted to mimic the &lt;a href="https://camunda.com/blog/2022/06/how-to-achieve-geo-redundancy-with-zeebe/" rel="noopener noreferrer"&gt;geo redundancy&lt;/a&gt; for some of our users, which had certain process execution latency requirements. The geo redundancy introduces network latency into the system by default. We wanted to reduce the influence of such network latency to the process execution latency. To make it a bit more realistic, we used &lt;a href="https://chaos-mesh.org/" rel="noopener noreferrer"&gt;Chaos Mesh&lt;/a&gt; to introduce a network latency of 35ms between two brokers, resulting in a round-trip time (RTT) of 70ms.&lt;/p&gt;

&lt;p&gt;To run with an evenly distributed partition leadership, we used the &lt;a href="https://docs.camunda.io/docs/next/self-managed/zeebe-deployment/operations/rebalancing/" rel="noopener noreferrer"&gt;partitioning rebalancing API&lt;/a&gt;, which Zeebe provides.&lt;/p&gt;

&lt;h4&gt;
  
  
  Theory
&lt;/h4&gt;

&lt;p&gt;Based on the benchmark process model above, we considered the impact of commands and events on the process model (and also in general).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AH9mAOR1ftRGIQHFZ" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AH9mAOR1ftRGIQHFZ" alt="WhiteboardSession" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Whiteboard session: Drawing commands/events&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;We calculated around 30 commands are necessary to execute the process instance from start to end.&lt;/p&gt;

&lt;p&gt;We tried to summarize what affects the processing latency and came to the following formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PEL = X * Commit Latency + Y * Processing Latency + OH
PEL - Process Execution Latency
OH - Overhead, which we haven't considered (e.g. Jobs * Job Completion Latency)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we started, &lt;strong&gt;X&lt;/strong&gt; and &lt;strong&gt;Y&lt;/strong&gt; were equal, but the idea was to change factors. This is why we split them up. The other latencies were based on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Commit Latency = Network Latency + Append Latency
Network Latency = 2 * request duration
Append Latency = Write to Disk + Flush
Processing Latency = Processing Command (apply state changes) 
                   + Commit Transaction (RocksDB) 
                   + execute side effects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Below is a picture of our whiteboard session, where we discussed potential influences and what potential solution could mitigate which factor:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfgk9w5j65ihzxkzskcf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyfgk9w5j65ihzxkzskcf.png" alt="DiscussionInfluenceFactors" width="800" height="934"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;sup&gt;Whiteboard session: Discussion potential factors and influences&lt;/sup&gt;&lt;/center&gt;

&lt;h3&gt;
  
  
  Proof of concepts
&lt;/h3&gt;

&lt;p&gt;Based on the formula, it was a bit more clear to us what might affect the process execution latency and where it might make sense to change or reduce time. For example, reducing the append latency affects commit latency and will affect process execution latency. Additionally, reducing the factor of how often commit latency is applied will highly affect the result.&lt;/p&gt;

&lt;h4&gt;
  
  
  Append and commit latency
&lt;/h4&gt;

&lt;p&gt;Before we started with the performance hackdays, there was one configuration already present which we built &lt;a href="https://github.com/camunda/zeebe/pull/5576" rel="noopener noreferrer"&gt;more than two years ago&lt;/a&gt;and made available via an experimental feature: &lt;a href="https://github.com/camunda/zeebe/blob/8.1.0/broker/src/main/java/io/camunda/zeebe/broker/system/configuration/ExperimentalCfg.java#L26" rel="noopener noreferrer"&gt;the disabling of the raft flush&lt;/a&gt;. We have seen several users applying it to reach certain performance targets, but it comes with a cost. It is not safe to use it, since on fail-over certain guarantees of raft no longer apply.&lt;/p&gt;

&lt;p&gt;As part of the hackdays we were interested in a similar performance, but with more safety. This is the reason why we tried several different other possibilities but also compared that with disabling the flush completely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flush improvement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In one of our POC’s, we tried to flush on another thread. This gave a similar performance as with completely disabling it, but it also has similar safety issues. Combining the async flush with awaiting the completion before committing brought back the old performance (base) and the safety. This was no solution.&lt;/p&gt;

&lt;p&gt;Implementing a batch flush (flush only after a configured threshold,) having this in a separate thread, and waiting for the completion degraded the performance. However, we again had better safety than with disabling flush.&lt;/p&gt;

&lt;p&gt;We thought about flushing async in a batch, without waiting for commit and making this configurable. This would allow users to trade safety versus performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write improvement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We had a deeper look into system calls such as &lt;a href="https://man7.org/linux/man-pages/man2/madvise.2.html" rel="noopener noreferrer"&gt;madvise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Zeebe stores its log in a segmented journal which is memory mapped at runtime. The OS manages what is in memory at any time via the page cache, but does not know the application itself. The &lt;strong&gt;madvise&lt;/strong&gt; system call allows us to provide hints to the OS on when to read/write/evict pages.&lt;/p&gt;

&lt;p&gt;The idea was to provide hints to reduce memory churn/page faults and reduce I/O&lt;/p&gt;

&lt;p&gt;We tested with &lt;strong&gt;MADV_SEQUENTIAL&lt;/strong&gt; , hinting that we will access the file sequentially and a more aggressive read-ahead should be performed (while previous pages can be dropped sooner).&lt;/p&gt;

&lt;p&gt;Based on our benchmarks, we hadn’t seen much difference under low/mid load. However, read IO was greatly reduced under high load. We have seen slightly increased write I/O throughput under high load due to reduced IOPS contention. In general, there was a small improvement only in throughput/latency. Surprisingly, still it showed similar page faults as before.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reduce transaction commits
&lt;/h4&gt;

&lt;p&gt;Based on our formula above, we can see that the processing latency is affected by the RocksDB write and transaction commit duration. This means reducing one of these could benefit the processing latency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State directory separation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zeebe stores the current state (runtime) and snapshots on different folders on disk (under the same parent). When a Zeebe broker restarts, we recreate the state (runtime) every time from a snapshot. This is to avoid having data in the state which might not have been committed yet.&lt;/p&gt;

&lt;p&gt;This means we don’t necessarily need to keep the state (runtime) on disk, and RocksDB does a lot of IO-heavy work which might not be necessary. The idea was to separate the state directory in a way that it can be separately mounted (in Kubernetes) such that we can run RocksDB in &lt;a href="https://www.kernel.org/doc/html/v5.18/filesystems/tmpfs.html" rel="noopener noreferrer"&gt;tmpfs&lt;/a&gt;, for example.&lt;/p&gt;

&lt;p&gt;Based on our benchmarks, only p30 and lower have been improved with this POC:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AeXdsseoUCYkzRRWK" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AeXdsseoUCYkzRRWK" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disable WAL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RocksDB has a write-ahead log to be crash resistant. This is not necessary for us to recreate the state every time. We considered disabling it, we will see later in this post what influence it has. It is a &lt;a href="https://github.com/camunda/zeebe/blob/8.1.0/dist/src/main/config/broker.standalone.yaml.template#L757" rel="noopener noreferrer"&gt;single configuration&lt;/a&gt;, which is easy to change.&lt;/p&gt;

&lt;h4&gt;
  
  
  Processing of uncommitted
&lt;/h4&gt;

&lt;p&gt;We mentioned earlier that we have thought about changing the factor of how many commits influence the overall calculation. What if we process commands already, even if they are not committed yet, and only send results to the user if the commit of the commands is done?&lt;/p&gt;

&lt;p&gt;We worked on a POC to implement uncommitted processing, but it was a bit more complex than we thought due to the buffering of requests, etc. This is why we didn’t find a good solution during our hackdays. We still ran a benchmark to verify how it would behave:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AqO7KyPxNx_tDjkAc" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AqO7KyPxNx_tDjkAc" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The results were quite interesting and promising, but we considered them a bit too good. The production ready implementation might be different, since we have to consider more edge-cases.&lt;/p&gt;

&lt;h4&gt;
  
  
  Batch processing
&lt;/h4&gt;

&lt;p&gt;Part of another POC we did was something we called &lt;strong&gt;batch processing.&lt;/strong&gt; The implementation was rather easy.&lt;/p&gt;

&lt;p&gt;The idea was to process the follow-up commands directly and continue the execution of an instance until no more follow-up commands are produced. This normally means we have reached a wait state, like a service task. Camunda Platform 7 users will know this behavior, &lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/transactions-in-processes/#wait-states" rel="noopener noreferrer"&gt;as this is the Camunda Platform 7 default&lt;/a&gt;. The result was promising as well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AROVY8b46DvI3MhZZ" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AROVY8b46DvI3MhZZ" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our example process model above, this would reduce the factor of commit latencies from ~30 commands to 15, which is significant. The best IO you can do, however, is no IO.&lt;/p&gt;

&lt;h4&gt;
  
  
  Combining the POCs
&lt;/h4&gt;

&lt;p&gt;By combining several POCs, we reached our target line which showed us that it is possible and gave us some good insights on where to invest in order to improve our system further in the future.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AxzdFc_SWUJEtcm6w" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AxzdFc_SWUJEtcm6w" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The improvements did not just improve overall latency of the system. In our weekly benchmarks we had to increase the load because the system was able to reach higher throughput. Before we reached ~133 (on avg) process instances per second (PI/s) over three partitions, now 163 PI/s (on avg) while also reducing the latency by a factor of 2.&lt;/p&gt;

&lt;h3&gt;
  
  
  Next
&lt;/h3&gt;

&lt;p&gt;In the last weeks, we took several ideas from the hackdays to implement some production-ready solutions for Zeebe 8.2. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11455" rel="noopener noreferrer"&gt;Disabling WAL per default&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11416" rel="noopener noreferrer"&gt;Implement batch processing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11423" rel="noopener noreferrer"&gt;Make disabling raft flush more safe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11494" rel="noopener noreferrer"&gt;Direct message correlation on the same partition&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We plan to work on some more like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/6044" rel="noopener noreferrer"&gt;Make state directory configurable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11377" rel="noopener noreferrer"&gt;Advise OS on mmap usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/issues/11488" rel="noopener noreferrer"&gt;Configurable raft flush interval&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;You can expect some better performance with the 8.2 release; I’m really looking forward to April! :)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks to all participants of the hackdays for the great and fun collaboration, and to our manager (&lt;a href="https://github.com/megglos" rel="noopener noreferrer"&gt;Sebastian Bathke&lt;/a&gt;) who made this possible. It was a really nice experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Participants (alphabetically sorted):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Zelldon" rel="noopener noreferrer"&gt;Christopher Zell (myself)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deepthidevaki" rel="noopener noreferrer"&gt;Deepthi Devaki Akkoorath&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/falko" rel="noopener noreferrer"&gt;Falko Menge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/npepinpe" rel="noopener noreferrer"&gt;Nicolas Pepin-Perreault&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/oleschoenburg" rel="noopener noreferrer"&gt;Ole Schönburg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/romansmirnov" rel="noopener noreferrer"&gt;Roman Smirnov&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/megglos" rel="noopener noreferrer"&gt;Sebastian Bathke&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Thanks to all the reviewers of this blog post:&lt;/em&gt; &lt;a href="https://github.com/cmausley" rel="noopener noreferrer"&gt;&lt;em&gt;Christina Ausley&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://github.com/deepthidevaki" rel="noopener noreferrer"&gt;&lt;em&gt;Deepthi Devaki Akkoorath&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://github.com/npepinpe" rel="noopener noreferrer"&gt;&lt;em&gt;Nicolas Pepin-Perreault&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://github.com/oleschoenburg" rel="noopener noreferrer"&gt;&lt;em&gt;Ole Schönburg&lt;/em&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; &lt;a href="https://github.com/saig0" rel="noopener noreferrer"&gt;&lt;em&gt;Philipp Ossler&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href="https://github.com/megglos" rel="noopener noreferrer"&gt;&lt;em&gt;Sebastian Bathke&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>benchmark</category>
      <category>camunda</category>
      <category>zeebe</category>
      <category>performance</category>
    </item>
    <item>
      <title>Camunda's Hacktoberfest 2022</title>
      <dc:creator>Mia Moore</dc:creator>
      <pubDate>Tue, 04 Oct 2022 10:47:21 +0000</pubDate>
      <link>https://forem.com/camunda/camunda-1jdd</link>
      <guid>https://forem.com/camunda/camunda-1jdd</guid>
      <description>&lt;p&gt;Happy Hacktoberfest, everyone!&lt;/p&gt;

&lt;p&gt;We are so excited to be participating in Hacktoberfest for the third time this year. At &lt;a href="http://www.camunda.com"&gt;Camunda&lt;/a&gt;, we believe that open source can help unlock the full potential of process automation. We’re passionate about automating processes, creating easy-to-use products, and collaborating with our community members.&lt;/p&gt;

&lt;p&gt;For every &lt;a href="https://camunda.com/hacktoberfest2022/"&gt;Camunda challenge completion&lt;/a&gt;, we will make a donation to One Tree Planted which plants trees across the globe focusing on areas in need of habitat rehabilitation. &lt;/p&gt;

&lt;p&gt;If you complete the challenge you will also have the option of choosing to receive the limited edition Camunda x Hacktoberfest 2022 t-shirt. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc89hx7ocousozezrrl6v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc89hx7ocousozezrrl6v.jpg" alt="Camunda x Hacktoberfest 2022 t-shirt" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: Documentation improvements are always welcome!&lt;/p&gt;

&lt;p&gt;Get the whole lowdown at our blog post here - &lt;a href="https://camunda.com/hacktoberfest2022/"&gt;Hacktoberfest 2022 at Camunda&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Or review the following repos for Hacktoberfest issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/orgs/bpmn-io/repositories?q=hacktoberfest&amp;amp;type=all&amp;amp;language=&amp;amp;sort="&gt;BPMN.io&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/camunda/zeebe/labels/hacktoberfest"&gt;Zeebe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/orgs/camunda-community-hub/repositories?q=hacktoberfest&amp;amp;type=all&amp;amp;language=&amp;amp;sort="&gt;Participating Camunda Community Hub projects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy hacking!&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>java</category>
    </item>
    <item>
      <title>Zbchaos — A new fault injection tool for Zeebe</title>
      <dc:creator>Christopher Kujawa</dc:creator>
      <pubDate>Thu, 15 Sep 2022 12:16:14 +0000</pubDate>
      <link>https://forem.com/camunda/zbchaos-a-new-fault-injection-tool-for-zeebe-4cin</link>
      <guid>https://forem.com/camunda/zbchaos-a-new-fault-injection-tool-for-zeebe-4cin</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ACqGpxPfdlWhgIHm9" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ACqGpxPfdlWhgIHm9" alt="Photo by [Brett Jordan](https://unsplash.com/@brett_jordan?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText) on[ Unsplash](https://unsplash.com/s/photos/chaos?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText)" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;center&gt;&lt;sup&gt;&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@brett_jordan?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Brett Jordan&lt;/a&gt; on&lt;a href="https://unsplash.com/s/photos/chaos?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt; Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;During Summer Hackdays 2022, I worked on a project called “Zeebe chaos” (&lt;strong&gt;zbchaos&lt;/strong&gt;), a fault injection CLI tool. This allows us engineers to more easily run chaos experiments against Zeebe, build up confidence in the system’s capabilities, and discover potential weaknesses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To understand this blog post, it is useful to have a certain understanding of &lt;a href="https://kubernetes.io/docs/concepts/overview/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt; and &lt;a href="https://camunda.com/platform/zeebe/" rel="noopener noreferrer"&gt;Zeebe&lt;/a&gt; itself.&lt;/p&gt;
&lt;h2&gt;
  
  
  Summer Hackdays:
&lt;/h2&gt;

&lt;p&gt;Hackdays are a regular event at Camunda, where people from different departments (engineering, consulting, DevRel, etc.) work together on new ideas, pet projects, and more.&lt;/p&gt;

&lt;p&gt;Often, the results are quite impressive and are also presented in the following CamundaCon. For example, check out the agenda of this year’s &lt;a href="https://www.camundacon.com/agenda-day-2/" rel="noopener noreferrer"&gt;CamundaCon 2022&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Check out previous Summer Hackdays here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://camunda.com/blog/2020/09/highlights-from-the-summer-hackdays-2020/" rel="noopener noreferrer"&gt;Summer Hackdays 2020&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=YCG9yHry1ks&amp;amp;ab_channel=Camunda" rel="noopener noreferrer"&gt;Summer Hackdays 2019&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Zeebe chaos CLI
&lt;/h2&gt;

&lt;p&gt;Working on the &lt;a href="https://docs.camunda.io/docs/components/zeebe/zeebe-overview/" rel="noopener noreferrer"&gt;Zeebe project&lt;/a&gt; is not only about engineering a distributed system or a process engine, it is also about testing, benchmarking, and experimenting with our capabilities.&lt;/p&gt;

&lt;p&gt;We run regular chaos experiments against Zeebe to build up confidence in our system and to determine whether we have weaknesses in certain areas. In the past, we have written &lt;a href="https://github.com/zeebe-io/zeebe-chaos/tree/main/chaos-workers/chaos-experiments/scripts" rel="noopener noreferrer"&gt;many bash scripts&lt;/a&gt; to inject faults (chaos). We wanted to replace them with better tooling: a new CLI. This allows us to make it more maintainable, but also lowers the barrier for others to experiment with the system.&lt;/p&gt;

&lt;p&gt;The CLI targets Kubernetes, as this is our recommended environment for Camunda Platform 8 Self-Managed, and the environment our own SaaS offering runs on.&lt;/p&gt;

&lt;p&gt;The tool builds upon our existing &lt;a href="https://helm.camunda.io/" rel="noopener noreferrer"&gt;Helm charts&lt;/a&gt;, which are normally used to deploy Zeebe within Kubernetes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;p&gt;To use the CLI you need to have access to a Kubernetes cluster, and have our Camunda Platform 8 Helm charts deployed. &lt;a href="https://docs.camunda.io/docs/self-managed/platform-deployment/kubernetes-helm/#installing-the-camunda-helm-chart-in-a-cloud-environment" rel="noopener noreferrer"&gt;Additionally, feel free to try out Camunda Platform 8 Self-Managed&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Chaos Engineering:
&lt;/h2&gt;

&lt;p&gt;You might be wondering why we need this fault injection CLI tool or what this “chaos” stands for. It comes from chaos engineering, a practice we introduced back in 2019 to the Zeebe Project.&lt;/p&gt;

&lt;p&gt;Chaos Engineering was defined by the &lt;a href="https://principlesofchaos.org/" rel="noopener noreferrer"&gt;Principles of Chaos&lt;/a&gt;. It should help to build confidence in the system's capabilities and find potential weaknesses through regular chaos experiments. We define and execute such experiments regularly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://page.camunda.com/cclive-zell-chaosengineeringmeetszeebe" rel="noopener noreferrer"&gt;Take a look at my talk at CamundaCon 2020.2 to get to know more about Chaos Engineering at Camunda (and Zeebe)&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Chaos experiments
&lt;/h3&gt;

&lt;p&gt;As mentioned, we regularly write and run new chaos experiments to build up confidence in our system and undercover weaknesses. The first thing you have to do for your chaos experiment is to define a hypothesis that you want to prove. For example, processing should still be possible after a node goes down. Based on the hypothesis, you know what kind of property or steady state you want to verify before and after injecting faults into the system.&lt;/p&gt;

&lt;p&gt;A chaos experiment consists of three phases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verify the steady state.&lt;/li&gt;
&lt;li&gt;Inject chaos.&lt;/li&gt;
&lt;li&gt;Verify the steady state.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each of these phases, the &lt;strong&gt;zbchaos&lt;/strong&gt; CLI provides certain features outlined below.&lt;/p&gt;
&lt;h4&gt;
  
  
  Verify steady state
&lt;/h4&gt;

&lt;p&gt;In the steady state phase, we want to verify certain properties of the system, like invariants, etc.&lt;/p&gt;

&lt;p&gt;One of the first things we typically want to check is the Zeebe topology. With &lt;strong&gt;zbchaos&lt;/strong&gt; you can run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos topology
0 |LEADER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |LEADER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt;
1 |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |LEADER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt;
2 |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt; |FOLLOWER &lt;span class="o"&gt;(&lt;/span&gt;HEALTHY&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zbchaos will do all the necessary magic for you. Finding a Zeebe gateway, do a port-forward, request the topology, and print it in a compact format. This makes the chaos engineers’ life much easier.&lt;/p&gt;

&lt;p&gt;Another basic check is verifying the readiness of all deployed Zeebe components. To achieve this, we can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos verify readiness
All Zeebe nodes are running.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This verifies the Zeebe Broker Pod status and the status of the Zeebe Gateway deployment status. If one of these is not ready yet, it will loop and not return before they are ready. This is beneficial in automation scripts.&lt;/p&gt;

&lt;p&gt;After you have verified the general health and readiness of the system, you also need to verify whether the system is working functionally. This is also called “verifying the steady state.” This can be achieved by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos verify steady-state — partitionId 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command checks that a process model can be deployed and a process instance can be started for the specified partition. As you cannot influence the partition for new process instances, process instances are started in a loop until that partition is hit. If you don’t specify the &lt;strong&gt;partitionId&lt;/strong&gt;, partition one is used.&lt;/p&gt;

&lt;h4&gt;
  
  
  Inject chaos
&lt;/h4&gt;

&lt;p&gt;After we verify our steady state we want to inject faults or chaos into our system, and afterward check again our steady state. The &lt;strong&gt;zbchaos&lt;/strong&gt; CLI already provides several possibilities to inject faults outlined below.&lt;/p&gt;

&lt;p&gt;Before we step through how we can inject failures, we need to understand what kind of components a Zeebe cluster consists of and what the architecture looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2810%2F0%2AbzpYhhsYYz4ATUpL" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2810%2F0%2AbzpYhhsYYz4ATUpL" alt="[https://docs.camunda.io/assets/images/zeebe-gateway-overview-2c9e101330b27687016509acef12725f.png](https://docs.camunda.io/assets/images/zeebe-gateway-overview-2c9e101330b27687016509acef12725f.png)" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have two types of nodes: the broker, and the gateway.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/architecture/#brokers" rel="noopener noreferrer"&gt;broker&lt;/a&gt; is a node that does the processing work. It can participate in one or more Zeebe partitions (&lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/partitions/" rel="noopener noreferrer"&gt;internally each partition is a raft group, which can consist of one or more nodes&lt;/a&gt;). A broker can have different roles for each partition (Leader, Follower, etc.)&lt;/p&gt;

&lt;p&gt;For more details about the replication, check our &lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/partitions/#replication" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; and the &lt;a href="https://raft.github.io/" rel="noopener noreferrer"&gt;raft documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Zeebe gateway is the contact point to the Zeebe cluster to which clients connect. Clients send commands to the gateway and the gateway is in charge of distributing the commands to the partition leaders. This depends on the command type of course. &lt;a href="https://docs.camunda.io/docs/self-managed/zeebe-gateway-deployment/zeebe-gateway/" rel="noopener noreferrer"&gt;For more details, check out the documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;By default, the Zeebe gateways are replicated as if Camunda Platform 8 Self-Managed was installed via our &lt;a href="http://helm.camunda.io" rel="noopener noreferrer"&gt;Helm charts&lt;/a&gt;, which makes it interesting to also experiment with the gateways.&lt;/p&gt;

&lt;h5&gt;
  
  
  Shutdown nodes
&lt;/h5&gt;

&lt;p&gt;With &lt;strong&gt;zbchaos&lt;/strong&gt; we can shutdown brokers (gracefully and non-gracefully) which have a specific role and take part in a specific partition. This is quite useful in experimenting since we often want to terminate or restart brokers based on the participation and role (e.g. terminate the Leader of partition X or restart all followers of partition Y.)&lt;/p&gt;

&lt;h6&gt;
  
  
  Graceful
&lt;/h6&gt;

&lt;p&gt;A graceful restart can be initiated like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos restart &lt;span class="nt"&gt;-h&lt;/span&gt;
Restarts a Zeebe broker with a certain role and given partition.

    Usage:
    zbchaos restart &lt;span class="o"&gt;[&lt;/span&gt;flags]

    Flags:
      &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt; &lt;span class="nb"&gt;help &lt;/span&gt;&lt;span class="k"&gt;for &lt;/span&gt;restart
      &lt;span class="nt"&gt;--partitionId&lt;/span&gt; int Specify the &lt;span class="nb"&gt;id &lt;/span&gt;of the partition &lt;span class="o"&gt;(&lt;/span&gt;default 1&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="nt"&gt;--role&lt;/span&gt; string Specify the partition role &lt;span class="o"&gt;[&lt;/span&gt;LEADER, FOLLOWER, INACTIVE] &lt;span class="o"&gt;(&lt;/span&gt;default “LEADER”&lt;span class="o"&gt;)&lt;/span&gt;

    Global Flags:
    &lt;span class="nt"&gt;-v&lt;/span&gt;, — verbose verbose output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sends a Kubernetes &lt;strong&gt;delete&lt;/strong&gt; command to the pod, which takes part of the specific partition and has the specific role. This is based on the current Zeebe topology, provided by the Zeebe gateway. All of this is handled by the &lt;strong&gt;zbchaos&lt;/strong&gt; toolkit. The chaos engineer doesn’t need to find this information manually.&lt;/p&gt;

&lt;h6&gt;
  
  
  Non-graceful
&lt;/h6&gt;

&lt;p&gt;Similar to the graceful restart is the termination of the broker. It will send a delete to the specific Kubernetes Pod, and will &lt;a href="https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/" rel="noopener noreferrer"&gt;set the **–gracePeriod **to zero&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos terminate &lt;span class="nt"&gt;-h&lt;/span&gt;
Terminates a Zeebe broker with a certain role and given partition.

    Usage:
      zbchaos terminate &lt;span class="o"&gt;[&lt;/span&gt;flags]
      zbchaos terminate &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;

    Available Commands:
      gateway Terminates a Zeebe gateway

    Flags:
      &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt; &lt;span class="nb"&gt;help &lt;/span&gt;&lt;span class="k"&gt;for &lt;/span&gt;terminate
      &lt;span class="nt"&gt;--nodeId&lt;/span&gt; int Specify the nodeId of the Broker &lt;span class="o"&gt;(&lt;/span&gt;default &lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="nt"&gt;--partitionId&lt;/span&gt; int Specify the &lt;span class="nb"&gt;id &lt;/span&gt;of the partition &lt;span class="o"&gt;(&lt;/span&gt;default 1&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="nt"&gt;--role&lt;/span&gt; string Specify the partition role &lt;span class="o"&gt;[&lt;/span&gt;LEADER, FOLLOWER] &lt;span class="o"&gt;(&lt;/span&gt;default “LEADER”&lt;span class="o"&gt;)&lt;/span&gt;

    Global Flags:
    &lt;span class="nt"&gt;-v&lt;/span&gt;, &lt;span class="nt"&gt;--verbose&lt;/span&gt; verbose output

    Use “zbchaos terminate &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;--help&lt;/span&gt;” &lt;span class="k"&gt;for &lt;/span&gt;more information about a command.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  Gateway
&lt;/h6&gt;

&lt;p&gt;Both commands above target the Zeebe brokers. Sometimes, it is also interesting to target the Zeebe gateway. For that, we can just append the &lt;strong&gt;gateway&lt;/strong&gt; subcommand to the &lt;strong&gt;restart&lt;/strong&gt; or &lt;strong&gt;terminate&lt;/strong&gt; command.&lt;/p&gt;

&lt;h4&gt;
  
  
  Disconnect brokers
&lt;/h4&gt;

&lt;p&gt;It is not only interesting to experiment with graceful and non-graceful restarts, but it is also interesting to experiment with network issues. This kind of fault undercovers other interesting weaknesses (bugs).&lt;/p&gt;

&lt;p&gt;With the &lt;strong&gt;zbchaos&lt;/strong&gt; CLI, it is possible to disconnect different brokers. We can specify at which partition they participate and what kind of role they have. These network partitions can also be set up in one direction if the &lt;strong&gt;–one-direction&lt;/strong&gt; flag is used.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ zbchaos disconnect -h
Disconnect Zeebe nodes, uses sub-commands to disconnect leaders, followers, etc.

    Usage:
     zbchaos disconnect [command]

    Available Commands:
     brokers Disconnect Zeebe Brokers

    Flags:
     -h, — help help for disconnect

    Global Flags:
     -v, — verbose verbose output

    Use “zbchaos disconnect [command] — help” for more information about a command.
    [zell ~/ cluster: zeebe-cluster ns:zell-chaos]$ zbchaos disconnect brokers -h
    Disconnect Zeebe Brokers with a given partition and role.

    Usage:
     zbchaos disconnect brokers [flags]

    Flags:
     — broker1NodeId int Specify the nodeId of the first Broker (default -1)
     — broker1PartitionId int Specify the partition id of the first Broker (default 1)
     — broker1Role string Specify the partition role [LEADER, FOLLOWER] of the first Broker (default “LEADER”)
     — broker2NodeId int Specify the nodeId of the second Broker (default -1)
     — broker2PartitionId int Specify the partition id of the second Broker (default 2)
     — broker2Role string Specify the partition role [LEADER, FOLLOWER] of the second Broker (default “LEADER”)
     -h, — help help for brokers
     — one-direction Specify whether the network partition should be setup only in one direction (asymmetric)

    Global Flags:
     -v, — verbose verbose output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The network partition will be established with &lt;a href="https://man7.org/linux/man-pages/man8/ip-route.8.html" rel="noopener noreferrer"&gt;ip route tables&lt;/a&gt;, which are installed on the specific broker pods.&lt;/p&gt;

&lt;p&gt;Right now this is only supported for the brokers, but hopefully, we will add support for the gateways soon as well.&lt;/p&gt;

&lt;p&gt;To connect the brokers again, the following can be used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;zbchaos connect brokers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This removes the ip routes on all pods again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other features
&lt;/h3&gt;

&lt;p&gt;All the described commands support a verbose flag, which allows the user to determine what kind of action is done, how it connects to the cluster, and more.&lt;/p&gt;

&lt;p&gt;For all of the commands, a bash-completion can be generated via &lt;code&gt;zbchaos completion&lt;/code&gt;, which is very handy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outcome and future
&lt;/h2&gt;

&lt;p&gt;In general, I was quite happy with the outcome of Summer Hackdays 2022, and it was a lot of fun to build and use this tool already. I was able to finally spend some more time writing go code and especially a go CLI. I learned to use the Kubernetes go-client and how to write go tests with fakes for the Kubernetes API, which was quite interesting. You can take a look at the tests &lt;a href="https://github.com/zeebe-io/zeebe-chaos/blob/main/go-chaos/internal/pods_test.go" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/zeebe-io/zeebe-chaos/tree/main/go-chaos" rel="noopener noreferrer"&gt;Code of the CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/zeebe-io/zeebe-chaos/releases" rel="noopener noreferrer"&gt;Releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zeebe-io.github.io/zeebe-chaos/2022/08/31/Message-Correlation-after-Network-Partition/" rel="noopener noreferrer"&gt;Example usage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We plan to extend the CLI in the future and use it in our upcoming experiments.&lt;/p&gt;

&lt;p&gt;For example, I recently did a new chaos day, a day I use to run new experiments, and &lt;a href="https://zeebe-io.github.io/zeebe-chaos/2022/08/31/Message-Correlation-after-Network-Partition/" rel="noopener noreferrer"&gt;wrote a post about it&lt;/a&gt;. In this article, I extended the CLI, with features like sending messages to certain partitions.&lt;/p&gt;

&lt;p&gt;At some point, we want to use the functionality within our automated chaos experiments as Zeebe workers and replace our old bash scripts.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Thanks to Christina Ausley and Bernd Ruecker for reviewing this post :)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>chaosengineering</category>
      <category>kubernetes</category>
      <category>opensource</category>
      <category>camunda</category>
    </item>
    <item>
      <title>A Technical Sneak Peek into Camunda’s Connector Architecture</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Wed, 03 Aug 2022 13:19:56 +0000</pubDate>
      <link>https://forem.com/camunda/a-technical-sneak-peek-into-camundas-connector-architecture-5dib</link>
      <guid>https://forem.com/camunda/a-technical-sneak-peek-into-camundas-connector-architecture-5dib</guid>
      <description>&lt;h4&gt;
  
  
  What is a connector? How does the code for a connector look like? And how can connectors be operated in various scenarios?
&lt;/h4&gt;

&lt;p&gt;When Camunda Platform 8 launched earlier this year, we announced connectors and provided some preview connectors available in our SaaS offering, such as &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/sendgrid/"&gt;sending an email using SendGrid&lt;/a&gt;, &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/rest/"&gt;invoking a REST API&lt;/a&gt;, or &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/slack/"&gt;sending a message to &lt;/a&gt;&lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/slack/"&gt;Slack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since then, many people have asked us what a connector is, how such a connector is developed, and how it can be used in Self-Managed. We haven’t yet published much information on the technical architecture of connectors as it is still under development, but at the same time, I totally understand that perhaps you want to know more to feel as excited as me about connectors.&lt;/p&gt;

&lt;p&gt;In this blog post, I’ll briefly share what a connector is made of, how the code for a connector roughly looks, and how connectors can be operated in various scenarios. Note that the information is a preview, and details are subject to change.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a connector?
&lt;/h3&gt;

&lt;p&gt;A connector is a component that talks to a third-party system via an API and thus allows orchestrating that system via Camunda (or let that system influence Camunda’s orchestration).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--43J5ZFOx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AGd46_wJBm4m3oRnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--43J5ZFOx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AGd46_wJBm4m3oRnz.png" alt="" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The connector consists of a bit of programming code needed to talk to the third-party system and some UI parts hooked into Camunda Modeler.&lt;/p&gt;

&lt;p&gt;This is pretty generic, I know. Let’s get a bit more concrete and differentiate types of connectors:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Outbound connectors&lt;/strong&gt; : Something needs to happen in the third-party system if a process reaches a service task. For example, calling a REST endpoint or publishing some message to Slack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inbound connectors&lt;/strong&gt; : Something needs to happen within the workflow engine because of an external event in the third-party system. For example, because a Slack message was published or a REST endpoint is called. Inbound connectors now can be of three different kinds:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Webhook&lt;/strong&gt; : An HTTP endpoint is made available to the outside, which when called, can start a process instance, for example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subscription&lt;/strong&gt; : A subscription is opened on the third-party system, like messaging or Apache Kafka, and new entries are then received and correlated to a waiting process instance in Camunda, for example.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Polling&lt;/strong&gt; : Some external API needs to be regularly queried for new entries, such as a drop folder on Google Drive or FTP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outbound example
&lt;/h3&gt;

&lt;p&gt;Let’s briefly look at one outbound connector: &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/rest/"&gt;the REST connector&lt;/a&gt;. You can define a couple of properties, like which URL to invoke using which HTTP method. This is configured via Web Modeler, which basically means those properties end up in the XML of the BPMN process model. The translation of the UI to the XML is done by the &lt;a href="https://docs.camunda.io/docs/components/modeler/desktop-modeler/element-templates/about-templates/"&gt;element template mechanism&lt;/a&gt;. This makes connectors convenient to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RrMGKhUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1003/0%2AD_QzJibIqs0LWe9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RrMGKhUw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1003/0%2AD_QzJibIqs0LWe9m.png" alt="" width="800" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now there is also code required to really do the outbound call. The overall Camunda Platform 8 integration framework provides a software development kit (SDK) to program such a connector against. Simplified, an outbound REST connector provides an execute method that is called whenever a process instance needs to invoke the connector, and a context is provided with all input data, configuration, and abstraction for the secret store.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/e960514728b5646935597f26a1d141c2/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/e960514728b5646935597f26a1d141c2/href"&gt;https://medium.com/media/e960514728b5646935597f26a1d141c2/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now there needs to be some glue code calling this function whenever a process instance reaches the respective service task. This is the job of the connector runtime. This runtime registers &lt;a href="https://docs.camunda.io/docs/components/concepts/job-workers/"&gt;job workers&lt;/a&gt; with Zeebe and calls the outbound connector function whenever there are new jobs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kXUMdQG0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AZVVn4M0SDa2Cq6pL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kXUMdQG0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AZVVn4M0SDa2Cq6pL.png" alt="" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This connector runtime is independent of the concrete connector code executed. In fact, a connector runtime can handle multiple connectors at the same time. Therefore, a connector brings its own metadata:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/9e273b9ad78b7042779ee2d46ff74f84/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/9e273b9ad78b7042779ee2d46ff74f84/href"&gt;https://medium.com/media/9e273b9ad78b7042779ee2d46ff74f84/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this, we’ve built a Spring Boot-based runtime that can discover all outbound connectors on the classpath and register the required job workers. This makes it super easy to test a single connector, as you can run it locally, but you can also stitch together a Spring Boot application with all the connectors you want to run in your Camunda Platform 8 Self-Managed installation.&lt;/p&gt;

&lt;p&gt;At the same time, we have also built a connector runtime for our own SaaS offering, running in Google Cloud. While we also run a generic, Java-based connector runtime, all outbound connectors themselves are deployed as Google Functions. Secrets are handled by the Google Cloud Security Manager in this case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YdvWRqIh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AzPpJuqZo_SF9ULOS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YdvWRqIh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AzPpJuqZo_SF9ULOS.png" alt="" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The great thing here is that the connector code itself does not know anything about the environment it runs in, making connectors available in the whole Camunda Platform 8 ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inbound example
&lt;/h3&gt;

&lt;p&gt;Having talked about outbound, inbound is a very different beast. An inbound connector either needs to open up an HTTP endpoint, a subscription, or start polling. It might even require some kind of state, for example, to remember what was already polled. Exceptions in a connector should be visible to an operator, even if there is no process instance to pinpoint it to.&lt;/p&gt;

&lt;p&gt;We are currently designing and validating architecture on this end, so consider it in flux. Still, some of the primitives from inbound connectors will also be true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parameters can be configured via the Modeler UI and stored in the BPMN process.&lt;/li&gt;
&lt;li&gt;The core connector code will be runnable in different environments.&lt;/li&gt;
&lt;li&gt;Metadata will be provided so that the connector runtime can easily pick up new connectors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A prototypical connector receiving AMQP messages (e.g., from RabbitMQ) looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/677d6ea9714af94cd4ca42873c0e9841/href"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/677d6ea9714af94cd4ca42873c0e9841/href"&gt;https://medium.com/media/677d6ea9714af94cd4ca42873c0e9841/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is the related visualization:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WydsXs1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AbD7c8nTSoZveRt9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WydsXs1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AbD7c8nTSoZveRt9w.png" alt="" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Status and next steps
&lt;/h3&gt;

&lt;p&gt;Currently, only a fraction of what we work on is publicly visible. Therefore, there are currently some limitations on connectors in Camunda Platform version 8.0, mainly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The SDK for connectors is not open to the public simply because we need to finalize some things first, as we want to avoid people building connectors that need to be changed later on.&lt;/li&gt;
&lt;li&gt;The code of &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/"&gt;existing connectors (REST, SendGrid, and Slack)&lt;/a&gt; is not available and cannot be run on Self-Managed environments yet.&lt;/li&gt;
&lt;li&gt;The UI support is only available within Web Modeler, not yet within Desktop Modeler.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We are working on all of these areas and plan to release the connector SDK later this year. We can then provide sources and binaries to existing connectors to run them in Self-Managed environments or to understand their inner workings. Along with the SDK, we plan to release connector templates that allow you to easily design the UI attributes and parameters required for your connector and provide you with the ability to share the connector template with your project team.&lt;/p&gt;

&lt;p&gt;At the same time, we are also working on providing more out-of-the-box connectors (like the &lt;a href="https://docs.camunda.io/docs/components/modeler/web-modeler/connectors/available-connectors/slack/"&gt;Slack connector&lt;/a&gt; that was just released last week) and making them available open source. We are also in touch with partners who are eager to provide connectors to the Camunda ecosystem. As a result, we plan to offer some kind of exchange where you can easily see which connectors are available, their guarantees, and their limitations.&lt;/p&gt;

&lt;p&gt;Still, the whole connector architecture is built to allow everybody to build their own connectors. This especially also enables you to build private connectors for your own legacy systems that can be reused across your organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;The main building block to implementing connectors is our SDK for inbound and outbound connectors, whereas outbound connectors can be based on webhooks, subscriptions, or polling. This allows writing connector code that is independent of the connector runtime so that you can leverage connectors in the Camunda SaaS offering and your own Self-Managed environment.&lt;/p&gt;

&lt;p&gt;At the same time, connector templates will allow a great modeling experience when using connectors within your own models. We are making great progress, and you can expect to see more later this year. Exciting times ahead!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://berndruecker.io/"&gt;Bernd Ruecker&lt;/a&gt; is co-founder and chief technologist of C&lt;a href="http://camunda.com/"&gt;amunda&lt;/a&gt; as well as the author of&lt;a href="https://processautomationbook.com/"&gt;Practical Process Automation with O’Reilly&lt;/a&gt;. He likes speaking about himself in the third person. He is passionate about developer-friendly process automation technology. Connect via&lt;a href="https://www.linkedin.com/in/bernd-ruecker-21661122/"&gt;LinkedIn&lt;/a&gt; or follow him on&lt;a href="http://twitter.com/berndruecker/"&gt;Twitter&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; As always, he loves getting your feedback. Comment below or&lt;a href="http://bernd.ruecker@camunda.com"&gt;send him an email&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>connector</category>
      <category>camunda</category>
      <category>bpmn</category>
      <category>connectivity</category>
    </item>
    <item>
      <title>Why Process Orchestration Needs Advanced Workflow Patterns</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Mon, 01 Aug 2022 19:23:19 +0000</pubDate>
      <link>https://forem.com/camunda/why-process-orchestration-needs-advanced-workflow-patterns-4e9f</link>
      <guid>https://forem.com/camunda/why-process-orchestration-needs-advanced-workflow-patterns-4e9f</guid>
      <description>&lt;p&gt;Life is seldom a straight line, and the same is true for processes. Therefore, you must be able to accurately express all the things happening in your business processes for proper end-to-end process orchestration. This requires &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/"&gt;workflow patterns&lt;/a&gt; that go beyond basic control flow patterns (like sequence or condition). If your orchestration tool does not provide those advanced workflow patterns, you will experience confusion amongst developers, you will need to implement time-consuming workarounds, and you will end up with confusing models. Let’s explore this by examining an example of why these advanced workflow patterns matter in today’s blog post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initial process example
&lt;/h3&gt;

&lt;p&gt;Let’s assume you’re processing incoming orders of hand-crafted goods to be shipped individually. Each order consists of many different order positions, which you want to work on in parallel with your team to save time and deliver quicker. However, while your team is working on the order, the customer is still able to cancel, and in that case, you need to be able to revoke any deliveries that have been scheduled already. A quick drawing on the whiteboard yields the following sketch of this example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nGBaTT9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Anv9u3COivmUgd6-y" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nGBaTT9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2Anv9u3COivmUgd6-y" alt="" width="800" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s create an executable process model for this use case. I will first show you a possible process using &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html"&gt;ASL (Amazon States Language)&lt;/a&gt; and AWS Step Functions, and secondly with Camunda Platform and &lt;a href="https://camunda.com/bpmn/"&gt;BPMN (Business Process Model and Notation)&lt;/a&gt; to illustrate the differences between these underlying workflow languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modeling using AWS Step Functions
&lt;/h3&gt;

&lt;p&gt;The following model is created using ASL, which is part of AWS Step Functions and, as such, a bespoke language. Let’s look at the resulting diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_wK29BZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/488/0%2AfMwSEFYnpCBB57JR" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_wK29BZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/488/0%2AfMwSEFYnpCBB57JR" alt="" width="488" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To discuss it, I will use &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/"&gt;workflow patterns&lt;/a&gt;, which are a proven set of patterns you will need to express any workflow.&lt;/p&gt;

&lt;p&gt;The good news is that ASL can execute a workflow pattern called “&lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#dynamic-parallel-branches"&gt;dynamic parallel branches&lt;/a&gt;,” which allows parallelizing execution of the order positions. This is good; otherwise, we would need to start multiple workflow instances for the order positions and do all synchronizations by hand.&lt;/p&gt;

&lt;p&gt;But this is where things get complicated. ASL does not offer &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#external-messagesevents"&gt;reactions to external messages&lt;/a&gt;; thus, you cannot interrupt your running workflow instance if an external event happens, like the customer cancels their order. Therefore, you need a workaround. One possibility is to use a parallel branch that waits for the cancellation event in parallel to execute the multiple instance tasks, marked with (1) in the illustration above.&lt;/p&gt;

&lt;p&gt;When implementing that wait state around cancelation, you will undoubtedly miss a proper &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#correlation-mechanisms"&gt;correlation mechanism&lt;/a&gt;, as you cannot easily correlate events from the outside to the running workflow instance. Instead, you could leverage the &lt;a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-example"&gt;task token&lt;/a&gt; generated from AWS and keep it in an external data store so that you can locate the correct task token for a given order id. This means you have to implement a bespoke message correlation mechanism yourself, including persistence as &lt;a href="https://aws.amazon.com/blogs/compute/integrating-aws-step-functions-callbacks-and-external-systems/"&gt;described in Integrating AWS Step Functions callbacks and external systems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When the cancelation message comes in, the workflow advances in that workaround path and needs to raise an error so all order delivery tasks are canceled, and the process can directly move on to cancelation, marked with (2) in the above illustration.&lt;/p&gt;

&lt;p&gt;But even in the desired case that the order does not get canceled; you need to leverage an error. This is marked with (3) in the illustration above. This is necessary to interrupt the task of waiting for the cancelation message.&lt;/p&gt;

&lt;p&gt;You need to use a similar workaround again when you want to wait for payment, but stop this waiting after a specified timeout. Therefore, you will start a timer in parallel, marked with (4), and use an error to stop it later, marked with (5).&lt;/p&gt;

&lt;p&gt;Note that when you configure the wait state, you might assume you may misuse Step Functions here, as you configure the time in seconds, meaning you have to enter a big number (864,000 seconds) to wait ten days.&lt;/p&gt;

&lt;p&gt;Of course, you could also implement your requirements differently. For example, you might implement all order cancelation logic entirely outside of the process model and just terminate the running order fulfillment instance via API. But note that by doing so, you will lose a lot of visibility around what happens in your process, not only during design time but also during operations or improvement endeavors.&lt;/p&gt;

&lt;p&gt;Additionally, you distribute logic that belongs together all over the place (step function, code, etc.) For example, a change in order fulfillment might mean you have to rethink your cancelation procedure, which is obvious if cancelation is part of the model.&lt;/p&gt;

&lt;p&gt;To summarize, the lack of advanced workflow patterns requires workarounds, which are not only hard to do but also make the model hard to understand and thus weakens the value proposition of an orchestration engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modeling with BPMN
&lt;/h3&gt;

&lt;p&gt;Now let’s contrast this with modeling using the ISO standard &lt;a href="https://camunda.com/bpmn/"&gt;BPMN&lt;/a&gt; within Camunda:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3G17nq-v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/960/0%2ATOBpVRbQLddwstAT" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3G17nq-v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/960/0%2ATOBpVRbQLddwstAT" alt="" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This model is directly executable on engines that support BPMN, like Camunda. As you can see, BPMN supports all required advanced workflow patterns to make it not only easy to model this process but also yields a very understandable model.&lt;/p&gt;

&lt;p&gt;Let’s briefly call out the workflow patterns (besides the basics like &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#sequence"&gt;sequence&lt;/a&gt;, &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#conditions-ifthen"&gt;condition&lt;/a&gt;, and &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#wait"&gt;wait&lt;/a&gt;) that helped to make this process so easy to implement:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#dynamic-parallel-branches"&gt;Dynamic parallel branches&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#external-messagesevents"&gt;Reacting to external message events&lt;/a&gt; with &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#correlation-mechanisms"&gt;correlation mechanisms&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#time-based"&gt;Reacting to time-based events&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This model can be perfectly used to discuss the process with various stakeholders, and can further be shown in &lt;a href="https://camunda.com/platform/operate/"&gt;technical operations&lt;/a&gt; (e.g., if some process instance gets stuck) or &lt;a href="https://camunda.com/platform/optimize/"&gt;business analysis&lt;/a&gt; (e.g., to understand which orders are canceled most and in which state of the process execution). Below is a sample screenshot of the operations tooling showing a process instance with six order items, where one raised an incident. You can see how easy it gets to dive into potential operational problems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dKeiRNu3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AiNhmDAAP3Zevndet" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dKeiRNu3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2AiNhmDAAP3Zevndet" alt="" width="800" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s not let history repeat itself!
&lt;/h3&gt;

&lt;p&gt;I remember one of my projects using the workflow engine JBoss jBPM 3.x back in 2009. I was in Switzerland for a couple of weeks, sorting out exception scenarios and describing patterns on how to deal with those. Looking back, this was hard because jBPM 3 lacked a lot of essential workflow patterns, especially around the &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/"&gt;reaction to events&lt;/a&gt; or &lt;a href="https://docs.camunda.io/docs/components/concepts/workflow-patterns/#error-scopes"&gt;error scopes&lt;/a&gt;, which I did not know back then. In case you enjoy nostalgic pictures as much as I do, this is a model from back then:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Guvf098N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/492/0%2AMCZWGd96sxir5YM2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Guvf098N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/492/0%2AMCZWGd96sxir5YM2" alt="" width="492" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m happy to see BPMN removed the need for all of those workarounds necessary, creating a lot of frustration among developers. Additionally, the improved visualization really allowed me to discuss process models with a larger group of people with various experience levels and backgrounds in process orchestration.&lt;/p&gt;

&lt;p&gt;Interestingly enough, many modern workflow or orchestration engines lack the advanced workflow patterns described above. Often, this comes with the promise of being simpler than BPMN. But in reality, claims of simplicity mean they lack essential patterns. Hence, if you follow the development of these modeling languages over time, you will see that they add patterns once in a while, and whenever such a tool is successful, it almost inevitably ends up with a language complexity comparable to BPMN but in a proprietary way. As a result, process models in those languages are typically harder to understand.&lt;/p&gt;

&lt;p&gt;At the same time, developing a workflow language is very hard, so chances are high that vendors will take a long time to develop proper pattern support. I personally don’t understand this motivation, as the knowledge about workflow patterns is available, and BPMN implements it in an industry-proven way, even as an ISO standard.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The reality of a business process requires advanced workflow patterns. If a product does not natively support them, its users will need to create technical workarounds, as you could see in the example earlier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASL lacked pattern and required complex workarounds.&lt;/li&gt;
&lt;li&gt;BPMN supports all required patterns and produces a very comprehensible model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Emulating advanced patterns with basic constructs and/or programming code, as necessary for ASL, means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your development takes longer.&lt;/li&gt;
&lt;li&gt;Your solution might come with technical weaknesses, like limited scalability or observability.&lt;/li&gt;
&lt;li&gt;You cannot use the executable process model as a communication vehicle for business and IT.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To summarize, ensure you use an orchestration product supporting all-important workflow patterns, such as Camunda, which uses BPMN as workflow language.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://berndruecker.io/"&gt;Bernd Ruecker&lt;/a&gt; is co-founder and chief technologist of C&lt;a href="http://camunda.com/"&gt;amunda&lt;/a&gt; as well as the author of&lt;a href="https://processautomationbook.com/"&gt;Practical Process Automation with O’Reilly&lt;/a&gt;. He likes speaking about himself in the third person. He is passionate about developer-friendly process automation technology. Connect via&lt;a href="https://www.linkedin.com/in/bernd-ruecker-21661122/"&gt;LinkedIn&lt;/a&gt; or follow him on&lt;a href="http://twitter.com/berndruecker/"&gt;Twitter&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; As always, he loves getting your feedback. Comment below or&lt;a href="http://bernd.ruecker@camunda.com"&gt;send him an email&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>workflowautomation</category>
      <category>workflowengine</category>
      <category>processorchestration</category>
      <category>orchestration</category>
    </item>
    <item>
      <title>How to Achieve Geo-redundancy with Zeebe</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Tue, 28 Jun 2022 14:14:35 +0000</pubDate>
      <link>https://forem.com/camunda/how-to-achieve-geo-redundancy-with-zeebe-4hma</link>
      <guid>https://forem.com/camunda/how-to-achieve-geo-redundancy-with-zeebe-4hma</guid>
      <description>&lt;p&gt;Camunda Platform 8 reinvented the way an orchestration and workflow engine works. We applied modern distributed system concepts and can now even allow geo-redundant workloads, often referred to as multi-region active-active clusters. Using this technology, organizations can build resilient systems that can withstand disasters in the form of a complete data center outage.&lt;/p&gt;

&lt;p&gt;For example, a recent customer project in a big financial institution connected a data center in Europe with one in the United States and this did not affect their throughput, meaning they can still run the same number of process instances per second. But before talking about multi-regions and performance, let’s disassemble this fascinating topic step-by-step in today’s blog post.&lt;/p&gt;

&lt;p&gt;Many thanks to our&lt;a href="https://github.com/falko"&gt;distributed systems guru, Falko&lt;/a&gt;, for providing a ton of input about this topic, and my great &lt;a href="https://twitter.com/nele_lea"&gt;colleague Nele&lt;/a&gt; for helping to get everything in order in this post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hang on — geo-redundant? Multi-region? Active-active?
&lt;/h3&gt;

&lt;p&gt;First, let’s quickly explain some important basic terminology we are going to use in this post:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Geo-redundancy&lt;/strong&gt; (also referred to as geo-replication): We want to replicate data in a geographically distant second data center. This means even a massive disaster like a full data center going down will not result in any data loss. For some use cases, this becomes the de-facto standard as most businesses simply cannot risk losing any data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-region&lt;/strong&gt; : Most organizations deploy to public clouds and the public cloud providers name their different data centers a region. So in essence, deploying to two different regions makes sure; those deployments will end up in separate data centers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability zones&lt;/strong&gt; : A data center, or a region, is separated into availability zones. Those zones are physically separated, meaning an outage because of technical failures is limited to one zone. Still, all zones of a region are geographically located in one data center.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active-active&lt;/strong&gt; : When replicating data to a second machine, you could simply copy the data there, just to have it when disaster strikes. This is called a passive backup. Today, most use cases strive for the so-called active-active scenario instead, where data is actively processed on both machines. This makes sure you can efficiently use the provisioned hardware (and not keep a passive backup machine idle all the time).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zeebe&lt;/strong&gt; : The workflow engine within Camunda Platform 8.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So let’s rephrase what we want to look at today: How to run a multi-region active-active Zeebe cluster (which then is automatically geo-redundant and geo-replicated). That’s a mouthful!&lt;/p&gt;

&lt;h3&gt;
  
  
  Resilience levels
&lt;/h3&gt;

&lt;p&gt;Firstly, do you really need multi-region redundancy? To understand this better, let’s sketch the levels of resilience you can achieve:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clustering&lt;/strong&gt; : You build a cluster of nodes in one zone. You can stand hardware or software failures of individual nodes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-zone&lt;/strong&gt; : You distribute nodes into multiple zones, increasing availability as you can now stand an outage of a full zone. Zone outages are very rare.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-region&lt;/strong&gt; : You distribute nodes into multiple regions, meaning geographically distributed data centers. You will likely never experience an outage of a full region, as this might only happen because of exceptional circumstances.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So while most normal projects are totally fine with clustering, the sweet spot is multi-zone. Assuming you run on Kubernetes provided by one of the Hyperscalers, multi-zone is easy to set up and thus does not cause a lot of effort or costs. At the same time, it provides an availability that is more than sufficient for most use cases. Only if you really need to push this availability and need to withstand epic disasters do you need to go for multi-region deployments. I typically see this with big financial or telecommunication companies. That said, there might also be other drivers besides availability for a multi-region setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Locality: Having a cluster spanning multiple regions, clients can talk to the nodes closest to them. This can decrease network latencies.&lt;/li&gt;
&lt;li&gt;Migration: When you need to migrate to another region at your cloud provider, you might want to gradually take workloads over and run both regions in parallel for some time to avoid any downtimes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In today’s blog post, we want to unwrap Zeebe’s basic architecture to support any of those resilience scenarios, quickly describe a multi-zone setup, and also turn our attention to multi-region, simply because it is possible and we are regularly asked about it. Finally, we’ll explain how Zeebe scales and how we can turn any of those scenarios into an active-active deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Replication in Zeebe
&lt;/h3&gt;

&lt;p&gt;To understand how we can achieve resilience in Zeebe, you first need to understand how Zeebe does replication. Zeebe uses distributed consensus — more specifically the&lt;a href="https://raft.github.io/"&gt;Raft Consensus Algorithm&lt;/a&gt; — for replication.&lt;a href="https://atomix.io/"&gt;&lt;/a&gt;There is an awesome&lt;a href="http://thesecretlivesofdata.com/raft/"&gt;visual explanation of the Raft Consensus Algorithm&lt;/a&gt; available online, so I will not go into all the details here. The basic idea is that there is a &lt;strong&gt;single leader&lt;/strong&gt; and &lt;strong&gt;a set of followers&lt;/strong&gt;. The most common setup is to have one leader and two followers, and you’ll see why soon.&lt;/p&gt;

&lt;p&gt;When the Zeebe brokers start up, they elect a leader. Only the leader is allowed to write data. The data written by the leader is replicated to all followers. Only after a successful replication is the data considered committed and can be processed by Zeebe (this is explained in more detail in &lt;a href="https://dev.to/berndruecker/how-we-built-a-highly-scalable-distributed-state-machine-10hd"&gt;how we built a highly scalable distributed state machine&lt;/a&gt;). In essence, all (committed) data is guaranteed to exist on the leader and all followers all the time.&lt;/p&gt;

&lt;p&gt;There is one important property you can configure for your Zeebe cluster — the &lt;strong&gt;replication factor&lt;/strong&gt;. A replication factor of three means data is available three times, on the leader as well as replicated to two followers, as indicated in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V9vcf3Tf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/298/0%2AkwGslgf06ZWiyZVy" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V9vcf3Tf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/298/0%2AkwGslgf06ZWiyZVy" alt="" width="298" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A derived property is what is called the quorum. This is the number of nodes required to hold so-called elections. Those elections are necessary for the Zeebe cluster to select who is the leader and who is a follower. To elect a leader, at least round_down(replication factor / 2) + 1 nodes need to be available. In the above example, this means round_down(3/2)+1 = 2 nodes are needed to reach a quorum.&lt;/p&gt;

&lt;p&gt;So a cluster with a replication factor of three can process data if at least two nodes are available. This number of nodes is also needed to consider something committed in Zeebe.&lt;/p&gt;

&lt;p&gt;The replication factor of three is the most common, as it gives you a good compromise of the number of replicas (additional hardware costs) and availability (I can tolerate losing one node).&lt;/p&gt;

&lt;h3&gt;
  
  
  A sample failure scenario
&lt;/h3&gt;

&lt;p&gt;With this in mind, let’s quickly run through a failure scenario, where one node crashes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u2Ex7ik---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/756/0%2Ab2h4rQyWAmq-8ptR" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u2Ex7ik---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/756/0%2Ab2h4rQyWAmq-8ptR" alt="" width="756" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One node crashing will not affect the cluster at all, as it still can reach a quorum. Thus, it can elect a new leader and continue working. You should simply replace or restart that node as soon as possible to keep an appropriate level of redundancy.&lt;/p&gt;

&lt;p&gt;Note that every Zeebe cluster with a configured replication factor has basic resilience built in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-zone Zeebe clusters
&lt;/h3&gt;

&lt;p&gt;When running on Kubernetes in a public cloud, you can easily push availability further by distributing the different Zeebe nodes to different availability zones. Therefore, you can leverage &lt;a href="https://kubernetes.io/docs/setup/best-practices/multiple-zones/"&gt;multi-zone clusters in Kubernetes&lt;/a&gt;. For example, in Google Cloud (GCP) this would mean &lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters"&gt;regional clusters&lt;/a&gt; (mind the confusing wording: a regional cluster is spread across &lt;em&gt;multiple zones&lt;/em&gt; within &lt;em&gt;one region&lt;/em&gt;). Then, you can set &lt;a href="https://kubernetes.io/docs/setup/best-practices/multiple-zones/#node-behavior"&gt;a constraint, that your Zeebe nodes, running as a stateful set, are all running in different zones from each other&lt;/a&gt;. Et voila, you added multi-zone replication:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JcnFUCiJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/286/0%2AcgS1H7N0QUi0I3Cr" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JcnFUCiJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/286/0%2AcgS1H7N0QUi0I3Cr" alt="" width="286" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the Zeebe perspective, the scenario of a zone outage is now really the same as the one of a node outage. You can also run more than three Zeebe nodes, as we will discuss later in this post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-region Zeebe clusters
&lt;/h3&gt;

&lt;p&gt;As multi-zone replication was so easy, let’s also look at something technically more challenging (reminding ourselves, that not many use cases actually require it): multi-region clusters.&lt;/p&gt;

&lt;p&gt;You might have guessed it by now — the logic is basically the same. You distribute your three Zeebe nodes to three different regions. But unfortunately, this is nothing Kubernetes does out of the box for you, at least not yet. There is so much going on in this area that I expect new possibilities to emerge any time soon (just naming &lt;a href="https://linkerd.io/2.11/tasks/multicluster-using-statefulsets/"&gt;Linkerd’s multi-cluster communication with StatefulSets as&lt;/a&gt; an example).&lt;/p&gt;

&lt;p&gt;In our customer project, this was not a show stopper, as we went with the following procedure that proved to work well:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spin up three Kubernetes clusters in different regions (calling them “west”, “central”, and “east” here for brevity).&lt;/li&gt;
&lt;li&gt;Set up DNS forwarding between those clusters (see solution #3 of &lt;a href="https://www.youtube.com/watch?v=az4BvMfYnLY"&gt;Cockroach running a distributed system across Kubernetes Clusters&lt;/a&gt;) and add the proper firewall rules so that the clusters can talk to each other.&lt;/li&gt;
&lt;li&gt;Create a Zeebe node in every cluster using tweaked &lt;a href="https://docs.camunda.io/docs/self-managed/platform-deployment/kubernetes-helm/"&gt;Helm charts&lt;/a&gt;. Those tweaks made sure to calculate and set the &lt;a href="https://docs.camunda.io/docs/self-managed/zeebe-deployment/operations/setting-up-a-cluster/"&gt;Zeebe broker ids&lt;/a&gt; correctly (which is mathematically easy, but a lot of fun to do in shell scripts;-)). This will lead to “west-zeebe-0” being node 0, “central-zeebe-0” being 1, and “east-zeebe-0” being 2.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Honestly, those scripts are not ready to be shared without hand-holding, but if you plan to set up a multi-region cluster, &lt;a href="https://camunda.com/contact/"&gt;please simply reach out&lt;/a&gt;and we can discuss your scenario and assist.&lt;/p&gt;

&lt;p&gt;Note that we set up as many regions as we have replicas. This is by design, as the whole setup becomes rather simple if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The number of nodes is a multiple of your replication factor (in our example 3, 6, 9, …).&lt;/li&gt;
&lt;li&gt;The nodes can be equally distributed among regions (in our example 3 regions for 3, 6, or 9 nodes).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Running Zeebe in exactly two data centers
&lt;/h3&gt;

&lt;p&gt;Let’s discuss a common objection at this point: we don’t want to run in three data centers, we want to run it in exactly two! My hypothesis is that this yields from a time when organizations operated their own data centers, which typically meant there were only two data centers available. However, this changed a lot with the move to public cloud providers.&lt;/p&gt;

&lt;p&gt;Truthfully, it is actually harder to run a replicated Zeebe cluster spanning two data centers than spanning three. This is because of the replication factor and using multiples — as you could see above. So in a world dominated by public cloud providers, where it is not a big deal to utilize another region, we would simply recommend replicating to three data centers.&lt;/p&gt;

&lt;p&gt;Nevertheless, in the customer scenario, there was the requirement to run Zeebe in two regions. So we quickly want to sketch how this could be done. Therefore, we run 4 nodes to have two nodes in every region. This allows one node to go down and still guarantees a copy of all data in both regions. Therefore, three nodes are not enough to be able to deal with an outage of a whole region.&lt;/p&gt;

&lt;p&gt;The following image illustrates our concrete setup:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_lW65p9z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/380/0%2AYUvNYbjqu_HTDC70" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_lW65p9z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/380/0%2AYUvNYbjqu_HTDC70" alt="" width="380" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is one key difference to the three-region scenario: When you lose one region, an operator will need to jump in and take manual action. When two nodes are missing, the cluster has no quorum anymore (remember: replication factor 4 / 2 + 1 = 3) and cannot process data as visualized in the following diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xlsqSaXo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ASkz8ae4yYZjaH1OA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xlsqSaXo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1024/0%2ASkz8ae4yYZjaH1OA" alt="" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get your cluster back to work, you need to add one more (empty) cluster node, having &lt;a href="https://docs.camunda.io/docs/self-managed/zeebe-deployment/operations/setting-up-a-cluster/"&gt;the Zeebe node id&lt;/a&gt; of the original node three (at the time of writing, the cluster size of Zeebe is fixed and cannot be increased on the fly, this is why you cannot simply add new nodes). The cluster automatically copies the data to this new node and can elect a new leader as the cluster is back online.&lt;/p&gt;

&lt;p&gt;Adding this node is consciously a manual step to avoid a so-called &lt;a href="https://en.wikipedia.org/wiki/Split-brain_(computing)"&gt;split-brain situation&lt;/a&gt;. Assume that the network link between region one and region two goes down. Every data center is still operating but thinks the other region is down. There is no easy way for an automated algorithm within one of the regions to decide if it should start new nodes, but avoid starting new nodes in both regions. This is why this decision is pushed to a human operator. As losing whole regions is really rare, this is tolerable. Please note again that this is only necessary for the two-region scenario, not when using three regions (as they still have a quorum when one region is missing).&lt;/p&gt;

&lt;p&gt;When the region comes back, you can start node 4 again, and then replace the new node 3 with the original one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uW01_wl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/744/0%2AIJvf3zwcPblbKy-C" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uW01_wl1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/744/0%2AIJvf3zwcPblbKy-C" alt="" width="744" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The bottom line is that using two regions is possible, but more complex than simply using three regions. Whenever you are not really constrained by the number of physical data centers available to you (like with public cloud providers), we recommend choosing a thoughtful number of regions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scaling workloads using partitions
&lt;/h3&gt;

&lt;p&gt;So far, we simplified things a little bit. We were not building real active-active clusters, as followers do not do any work other than replicating. Also, we did not really scale Zeebe. Let’s look at this next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/partitions/"&gt;Zeebe uses so-called partitions for scaling&lt;/a&gt;, as further explained in &lt;a href="https://dev.to/berndruecker/how-we-built-a-highly-scalable-distributed-state-machine-10hd"&gt;how we built a highly scalable distributed state machine&lt;/a&gt;. In the above examples, we looked at exactly one partition. In reality, a Camunda Platform 8 installation runs multiple partitions. The exact number depends on your load requirements, but it should reflect what was described above about multiples.&lt;/p&gt;

&lt;p&gt;So a replication factor of three means we might run 12 partitions on six nodes, or 18 partitions on six nodes, for example. Now, leaders and followers of the various partitions are distributed onto the various Zeebe nodes, making sure those nodes are not only followers but also leaders for some of the partitions. This way, every node will also do “real work”.&lt;/p&gt;

&lt;p&gt;The following picture illustrates this, whereas P1 — P12 stands for the various partitions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ren5nsRZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1012/0%2A_UGWyHjD-w9eWzRU" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ren5nsRZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1012/0%2A_UGWyHjD-w9eWzRU" alt="" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, there is a round-robin pattern behind distributing leaders and their followers to the nodes. We can now leverage this pattern to guarantee geo-redundancy by adding the nodes to the various data centers in a clever round-robin too. As you can see above, for example in P1 the leader is in region 2, and the followers are in regions 1 and 3, so every data center has a copy of the data as described earlier. And this is also true for all other partitions. An outage will not harm the capability of the Zeebe cluster to process data. The following illustration shows what happens if region 3 goes down; the partitions only need to elect some new leaders:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z6chCMkT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1011/0%2AgsMWSjZ9vbeCN7H1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z6chCMkT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/1011/0%2AgsMWSjZ9vbeCN7H1" alt="" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  And how does geo-redundancy affect performance?
&lt;/h3&gt;

&lt;p&gt;Finally, let’s also have a quick look at how multi-region setups affect the performance and throughput of Zeebe. The elephant in the room is of course that network latency between geographically separate data centers is unavoidable. Especially if you plan for epic disasters, your locations should not be too close. Or if you want to ensure geographic locality, you might even want various data centers to be close to the majority of your customers, which might simply mean you will work with data centers all over the world. In our recent customer example, we used one GCP region in London and one in the US, Northern Virginia to be precise. The latency between those data centers is estimated to be roughly 80ms (according to &lt;a href="https://geekflare.com/google-cloud-latency/"&gt;https://geekflare.com/google-cloud-latency/&lt;/a&gt;), but latencies can also go further up to a couple of hundred milliseconds.&lt;/p&gt;

&lt;p&gt;Spoiler alert: This is not at all a problem for Zeebe and does not affect throughput.&lt;/p&gt;

&lt;p&gt;To add some spice to this, let’s quickly look at why this is a problem in most architectures. For example, in Camunda Platform 7 (the predecessor of the current Camunda Platform 8), we used a relational database and database transactions to store the workflow engine state. In this architecture, replication needs to happen as part of the transaction (at least if we need certain consistency guarantees, which we do) resulting in transactions that take a long time. Conflicts between transactions are thus more likely to occur, for example, because two requests want to correlate something to the same BPMN process instance. Second, typical resource pools for transactions or database connections might also end up being exhausted in high-load scenarios.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QxPy7t9b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/966/0%2AHAJ9Ll_bCoPKSa9o" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QxPy7t9b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/966/0%2AHAJ9Ll_bCoPKSa9o" alt="" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In summary, running Camunda Platform 7 geographically distributed is possible, but especially under high load, it bears challenges.&lt;/p&gt;

&lt;p&gt;With the Camunda Platform 8 architecture, the engine does not leverage any database transaction. Instead, it uses a lot of ring buffers to queue things to do. And waiting for IO, like the replication reporting success, does not block any resource and further does not cause any contention in the engine. This is described in more detail in &lt;a href="https://dev.to/berndruecker/how-we-built-a-highly-scalable-distributed-state-machine-10hd"&gt;how we built a highly scalable distributed state machine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Long story short: Our experiments clearly supported the hypothesis that geo-redundant replication does not affect throughput. Of course, processing every request will have higher latency. Or to put in other words, your process cycle times will increase, as the network latency is still there. However, it only influences that one number in a very predictable way. In the customer scenario, a process that typically takes around 30 seconds was delayed by a couple of seconds in total, which was not a problem at all. We have not even started to optimize for replication latency, but have a lot of ideas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In this post, you could see that Zeebe can easily be geo-replicated. The sweet spot is a replication factor of three and replication across three data centers. In public cloud speak, this means three different regions. Geo-replication will of course add latency but does not affect throughput. Still, you might not even need such a high degree of availability and be happy to run in multiple availability zones of your data center or cloud provider. As this is built into Kubernetes, it is very easy to achieve.&lt;/p&gt;

&lt;p&gt;Please reach out to us if you have any questions, specific scenarios, or simply want to share great success stories!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://berndruecker.io/"&gt;Bernd Ruecker&lt;/a&gt; is co-founder and chief technologist of C&lt;a href="http://camunda.com/"&gt;amunda&lt;/a&gt; as well as the author of&lt;a href="https://processautomationbook.com/"&gt;Practical Process Automation with O’Reilly&lt;/a&gt;. He likes speaking about himself in the third person. He is passionate about developer-friendly process automation technology. Connect via&lt;a href="https://www.linkedin.com/in/bernd-ruecker-21661122/"&gt;LinkedIn&lt;/a&gt; or follow him on&lt;a href="http://twitter.com/berndruecker/"&gt;Twitter&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; As always, he loves getting your feedback. Comment below or&lt;a href="http://bernd.ruecker@camunda.com"&gt;send him an email&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>georedundancy</category>
      <category>resilience</category>
      <category>multiregion</category>
      <category>highavailability</category>
    </item>
    <item>
      <title>What to do When You Can’t Quickly Migrate to Camunda 8</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Wed, 25 May 2022 19:03:31 +0000</pubDate>
      <link>https://forem.com/camunda/what-to-do-when-you-cant-quickly-migrate-to-camunda-8-j61</link>
      <guid>https://forem.com/camunda/what-to-do-when-you-cant-quickly-migrate-to-camunda-8-j61</guid>
      <description>&lt;h4&gt;
  
  
  Managing a brownfield when you simply don’t have a green one
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://dev.to/mary_grace/camunda-platform-80-released-whats-new-l51-temp-slug-6751642"&gt;With Camunda Platform 8 out of the door&lt;/a&gt; now, I’ve been having frequent discussions around migration. Many of them go along the lines of: “We are invested in Camunda 7, including a lot of best practices, project templates, and even code artifacts. We can’t quickly migrate to Camunda 8, so what should we do now?” I call this a &lt;a href="https://en.wikipedia.org/wiki/Brownfield_(software_development)" rel="noopener noreferrer"&gt;brownfield&lt;/a&gt;. If you are in this situation, this blog post is for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Greenfield recommendation
&lt;/h3&gt;

&lt;p&gt;But let’s start with the easy things first. Let’s assume you just entered the world of process automation and orchestration with Camunda, and you’re starting from scratch. In this case, we strongly recommend starting with Camunda 8 right away, for example, using &lt;a href="https://docs.camunda.io/docs/components/best-practices/architecture/deciding-about-your-stack/#the-greenfield-stack" rel="noopener noreferrer"&gt;the Java greenfield stack&lt;/a&gt;: Java, Spring Boot, Spring Zeebe, and Camunda Platform 8 — SaaS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can’t use Camunda 8 just yet?
&lt;/h3&gt;

&lt;p&gt;But there are some edge cases where you might not want to use Camunda 8 right away. The typical reasons include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can’t leverage &lt;a href="https://camunda.com/get-started" rel="noopener noreferrer"&gt;Camunda 8 — SaaS&lt;/a&gt;, but also don’t have Kubernetes at your disposal to &lt;a href="https://docs.camunda.io/docs/self-managed/overview/" rel="noopener noreferrer"&gt;install the platform self-managed&lt;/a&gt;. While installing &lt;a href="https://docs.camunda.io/docs/self-managed/platform-deployment/local/" rel="noopener noreferrer"&gt;Camunda 8 on bare-metal or VMs&lt;/a&gt; is possible, it is also not super straightforward and might not be your choice if you have to set up many engines in a big organization that embraces microservices. Of course, you could probably leverage existing Infrastructure as Code (IaC) toolchains to ease this task (like Terraform or Ansible).&lt;/li&gt;
&lt;li&gt;You are missing a concrete feature because Camunda 8 needs to catch up on feature parity. The prime examples are around &lt;a href="https://docs.camunda.io/docs/components/modeler/bpmn/bpmn-coverage/" rel="noopener noreferrer"&gt;BPMN elements like compensation or conditions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You stick to a principle not to run x.0 software versions in production (while I do see the point here, I want to add that I don’t think this applies to Camunda 8.0. It is technically a Camunda Cloud 1.4 release with quite some people already in production with it).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Independent of the exact reason, this means that you should start on a greenfield with Camunda 7. It’s worth repeating that this should be an exception. In this case, the recommendation is to start with the latest &lt;a href="https://docs.camunda.io/docs/components/best-practices/architecture/deciding-about-your-stack-c7/#the-java-greenfield-stack" rel="noopener noreferrer"&gt;Camunda 7 greenfield stack&lt;/a&gt;: Camunda Run as a remote engine via Docker and &lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/" rel="noopener noreferrer"&gt;External Tasks&lt;/a&gt;. If you code in Java, your process solution stack will be Java, Spring Boot, and the &lt;a href="https://github.com/camunda-community-hub/camunda-engine-rest-client-java/" rel="noopener noreferrer"&gt;Camunda REST Client&lt;/a&gt;. If you program in other languages, you should simply leverage the &lt;a href="https://docs.camunda.org/manual/latest/reference/rest/" rel="noopener noreferrer"&gt;REST API&lt;/a&gt;. This is conceptually pretty close to a Camunda 8 architecture. Let’s call it the &lt;strong&gt;external task approach&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There is one downside of this stack, though — the Java developer experience is not as great as it is with Camunda 8. &lt;a href="https://dev.to/mary_grace/moving-from-embedded-to-remote-workflow-engines-1p35-temp-slug-1715226"&gt;Historically, Camunda users preferred embedded engines&lt;/a&gt; using &lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#java-delegate" rel="noopener noreferrer"&gt;Java Delegates&lt;/a&gt;. This stack offers a great experience for Java developers. Camunda Run does not offer that same level of developer experience, even though it has improved over the years. While this is normally not a real problem, it might decrease developer motivation around Camunda projects. So if this is a real problem in your context, it is worth going with the greenfield stack from some years ago: Java, Spring Boot, &lt;a href="https://github.com/camunda/camunda-bpm-platform/tree/master/spring-boot-starter" rel="noopener noreferrer"&gt;Camunda Spring Boot Starter&lt;/a&gt;, and &lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#java-delegate" rel="noopener noreferrer"&gt;Java Delegates&lt;/a&gt;. This stack is also &lt;a href="https://docs.camunda.io/docs/guides/migrating-from-camunda-platform-7/#process-solutions-using-spring-boot" rel="noopener noreferrer"&gt;mentioned as the example in our migration guide&lt;/a&gt;, as it is by far the most common Camunda 7 stack you’ll meet in the wild. Let’s call this the &lt;strong&gt;Java Delegate approach&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I see both approaches as valid choices. But, of course, if you start with Camunda 7 now, you need to think ahead and prepare for a future Camunda 8 migration. This is where the approaches differ; with Java Delegates, you have a harder time making sure to stick to what we call &lt;em&gt;Clean Delegates&lt;/em&gt;, as Java Delegates technically allow pretty dirty hacks. But there will be more on this later in this blog post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Greenfield recommendation summary
&lt;/h3&gt;

&lt;p&gt;So let’s quickly recap our recommendations so far:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Camunda Platform 8 — SaaS.&lt;/li&gt;
&lt;li&gt;If this is not possible, use Camunda Platform 8 — Self-Managed.&lt;/li&gt;
&lt;li&gt;If this is not possible, use Camunda Platform 7 Run and the external task approach.&lt;/li&gt;
&lt;li&gt;If this is not possible, use Camunda Platform 7 Spring Boot Starter, but implement &lt;em&gt;Clean Delegates.&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F371%2F1%2AkrQbPLkFELWeLSu1a0NsBQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F371%2F1%2AkrQbPLkFELWeLSu1a0NsBQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Brownfields
&lt;/h3&gt;

&lt;p&gt;Now let’s turn our attention back to the brownfield companies. In such situations, the company already uses Camunda 7 and will not migrate overnight to Camunda 8 (&lt;a href="https://docs.camunda.io/docs/guides/migrating-from-camunda-platform-7/#when-to-migrate" rel="noopener noreferrer"&gt;which neither makes sense nor is necessary&lt;/a&gt;). In an ideal world, you would simply start new projects with Camunda 8 and migrate your existing projects step by step over time. But often, it is not that easy.&lt;/p&gt;

&lt;p&gt;For example, your company might have invested a lot of effort into integrating Camunda 7 into its ecosystem. This goes far beyond the code of one process solution but includes best practices, examples, code snippets, reusable connectors, and many more. In such cases, you might still want to start new projects with Camunda 7 until you have a clear idea (and budget) of how to migrate all of those things.&lt;/p&gt;

&lt;p&gt;Or your project is already in-flight and will be finished better with Camunda 7. Or an initiative pops up to extend an existing Camunda 7 process solution, and you cannot make the migration to Camunda 8 part of that endeavor.&lt;/p&gt;

&lt;p&gt;In those cases, the typical question is, “Should we keep doing what we are doing, or should we quickly try to change our architecture to get closer to Camunda 8 already?”&lt;/p&gt;

&lt;p&gt;The short answer is to &lt;strong&gt;keep doing what you are doing&lt;/strong&gt;. This will make migration efforts easier at a later point in time, as you will have one common architecture to migrate. If you adjust your Camunda 7 architecture now, you might end up with two different architecture blueprints you need to migrate. Both external task and Java delegate approaches are OK!&lt;/p&gt;

&lt;p&gt;But you should make sure to establish some practices as quickly as possible that will ease migration projects later on. Those are described in the rest of this post. While external tasks might enforce some practices, &lt;em&gt;Clean Delegates&lt;/em&gt; are equally easy (or sometimes even easier) to migrate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practices to ease migration
&lt;/h3&gt;

&lt;p&gt;In order to implement Camunda 7 process solutions that can be easily migrated, you should stick to the following rules (that are good development practices you should follow anyway), which will be explained in more detail later:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Implement what we call Clean Delegates_ — _concentrate on reading and writing process variables, plus business logic delegation. Data transformations will be mostly done as part of your delegate (and especially not as listeners, as mentioned below). Separate your actual business logic from the delegates and all Camunda APIs. Avoid accessing the BPMN model and invoking Camunda APIs within your delegates.&lt;/li&gt;
&lt;li&gt;Don’t use listeners or Spring beans in expressions to do data transformations via Java code.&lt;/li&gt;
&lt;li&gt;Don’t rely on an ACID transaction manager spanning multiple steps or resources.&lt;/li&gt;
&lt;li&gt;Don’t expose Camunda API (REST or Java) to other services or front-end applications.&lt;/li&gt;
&lt;li&gt;Use primitive variable types or JSON payloads only (no XML or serialized Java objects).&lt;/li&gt;
&lt;li&gt;Use simple expressions or plug-in FEEL. FEEL is the only supported expression language in Camunda 8. JSONPath is also relatively easy to translate to FEEL. Avoid using special variables in expressions, e.g., &lt;code&gt;execution&lt;/code&gt; or &lt;code&gt;task&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use your own user interface or Camunda Forms; the other form mechanisms are not supported out-of-the-box in Camunda 8.&lt;/li&gt;
&lt;li&gt;Avoid using any implementation classes from Camunda; generally, those with *.impl.* in their package name.&lt;/li&gt;
&lt;li&gt;Avoid using engine plugins.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the moment, it might also be good to check the &lt;a href="https://docs.camunda.io/docs/components/modeler/bpmn/bpmn-coverage/" rel="noopener noreferrer"&gt;BPMN elements supported in Camunda 8&lt;/a&gt;, but this gap will most likely be closed soon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener" rel="noopener noreferrer"&gt;Execution Listeners&lt;/a&gt; and &lt;a href="https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener" rel="noopener noreferrer"&gt;Task Listeners&lt;/a&gt; are areas in Camunda 8 that are still under discussion. Currently, those use cases need to be solved slightly differently. Depending on your use case, the following Camunda 8 features can be used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input and output mappings using FEEL&lt;/li&gt;
&lt;li&gt;Tasklist API&lt;/li&gt;
&lt;li&gt;History API&lt;/li&gt;
&lt;li&gt;Exporters&lt;/li&gt;
&lt;li&gt;Client interceptors&lt;/li&gt;
&lt;li&gt;Gateway interceptors&lt;/li&gt;
&lt;li&gt;Job workers on user tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I expect to soon have a solution in Camunda 8 for most of the problems that listeners solve. Still, it might be good practice to use as few listeners as possible, and especially don’t use them for data mapping as described below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clean Delegates
&lt;/h3&gt;

&lt;p&gt;With Java Delegates and the workflow engine being embedded as a library, projects can do dirty hacks in their code. Casting to implementation classes? No problem. Using a ThreadLocal or trusting a specific transaction manager implementation? Yeah, possible. Calling complex Spring beans hidden behind a simple JUEL (Java unified expression language) expression? Well, you guessed it — doable!&lt;/p&gt;

&lt;p&gt;Those hacks are the real show stoppers for migration, as they simply cannot be migrated to Camunda 8. Actually, &lt;a href="https://dev.to/camunda/moving-from-embedded-to-remote-workflow-engines-5f9h"&gt;Camunda 8 increased isolation intentionally&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So you should concentrate on what a Java Delegate is intended to do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read variables from the process and potentially manipulate or transform that data to be used by your business logic.&lt;/li&gt;
&lt;li&gt;Delegate to business logic — this is where Java Delegates got their name from. In a perfect world, you would simply issue a call to your business code in another Spring bean or remote service.&lt;/li&gt;
&lt;li&gt;Transform the results of that business logic into variables you write into the process.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s an example of an ideal JavaDelegate:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href" rel="noopener noreferrer"&gt;https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you should never cast to Camunda implementation classes, use any ThreadLocal object, or influence the transaction manager in any way. Java Delegates should further always be stateless and not store any data in their fields.&lt;/p&gt;

&lt;p&gt;The resulting delegate can be easily migrated to a Camunda 8 API, or simply be reused by the &lt;a href="https://github.com/camunda-community-hub/camunda-7-to-8-migration/" rel="noopener noreferrer"&gt;adapter provided in this migration community extension&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  No transaction managers
&lt;/h3&gt;

&lt;p&gt;You &lt;a href="https://dev.to/camunda/achieving-consistency-without-transaction-managers-55kc"&gt;should not trust ACID transaction managers to glue together the workflow engine with your business code&lt;/a&gt;. Instead, you need to embrace eventual consistency and make every service task its own transactional step. If you are familiar with Camunda 7 lingo, this means that all BPMN elements will be async=true. A process solution that relies on five service tasks to be executed within one ACID transaction, probably rolling back in case of an error, will make migration challenging.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don’t expose Camunda API
&lt;/h3&gt;

&lt;p&gt;You should try to apply the &lt;a href="https://en.wikipedia.org/wiki/Information_hiding" rel="noopener noreferrer"&gt;information hiding principle&lt;/a&gt; and not expose too much of the Camunda API to other parts of your application.&lt;/p&gt;

&lt;p&gt;In the above example, you should not hand over an execution context to your CrmFacade, which is hopefully intuitive anyway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_// DO NOT DO THIS!_

crmFacade.createCustomer(execution);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same holds true for when a new order is placed, and your order fulfillment process should be started. Instead of the front-end calling the Camunda API to start a process instance, you are better off providing your own endpoint to translate between the inbound REST call and Camunda, like this for example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/45e3c7d97407716db6e53cfe7875e412/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/45e3c7d97407716db6e53cfe7875e412/href" rel="noopener noreferrer"&gt;https://medium.com/media/45e3c7d97407716db6e53cfe7875e412/href&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use primitive variable types or JSON
&lt;/h3&gt;

&lt;p&gt;Camunda 7 provides quite flexible ways to add data to your process. For example, you could add Java objects that would be serialized as byte code. Java byte code is brittle and also tied to the Java runtime environment. Another possibility is magically transforming those objects on the fly to XML using Camunda Spin. It turned out this was black magic and led to regular problems, which is why Camunda 8 does not offer this anymore. Instead, you should do any transformation within your code before talking to Camunda. Camunda 8 only takes JSON as a payload, which automatically includes primitive values.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://gist.github.com/berndruecker/dbc22c3bb92719be40d41bc9cbbb88d6" rel="noopener noreferrer"&gt;above example&lt;/a&gt;, you can see that Jackson was used in the delegate for JSON to Java mapping:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href" rel="noopener noreferrer"&gt;https://medium.com/media/14969fcfb5a201a3928afe44e1905193/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way, you have full control over what is happening, and such code is also easily migratable. And the overall complexity is even lower, as Jackson is quite known to Java people — a kind of de-facto standard with a lot of best practices and recipes available.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simple expressions and FEEL
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/" rel="noopener noreferrer"&gt;Camunda 8 uses FEEL as its expression language&lt;/a&gt;. There are big advantages to this decision. Not only are the expression languages between BPMN and DMN harmonized, but also the language is really powerful for typical expressions. One of my favorite examples is the following onboarding demo we regularly show. A decision table will hand back a list of possible risks, whereas every risk has a severity indicator (yellow, red) and a description.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2A1roHQ2SpVDuhjdnV" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2A1roHQ2SpVDuhjdnV"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result of this decision shall be used in the process to make a routing decision:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2ACHnRfoCIVQDPEm6Y" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2ACHnRfoCIVQDPEm6Y"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To unwrap the DMN result in Camunda 7, you could write some Java code and attach that to a listener when leaving the DMN task (this is already an anti-pattern for migration as you will read next). This code is not super readable:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/media/9a32a3c2263763b436ceee8e71fc237b/href" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://medium.com/media/9a32a3c2263763b436ceee8e71fc237b/href" rel="noopener noreferrer"&gt;https://medium.com/media/9a32a3c2263763b436ceee8e71fc237b/href&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With FEEL, you can evaluate that data structure directly and have an expression on the “red” path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;= some risk in riskLevels satisfies risk = "red"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Isn’t this a great expression? If you think, yes, and you have such use cases, you can even hook in FEEL as the scripting language in Camunda 7 today (as explained by &lt;a href="https://camunda.com/blog/2018/07/dmn-scripting/" rel="noopener noreferrer"&gt;Scripting with DMN inside BPMN&lt;/a&gt; or &lt;a href="https://camunda.com/blog/2020/05/camunda-bpm-user-task-assignment-based-on-a-dmn-decision-table/" rel="noopener noreferrer"&gt;User Task Assignment based on a DMN Decision Table&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;But the more common situation is that you will keep using JUEL in Camunda 7. If you write simple expressions, they can be easily migrated automatically, as you can see in &lt;a href="https://github.com/camunda-community-hub/camunda-7-to-8-migration/blob/main/modeler-plugin-7-to-8-converter/client/JuelToFeelConverter.test.js" rel="noopener noreferrer"&gt;the test case&lt;/a&gt; of the &lt;a href="https://github.com/camunda-community-hub/camunda-7-to-8-migration" rel="noopener noreferrer"&gt;migration community extension&lt;/a&gt;. You should avoid more complex expressions if possible. Very often, a good workaround to achieve this is to adjust the output mapping of your Java Delegate to prepare data in a form that allows for easy expressions.&lt;/p&gt;

&lt;p&gt;You should definitely avoid hooking in Java code during an expression evaluation. The above listener to process the DMN result was one example of this. But a more diabolic example could be the following expression in Camunda 7:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#{ dmnResultChecker.check( riskDMNresult ) }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the dmnResultChecker is a Spring bean that can contain arbitrary Java logic, possibly even querying some remote service to query whether we currently accept yellow risks or not (sorry, this is not a good example). Such code can not be executed within Camunda 8 FEEL expressions, and the logic needs to be moved elsewhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Camunda Forms
&lt;/h3&gt;

&lt;p&gt;Finally, while Camunda 7 supports &lt;a href="https://docs.camunda.org/manual/latest/user-guide/task-forms/" rel="noopener noreferrer"&gt;different types of task forms&lt;/a&gt;, Camunda 8 only supports &lt;a href="https://docs.camunda.io/docs/guides/utilizing-forms/#configuration" rel="noopener noreferrer"&gt;Camunda Forms&lt;/a&gt; (and will actually be extended over time). If you rely on other form types, you either need to make Camunda Forms out of them or use a bespoke tasklist where you still support those forms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;In today’s blog post, I wanted to show you which path to take if Camunda 8 is not yet an option for you. In summary, it’s best you keep doing what you’re already doing. This normally means leveraging the external task approach or the Java Delegate approach. Both options are OK.&lt;/p&gt;

&lt;p&gt;With Java Delegates, you have to be very mindful to avoid hacks that will hinder a migration to Camunda 8. This article sketched the practices you should stick to in order to make migration easier whenever you want to do it, which is mostly about writing clean delegates, sticking to common architecture best practices, using primitive values or JSON, and writing simple expressions.&lt;/p&gt;

&lt;p&gt;As always, I am happy to hear your feedback or &lt;a href="https://forum.camunda.io/" rel="noopener noreferrer"&gt;discuss any questions you might have&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://berndruecker.io/" rel="noopener noreferrer"&gt;Bernd Ruecker&lt;/a&gt; is co-founder and chief technologist of C&lt;a href="http://camunda.com/" rel="noopener noreferrer"&gt;amunda&lt;/a&gt; as well as the author of&lt;a href="https://processautomationbook.com/" rel="noopener noreferrer"&gt;Practical Process Automation with O’Reilly&lt;/a&gt;. He likes speaking about himself in the third person. He is passionate about developer-friendly process automation technology. Connect via&lt;a href="https://www.linkedin.com/in/bernd-ruecker-21661122/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or follow him on&lt;a href="http://twitter.com/berndruecker/" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; As always, he loves getting your feedback. Comment below or&lt;a href="http://bernd.ruecker@camunda.com" rel="noopener noreferrer"&gt;send him an email&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>camunda8</category>
      <category>migration</category>
      <category>camunda</category>
    </item>
    <item>
      <title>How Open is Camunda Platform 8?</title>
      <dc:creator>Bernd Ruecker</dc:creator>
      <pubDate>Wed, 25 May 2022 14:59:19 +0000</pubDate>
      <link>https://forem.com/camunda/how-open-is-camunda-platform-8-196e</link>
      <guid>https://forem.com/camunda/how-open-is-camunda-platform-8-196e</guid>
      <description>&lt;p&gt;With &lt;a href="https://dev.to/mary_grace/camunda-platform-80-released-whats-new-l51-temp-slug-6751642"&gt;Camunda Platform 8 being available to the public&lt;/a&gt;, we regularly answer questions about our open source strategy and the licenses for its various components. Let’s sort this out in today’s blog post by looking at the specifics of the components, sketching a path to put Camunda 8 into production without the need to pay us any money, and the difference between open source and source-available licenses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Component overview
&lt;/h3&gt;

&lt;p&gt;Let’s look at the various &lt;a href="https://docs.camunda.io/docs/components/"&gt;components that make up Camunda Platform 8&lt;/a&gt;. The following illustration colors the components according to their license:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Green&lt;/strong&gt; : Open source license.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Green stripes&lt;/strong&gt; : Source-available license (for the curious, the difference between open source and source-available is explained below, for most people, there is no real difference).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue&lt;/strong&gt; : This software is available but only free for non-production use. If you want to put these components into production, you will need to buy a license (via enterprise subscription) from Camunda.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Red&lt;/strong&gt; : This software is only available within Camunda Platform 8 — SaaS and can’t be run self-managed. &lt;strong&gt;Note:&lt;/strong&gt; This is subject to change, and some of the red components should turn blue over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VIowm1Dx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/831/0%2AOU2RxW1hNr3mReuF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VIowm1Dx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/831/0%2AOU2RxW1hNr3mReuF.png" alt="" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The short summary is that you can run everything &lt;strong&gt;green&lt;/strong&gt; (including green stripes) as &lt;a href="https://docs.camunda.io/docs/self-managed/overview/"&gt;self-managed&lt;/a&gt; in production without needing a license. The green components are open source, as coined by the &lt;a href="https://opensource.org/licenses"&gt;Open Source Initiative&lt;/a&gt;. The striped components use a source-available license. Regarding Zeebe, this is the &lt;a href="https://camunda.com/blog/2019/07/introducing-zeebe-community-license-1-0/"&gt;Zeebe Community License v1.0&lt;/a&gt;. It is based on the very liberal open source &lt;a href="https://opensource.org/licenses/MIT"&gt;MIT license&lt;/a&gt; but with one restriction — users are &lt;strong&gt;not&lt;/strong&gt; allowed to use the components for providing a commercial workflow service in the cloud. This is typically not a limitation for any of our existing customers, users, or prospects. If you want to know more about open source licensing, visit &lt;a href="https://camunda.com/blog/2019/07/zeebe-community-license/"&gt;Why We Created The Zeebe Community License&lt;/a&gt; and &lt;a href="https://camunda.com/legal/terms/cloud-terms-and-conditions/zeebe-license-overview-and-faq/"&gt;Zeebe License Overview and FAQ&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Furthermore, you can run all the &lt;strong&gt;blue&lt;/strong&gt; components during development and testing. This not only allows you to try them out but will help you with your development efforts. If you want to keep using them while going into production, you will need to buy a license from Camunda. Later in this blog post, I will explain how you can go live without those components, as there is a possible path.&lt;/p&gt;

&lt;p&gt;Now, let’s quickly look at a typical question in this context: why are the blue boxes not available for production, even in a limited version?&lt;/p&gt;

&lt;h3&gt;
  
  
  Why free for non-production and not open core?
&lt;/h3&gt;

&lt;p&gt;With Camunda Platform 7, we have an open core model where parts of the components are available open source, and the full-feature set is only available to you if you buy an enterprise subscription. So for example, the basic tier of Camunda Cockpit allows you to see running instances in open source, but only the Enterprise Edition of Camunda Cockpit shows the historical data and provides the full-feature set.&lt;/p&gt;

&lt;p&gt;While this looks good at first glance, it actually adds a lot of friction and confusion for our users. First, they have to understand the feature differences in detail. Second, most people even miss that there is a more powerful version of Cockpit available, leading them to redevelop features that are already there. And finally, even if the customer’s team requires the power of the Enterprise Edition of Cockpit, selling the license is hard in situations where decision-makers might not care enough about the daily friction of operations to spend the money. In other words, our power users often want an Enterprise license and have a good business case for it but are still let down by their decision-makers.&lt;/p&gt;

&lt;p&gt;This is why we made the whole model radically simpler. You can have all the tools with all the features during development without any fluff. Everything is easily accessible (&lt;a href="https://hub.docker.com/u/camunda"&gt;available on DockerHub&lt;/a&gt;, for example), can help you learn Camunda, and speed up development. For example, Camunda Operate (the Cockpit equivalent in Camunda 8) helps you to understand what’s going on in your workflow engine, especially when you are new and start developing.&lt;/p&gt;

&lt;p&gt;You will only need to buy a license when you put it into production. But the argument for the Enterprise Edition is now very simple to understand — without it, you can’t use those productivity tools. So far, our users are actually pretty happy about that change, as it makes it easier for them to ask for the necessary budget.&lt;/p&gt;

&lt;p&gt;If for whatever reason your company doesn’t want to pay for the Enterprise Edition, there is still a way to production, as described below. However, it is less convenient and involves more work for you. Whether this is worth saving the subscription money is your company’s decision.&lt;/p&gt;

&lt;p&gt;We believe this model has a very good balance of interests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, you can easily start developing process solutions with Camunda Platform 8, but also run severe workloads in production with a completely source-available stack.&lt;/li&gt;
&lt;li&gt;Second, there is sufficient motivation to pay for the additional software, which guarantees that Camunda will stick around.&lt;/li&gt;
&lt;li&gt;Third, this allows Camunda to stay focused and continue to invest in great software and the community.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How SaaS changes the game
&lt;/h3&gt;

&lt;p&gt;So far, we’ve talked about self-managed installations. Somehow, this still seems to be the default in the heads of most people. They want to download and run the software, but this is changing. When you really think about it, you don’t want software — you want some service or feature the software is delivering. This is what cloud and SaaS (software as a service) provide. With Camunda 8, we introduced our &lt;a href="https://camunda.com/pricing/"&gt;own SaaS offering&lt;/a&gt;, where you can completely consume it in the cloud.&lt;/p&gt;

&lt;p&gt;Now, this changes one important aspect — you have to be clear if you’re searching for open source or something that is &lt;strong&gt;free to use&lt;/strong&gt;. And most people actually search for the latter, which can also be delivered without open source.&lt;/p&gt;

&lt;p&gt;So with Camunda Platform 8 — SaaS, the equivalent of a Community Edition is a free tier, where users can use the service (within certain boundaries) without generating any bills. As I’m writing this blog post, we are working to extend our free tier with Camunda 8. The current situation is that you can already have a &lt;a href="https://camunda.com/pricing/"&gt;&lt;strong&gt;free plan for modeling&lt;/strong&gt;&lt;/a&gt; use cases. And we are &lt;strong&gt;working on a free tier to support execution&lt;/strong&gt; use cases, but still have to work out some details. In contrast to providing a Community Edition for download, every running cluster in the cloud adds up on our own GCP bill, so we have to be diligent about it.&lt;/p&gt;

&lt;p&gt;In general, I expect a big mindset shift over the next few years in this regard. Users will mostly consume SaaS services, and having a free tier will be more important to them than software being open source.&lt;/p&gt;

&lt;p&gt;At this point, I want to add one important side note — our SaaS focus will not mean that our open source commitment will be weakened, on the contrary. We have a big group of passionate people in our community that do miracles for us, and we continuously increase our investment in the community.&lt;/p&gt;

&lt;p&gt;Camunda 8 has all the key ingredients to make a vital &lt;a href="https://camunda.com/developers/community/"&gt;open source community&lt;/a&gt; work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The source code for core components is available.&lt;/li&gt;
&lt;li&gt;Code, issues, and discussions live in the open on GitHub. The frequent pull requests to our documentation are great examples of this.&lt;/li&gt;
&lt;li&gt;Extension points allow community contributions.&lt;/li&gt;
&lt;li&gt;Frequent meetups, talks, and blog posts.&lt;/li&gt;
&lt;li&gt;A great developer relations team that deeply cares about the community.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A path to production with source-available software
&lt;/h3&gt;

&lt;p&gt;Let’s come back to self-managed software and sketch a path to production that neither requires a commercial license nor breaks any license agreements. For production, this basically comes down to using only the source-available parts of Camunda 8:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--43Kc_BDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/797/0%2AbtxqJ5cln3p0KHbC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--43Kc_BDo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/797/0%2AbtxqJ5cln3p0KHbC.png" alt="" width="797" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, you will need to find solutions to replace the tools you cannot use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tasklist&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You will need to implement your own task management solution based on using workers subscribing to Zeebe &lt;a href="https://docs.camunda.io/docs/components/modeler/bpmn/user-tasks/"&gt;as described in the docs&lt;/a&gt;. That also means you have to build your own persistence to allow task queries, as the &lt;a href="https://docs.camunda.io/docs/apis-clients/tasklist-api/overview/"&gt;Tasklist API&lt;/a&gt; is part of the Tasklist component and is not free for production use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Operate is the component you will miss most, as you typically want to gain a clear understanding of what is going on in your workflow engine and take corrective actions.&lt;/p&gt;

&lt;p&gt;For looking at data, you can access it in Elastic (check the &lt;a href="https://github.com/camunda/zeebe/tree/main/exporters/elasticsearch-exporter"&gt;Elastic Exporter&lt;/a&gt; for details), leverage the &lt;a href="https://docs.camunda.io/docs/self-managed/zeebe-deployment/operations/metrics/"&gt;metrics&lt;/a&gt;, or build your &lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/architecture/#exporters"&gt;own exporters&lt;/a&gt; to push it to some data storage component that is convenient for you. Exporters can also filter or pre-process data on the fly. It is worth noting that the &lt;a href="https://docs.camunda.io/docs/apis-clients/operate-api/"&gt;Operate data pre-processing logic backing the History API&lt;/a&gt; is part of Operate and not free for production use.&lt;/p&gt;

&lt;p&gt;For influencing process instances (like canceling them), you can use the existing &lt;a href="https://docs.camunda.io/docs/apis-clients/grpc/"&gt;Zeebe API&lt;/a&gt;, which is also exposed as the &lt;a href="https://docs.camunda.io/docs/apis-clients/cli-client/"&gt;command-line tool zbctl&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This flexibility allows you to hook functionality into your own front-ends. Of course, this takes effort, but it is definitely possible, and we know of users that have done it. As already mentioned, you should contrast that effort with the costs of the license.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimize&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Optimize is hard to replace because it goes quite deep into process-based analytics, which is hard to build on your own. If you can’t use Optimize, the closest you might get to it is by adding your &lt;a href="https://docs.camunda.io/docs/components/zeebe/technical-concepts/architecture/#exporters"&gt;own exporters&lt;/a&gt; to push the data to an existing general-purpose BI (Business Intelligence), DWH (Data Warehouse), or data lake solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this blog post, I wanted to make it very clear what components of the Camunda 8 stack are open source (or source-available) and which are not free for production use. I gave some pointers to go into production with a pure source-available stack but also tried to explain the efforts that might require, which is, of course, the upselling potential the company needs. I hope this was understandable, and I’m happy to discuss this in &lt;a href="https://forum.camunda.io/"&gt;the Camunda forum&lt;/a&gt; in case there are open questions.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://berndruecker.io/"&gt;Bernd Ruecker&lt;/a&gt; is co-founder and chief technologist of C&lt;a href="http://camunda.com/"&gt;amunda&lt;/a&gt; as well as the author of&lt;a href="https://processautomationbook.com/"&gt;Practical Process Automation with O’Reilly&lt;/a&gt;. He likes speaking about himself in the third person. He is passionate about developer-friendly process automation technology. Connect via&lt;a href="https://www.linkedin.com/in/bernd-ruecker-21661122/"&gt;LinkedIn&lt;/a&gt; or follow him on&lt;a href="http://twitter.com/berndruecker/"&gt;Twitter&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; As always, he loves getting your feedback. Comment below or&lt;a href="http://bernd.ruecker@camunda.com"&gt;send him an email&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>opensource</category>
      <category>camunda</category>
    </item>
    <item>
      <title>Implementing My Fire Service Notification System with Camunda Platform 8</title>
      <dc:creator>Thomas Heinrichs</dc:creator>
      <pubDate>Thu, 21 Apr 2022 23:00:00 +0000</pubDate>
      <link>https://forem.com/camunda/implementing-my-fire-service-notification-system-with-camunda-platform-8-3op2</link>
      <guid>https://forem.com/camunda/implementing-my-fire-service-notification-system-with-camunda-platform-8-3op2</guid>
      <description>&lt;p&gt;When working as a volunteer in the fire brigade, you can be called for service at any given moment — no matter the time or day. In my village, I’m alerted about 80 to 90 times a year. If an emergency happens, it’s important to be fast. You need to leave the house and get into your car right away to show up at the fire station in time. This is even more important if the alert gives you an indication that lives are in danger. &lt;/p&gt;

&lt;p&gt;Since the pandemic started, the work habits of many people have changed. One significant change is that working from home has become the new normal. That’s a great change for the fire brigade since more people are now accessible in case of an emergency. But what does this mean for the actual firefighters working from home?  &lt;/p&gt;

&lt;p&gt;Usually, they don’t have the opportunity to properly sign off from work when called for duty. That’s why I came up with the idea to build a fire service notification system using BPMN and Camunda Platform 8 that automatically informs all relevant stakeholders as soon as an emergency happens. &lt;/p&gt;

&lt;h2&gt;
  
  
  Starting with a Process
&lt;/h2&gt;

&lt;p&gt;Before starting any implementation, I always visualize an ideal process for what I want to build. A benefit of this approach is that I can reuse the model as a basis for directly executing it within a process. &lt;/p&gt;

&lt;p&gt;To visualize the process for the fire service notification system, I am going to use the business process model and notation (BPMN) 2.0 standard. For those who don’t know yet, BPMN provides the capability to model processes in a graphical notation and execute modeled processes. With &lt;a href="https://modeler.cloud.camunda.io/"&gt;Camunda Platform 8 Modeler&lt;/a&gt;, I can now collaboratively design this process by following the standard. Check out &lt;a href="https://modeler.cloud.camunda.io/share/360212b5-ab81-439b-9c22-48cf1238985d"&gt;my model&lt;/a&gt; in this tool and see the diagram I created below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jyOWLayy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notifications-in-Camunda-Platform-8-image-1-1-1024x251.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jyOWLayy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notifications-in-Camunda-Platform-8-image-1-1-1024x251.png" alt="" width="800" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s quickly go over the fire service notification process: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First of all, a message event is sent after I press a physical buzzer. &lt;/li&gt;
&lt;li&gt;This will trigger a business rule task that decides which stakeholders to notify — my family or co-workers. That should prevent my co-workers from being alerted that I am on fire service in the middle of the night. &lt;/li&gt;
&lt;li&gt;Afterward, I’ll note the starting time and date of the emergency. &lt;/li&gt;
&lt;li&gt;Then, all relevant stakeholders will be notified, depending on my decision in step 2. The cool thing is that I can parallelize sending out my messages via Slack, SMS, and Mail. &lt;/li&gt;
&lt;li&gt;I’m now halfway through the process! It will wait and only continue when I’m back from duty and trigger the buzzer again.
&lt;/li&gt;
&lt;li&gt;The time spent on service needs to be calculated before alerting all relevant stakeholders that I am back to work again. (In Germany it’s quite important for the employer to have this piece of information in order to get compensated by the government.)&lt;/li&gt;
&lt;li&gt;Before the process ends, all relevant parties will be notified that I am back again. Of course, this will be parallelized, and who gets notified will depend on the time and date.&lt;/li&gt;
&lt;li&gt;Lastly, the end event signifies that the notifications have been successfully sent.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Let’s Talk About Decisions
&lt;/h2&gt;

&lt;p&gt;As mentioned in the previous section, I need to use a business rule task to decide whether I’m going to notify work-related stakeholders or not — depending on the time and day. Using the DMN standard makes it possible to easily create this decision without adding too much complexity to the overall process. This allows it to be easily understood and modified by non-coders, which is beneficial for me when I need to explain this to my family. &lt;/p&gt;

&lt;p&gt;For example, I went with the decision in the model below. I need two input parameters for the time and weekday of the emergency. This determines whether to notify all stakeholders or just my family. The &lt;em&gt;Notification Scope&lt;/em&gt; maps to a process variable and is used in the exclusive gateways to make a decision.&lt;/p&gt;

&lt;p&gt;For example, if an emergency happens on Wednesday at 2 p.m., I’m going to notify “all” stakeholders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DVodslyR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fireservice-Notfiication-System-for-Camunda-Platform-8-image-2-1024x218.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DVodslyR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fireservice-Notfiication-System-for-Camunda-Platform-8-image-2-1024x218.png" alt="" width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out this &lt;a href="https://camunda.com/dmn/"&gt;DMN tutorial&lt;/a&gt; to learn more about the benefits of the DMN standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  It’s Coding Time!
&lt;/h2&gt;

&lt;p&gt;The process and decision are set — now it’s time to code the solution. To code the solution, I will use a workflow engine because it can directly execute the models from above. Now, you may ask yourself, “why use a process engine at all?” The easy answer is: because it gives you more flexibility! Adding steps to the process doesn’t affect your already existing code. It also helps you gain transparency into what your software is doing at a certain point in time. &lt;/p&gt;

&lt;p&gt;I’m going to use &lt;a href="https://camunda.com/products/cloud/"&gt;Camunda Platform 8 SaaS&lt;/a&gt; as an orchestrator. By using this SaaS solution, I don’t need to take care of hosting a workflow engine on my own hardware. It also provides me with all the tools I need to operate and analyze my process. With my process and decision models deployed, I can now focus on writing a Spring Boot application that contains code I need on top of the process model — basically, some glue code to integrate with an SMTP server, Slack, and Twilio.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I’ll begin with creating a new Spring Boot project and adding the &lt;a href="https://github.com/camunda-community-hub/spring-zeebe"&gt;Spring-Zeebe dependency&lt;/a&gt;, which encapsulates the logic to connect to the engine. It also makes sure that I’m  properly authenticated while establishing a connection to the remote workflow engine. To do so, I’ll add this maven dependency to my ‘&lt;em&gt;pom.xml&lt;/em&gt;’:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;io.camunda&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;spring-zeebe-starter&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.3.4&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Then, I’ll implement ‘&lt;em&gt;ZeebeWorker&lt;/em&gt;’ inside my main class. Besides using the ‘&lt;em&gt;@SpringBootApplication&lt;/em&gt;’ annotation, I also need ‘&lt;em&gt;@EnableZeebeClient&lt;/em&gt;’. I can write a worker, as shown below. I’ll add the ‘&lt;em&gt;@ZeebeWorker&lt;/em&gt;’ annotation and specify the connection to the service task in the BPMN model by the task type:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@ZeebeWorker(type = "capture_time_worker")
public void handleJob_capture_time(final JobClient client, final ActivatedJob job) {
  // call business logic to get current time 
  client.newCompleteCommand(job.getKey())
         .variables("{\"startingTime\":"+ "\""+ time +"\"}")
         .send()
   .exceptionally( throwable -&amp;gt; { throw new RuntimeException("Could not complete job " + job, throwable); });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;This code snippet was used in my first service task that sets the starting time of the fire service. I can call whichever business logic I’d  like and set variables within the ‘&lt;em&gt;newCompleteCommand&lt;/em&gt;’. The variables can be received by using ‘job.getVariablesAsMap().get(“”)’. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I need some more workers for sending an email, posting a Slack update, sending an SMS &lt;strong&gt;,&lt;/strong&gt; and calculating the time difference between the beginning and end of the fire service. These look very similar to what we have seen above, and just differ in terms of the business logic/variables retrieved and passed to the process instance. For example, the code for sending an email could look like &lt;a href="https://www.baeldung.com/java-email#sending-a-plain-text-and-an-html-email"&gt;this&lt;/a&gt; and will be called from the worker.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, I’m good to test since all these things have been implemented.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the Process
&lt;/h2&gt;

&lt;p&gt;For the sake of simplicity, I’m not going to discuss how to build an IoT buzzer. For my purposes, I’ve chosen a pre-built WiFi button from mystorm. It’s battery-powered, magnetic, and fits perfectly into my apartment. Since the button is programmable, it can easily call and start my process instance by making an HTTP call. Below you can see a picture of it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gqt9eE5c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notifications-for-Camunda-Platform-8-image-3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gqt9eE5c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notifications-for-Camunda-Platform-8-image-3.jpg" alt="" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To test this process, I’m going to start an instance and hand over some variables (e.g., email, SMS, and Slack recipients, as well as the name of the person who is leaving for fire service). This can be easily achieved by using this &lt;a href="https://github.com/NPDeehan/camunda8-visual-helper"&gt;visual helper tool&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Having started a process instance, I have the option to check on the instance’s lifecycle by using &lt;a href="https://camunda.com/products/cloud/operate/"&gt;Operate&lt;/a&gt;. This tool provides real-time visibility to monitor, analyze, and resolve problems. This is also great if something abnormal occurs. For example, imagine Twilio gives me an exception, then Operate will show me this problem as visualized in the picture below. The tool gives me the ability to check the stack trace and do some lightweight troubleshooting right away. If I would need to fix something in my code base, I could retrigger the process from this monitoring tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ofv9dw9K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-in-Camunda-Paltform-8-image-4-942x1024.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ofv9dw9K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-in-Camunda-Paltform-8-image-4-942x1024.png" alt="" width="800" height="870"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The image below demonstrates how the instance would look if everything has been executed properly. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jQlriPNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-for-Camunda-Platform-8-image-5-924x1024.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jQlriPNs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-for-Camunda-Platform-8-image-5-924x1024.png" alt="" width="800" height="887"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another great feature in Operate includes checking on all the variables of your process instance. That gives you powerful insight and is a nice way to change their values if they’re causing havoc. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n4DVMc47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-Service-for-Camunda-Platform-8-image-6-1024x321.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n4DVMc47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-Service-for-Camunda-Platform-8-image-6-1024x321.png" alt="" width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;Since the process is working as expected, the first milestone has been achieved. Designing the process and developing the integrations was rather straightforward using Camunda Platform 8 SaaS. Here are some of the notifications sent to various channels below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tKgDXxN2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-for-Camunda-Platform-8-image-8-1024x145.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tKgDXxN2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-System-for-Camunda-Platform-8-image-8-1024x145.png" alt="" width="800" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iIKXLBfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-for-Camunda-Platform-8-image-7-1024x751.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iIKXLBfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://camunda.com/wp-content/uploads/2022/04/Fire-Service-Notification-for-Camunda-Platform-8-image-7-1024x751.png" alt="" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though this is not a typical use case for Camunda Platform 8, I’ll be running a few process instances this year. Nevertheless, it’s interesting to play around with this technology and demonstrate it’s potential in such a way. And who knows, maybe I’ll onboard some fellow firefighters to this tool as well. In such a case, I’m confident that Camunda Platform 8 can handle the load. &lt;/p&gt;

&lt;p&gt;In addition, the workflow engine provided me with a lot of flexibility during development. During operation, I made use of automatic retry cycles that made sure my employer got the message. This automation will prove its benefits once an actual emergency happens. Feel free to check out the source code on &lt;a href="https://github.com/Hafflgav/firebrigade-notification-system"&gt;GitHub&lt;/a&gt; to create a similar automation for your own needs. &lt;/p&gt;

&lt;p&gt;An interesting follow up to this blog post would be analyzing this process in &lt;a href="https://camunda.com/products/camunda-platform/optimize/"&gt;Camunda Optimize&lt;/a&gt;, a tool for creating reports and analyzing processes. Maybe I can find some interesting correlations between the type of emergency and duration. Stay tuned! &lt;/p&gt;

&lt;p&gt;If you want to check out the talk I gave about this topic during the Camunda Community Summit ‘22 check out the demand content. Many other interesting talks are also available for free - so it is definitely worth checking out. Follow me on Twitter if you want to stay updated on upcoming events and workshops. &lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://camunda.com/blog/2022/04/implementing-my-fire-service-notification-system-with-camunda-platform-8/"&gt;Implementing My Fire Service Notification System with Camunda Platform 8&lt;/a&gt; appeared first on &lt;a href="https://camunda.com"&gt;Camunda&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>processautomation</category>
      <category>processorchestration</category>
      <category>bpmn</category>
    </item>
  </channel>
</rss>
