<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[kie-tooling - Medium]]></title>
        <description><![CDATA[Tooling Team from kie.org - Medium]]></description>
        <link>https://medium.com/kie-foundation?source=rss----3909e0c06a69---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>kie-tooling - Medium</title>
            <link>https://medium.com/kie-foundation?source=rss----3909e0c06a69---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:47:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/kie-foundation" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[We have a new home: blog.kie.org]]></title>
            <link>https://medium.com/kie-foundation/we-have-a-new-home-blog-kie-org-f7d243b306a3?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/f7d243b306a3</guid>
            <category><![CDATA[drools]]></category>
            <category><![CDATA[jbpm]]></category>
            <category><![CDATA[ky]]></category>
            <dc:creator><![CDATA[Eder Ignatowicz]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 19:37:39 GMT</pubDate>
            <atom:updated>2020-11-13T19:42:52.512Z</atom:updated>
            <content:encoded><![CDATA[<p>We would like to announce that we have a new home: <a href="https://blog.kie.org/">blog.kie.org</a> . From now on, this medium blog is decommissioned and we will publish the tooling news and blog posts on KIE blog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4PrLoJp424YJk7bbGeISBA.png" /></figure><p>This blog is an aggregation of all content related to the KIE Group. You can find all Tooling posts under the &#39;<a href="https://blog.kie.org/category/tools">Tools</a>&#39; category.</p><p>See you there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7d243b306a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/we-have-a-new-home-blog-kie-org-f7d243b306a3">We have a new home: blog.kie.org</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kogito Tooling 0.7.0 Released!]]></title>
            <link>https://medium.com/kie-foundation/kogito-tooling-0-7-0-released-abf97397ea09?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/abf97397ea09</guid>
            <category><![CDATA[kogito]]></category>
            <category><![CDATA[jbpm]]></category>
            <category><![CDATA[business-central]]></category>
            <category><![CDATA[drools]]></category>
            <dc:creator><![CDATA[Eder Ignatowicz]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 21:20:06 GMT</pubDate>
            <atom:updated>2020-10-14T21:18:57.386Z</atom:updated>
            <content:encoded><![CDATA[<p>We just launched a fresh new Kogito Tooling release! 🎉</p><p>On the 0.7.0 <a href="https://github.com/kiegroup/kogito-tooling/releases/tag/0.7.0">release</a>, we made a lot of improvements and bug fixes. This post will do a quick overview of those. I hope you enjoy it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UI8fUOgjlvJr6Zd5" /></figure><h3>Backend support on Kogito Tooling</h3><p>We introduced Backend support on Kogito Tooling. Developers can now augment their editors&#39; capabilities by connecting backend services through an infrastructure included in Kogito Tooling.</p><p>Lots of possibilities of executing code outside the client are enabled/facilitated with this new infrastructure, such as calling a java local backend service, reaching an HTTP endpoint, triggering a command in the terminal, to name a few.</p><p>Soon, this infrastructure will allow many new use cases, including auto-complete via Java Language Server, DMN/BPMN validations, Scenario Simulation executions, etc.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqQkU5H-HTFE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqQkU5H-HTFE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqQkU5H-HTFE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8bd6cabefb9c1e537620309b5e352e4/href">https://medium.com/media/d8bd6cabefb9c1e537620309b5e352e4/href</a></iframe><p>See full details of this important innovation in this blog <a href="https://medium.com/kie-foundation/backend-support-on-kogito-tooling-8be682a60b88">post</a> from Guilherme Caponetto.</p><h3>DMN — Read-Only mode</h3><p>We introduced a read-only version of our DMN Editor that will be really useful during PR reviews and also in your future embedded editors. Take a look at this feature on our <a href="https://chrome.google.com/webstore/detail/mgkfehibfkdpjkfjbikpchpcfimepckf/publish-accepted?hl=en">chrome extension</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tZPGl7w_qwL-ovva" /></figure><h3>DMN — Multiples Decision Requirement Diagrams</h3><p>On 0.7.0, we are also introducing a tech preview support for Multiple DRDs. For complex DMN models, you can now use the DMN modeler to design multiple DMN decision requirements diagrams (DRDs) representing parts of the overall decision requirements graph (DRG) for a DMN decision model.</p><p>This improvement enables you to better organize DMN decision models with many decision requirements by dividing the model into smaller nested DRDs.</p><p>Check <a href="http://karreiro.com/2020/10/13/dmn-editor-supports-multiple-diagrams-now.html">this post</a> to understand this feature in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BBUCIY_3ritMLMeE" /></figure><p>Notice: in some use cases, when your DMN model contains multiple decision requirements diagrams, you may face some validation errors that prevent the execution. You can put the kogito.decisions.validation=DISABLED property into the application.properties to disable model validation and successfully execute the model. This issue won’t be present on Kogito Tooling 0.7.1 (end of October) — <a href="https://issues.redhat.com/browse/KOGITO-3571">KOGITO-3571</a>.</p><h3>DMN — PMML support</h3><p>We also added on DMN Editor, a new feature that enables PMML file imports inside DMN Editor. In a similar way we import external DMN files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3_PSIxDh2AoUJX84" /></figure><p>A PMML file can be linked to a DMN file using the “Included Model” tab. Pressing the Include Model button, a popup with a selection box containing all PMML and DMN files inside the same directory of the opened DMN file should appear.</p><h3>BPMN — Script Syntax Highlight</h3><p>The process designer now provides <em>syntax highlighting</em> and <em>error checking</em> capabilities when working with <em>scripts</em>, for example, in the case of a <em>Script Task</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*-tAtoSL3tzrFgNzS" /></figure><h3>BPMN &amp; DMN — Inline Text Editing</h3><p>Node name editing has been made more fluid with the new <em>Inline Editor</em>. It is possible to edit text directly on the nodes without floating boxes or confirmation buttons by double-clicking any node. For applying changes just hit <em>“Enter”</em> or click outside of the node and for canceling hit <em>“Esc”</em>, while editing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*F5fdDZDPh9Hdura-" /></figure><h3>Fixed issues and improvements</h3><p>We also made a lot of refactorings and improvements, especially to allow our internal APIs’ extendability.</p><h4>Infrastructure</h4><ul><li>[<a href="https://issues.redhat.com/browse/KOGITO-3313">KOGITO-3313</a>]: Fix on filename change</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3326">KOGITO-3326</a>]: Enable EmbeddedEditor to support an update on the StateControl instance</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3417">KOGITO-3417</a>]: EditorEnvelopeView reference should be get with a function to be updated</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-1508">KOGITO-1508</a>]: Implement selenium test for kogito-bpmn in community</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-1517">KOGITO-1517</a>]: Improve accessibility on file with unsupported extension error</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3042">KOGITO-3042</a>]: Replace MessageBusClient with proxified version of ApiToConsume</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3043">KOGITO-3043</a>]: Provide locale information in a way that GWT can read</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3056">KOGITO-3056</a>]: Move I18nService and and its Envelope/Channel APIs to its own module</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3057">KOGITO-3057</a>]: Add a initialLocale prop on I18nDictionariesProvider</li></ul><h4>Editors</h4><ul><li>[<a href="https://issues.redhat.com/browse/KOGITO-2060">KOGITO-2060</a>]: [Test Scenario Editor] Order of facts of Test Tools in Kogito and BC is different</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-1716">KOGITO-1716</a>]: [Test Scenario Editor] Show warning if user opens scesim file for rule based test scenario in VSCode</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3155">KOGITO-3155</a>]: [Test Scenario Editor] Test DMN model including PMML</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3153">KOGITO-3153</a>]: [DMN Designer] PMML support — run via Quarkus</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-543">KOGITO-543</a>]: [DMN Designer] Read Only mode</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-2664">KOGITO-2664</a>]: [DMN Designer] Multiple DRDs support</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3419">KOGITO-3419</a>]: [DMN Designer] None example of importing models in kie-dmn-core opens in editor</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3504">KOGITO-3504</a>]: Interrogation mark cannot be used on new inline editor</li></ul><h4>VS Code</h4><ul><li>[<a href="https://issues.redhat.com/browse/KOGITO-3314">KOGITO-3314</a>]: Broken link on popup due to circular dependency issue</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-2984">KOGITO-2984</a>]: Use i18n dictionaries on VS Code extension backend</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-3205">KOGITO-3205</a>]: Create test runner service running on the backend infra</li></ul><h4>Business Modeler Preview</h4><ul><li>[<a href="https://issues.redhat.com/browse/KOGITO-3336">KOGITO-3336</a>]: On Business Modeler Desktop the sample files are named as “unsaved file”</li><li>[<a href="https://issues.redhat.com/browse/KOGITO-2835">KOGITO-2835</a>]: Online — Update ‘edit existing file’ to use the FileUpdate component</li></ul><h4>Known issues</h4><ul><li>[<a href="https://issues.redhat.com/browse/KOGITO-3571">KOGITO-3571</a>]: [DMN Designer] Multiple DRDs support — Information requirements are duplicated into the DMN XML</li></ul><h3>Further Reading/Watching</h3><p>If you are curious about the history of Kogito Tooling and how we created this technology, I would like to recommend two links for you:</p><ul><li><a href="https://medium.com/kie-foundation/kogito-tooling-history-and-custom-envelopes-c35736a40cba">Kogito Tooling history and Custom Envelopes</a>, a blog post written by Tiago Bento;</li><li><a href="https://www.youtube.com/watch?v=Dvz0bGa9oh8&amp;t=4s">Multiplying Architecture</a>, a presentation that Eder Ignatowicz gave on <a href="https://www.youtube.com/channel/UCUjeymTM-TrwHs36388VRbw">KIE</a> youtube channel;</li></ul><h3>Thank you to everyone involved!</h3><p>I would like to thank everyone involved with this release from the awesome KIE Tooling Engineers to the lifesavers QEs and the UX people that help us look awesome!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abf97397ea09" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/kogito-tooling-0-7-0-released-abf97397ea09">Kogito Tooling 0.7.0 Released!</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dashbuilder Runtime Demos]]></title>
            <link>https://medium.com/kie-foundation/dashbuilder-runtime-demos-6d78e53edced?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/6d78e53edced</guid>
            <category><![CDATA[business-central]]></category>
            <category><![CDATA[dashbuilde]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Fri, 09 Oct 2020 18:53:01 GMT</pubDate>
            <atom:updated>2020-10-09T18:53:01.619Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*h682ewiIVB8fWjdv" /></figure><p>Recently, we shared all the improvements that were made to Dashbuilder in a series of blog posts:</p><p><a href="https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1">Introducing Dashbuilder Runtime</a></p><p><a href="https://medium.com/kie-foundation/gradual-export-dashboards-from-business-central-88bd76a23dc5">Gradual Export Dashboards from Business Central</a></p><p><a href="https://medium.com/kie-foundation/multi-dashboards-support-in-dashbuilder-runtime-36dc78d9bb3f">Multi Dashboards support in Dashbuilder Runtime</a></p><p><a href="https://medium.com/kie-foundation/dashbuilder-runtime-embedded-mode-bc9ff5fb3c39">Dashbuilder Runtime Embedded Mode</a></p><p><a href="https://medium.com/kie-foundation/developing-custom-components-for-dashbuilder-f6fe9f6e0e64">Developing Custom Components for Dashbuilder</a></p><p>My colleague<a href="https://medium.com/@manaswinidasmannu"> Manaswini Das</a> also shared some custom components created by her on this blog post:</p><p><a href="https://medium.com/kie-foundation/new-improvements-and-custom-components-in-dashbuilder-33c718952bad">New improvements and custom components in Dashbuilder</a></p><p>Most of the Dashbuilder features were summarized in this live about dashboards in jBPM created by KIE Live community:</p><p>In this post, we will show everything playing together in a demo that uses all features discussed in the articles above.</p><h4>Demo Content</h4><p>The demos source can be found in<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9"> GitHub</a> and they are container images based. Both demos use<a href="https://docs.docker.com/compose/"> Docker compose</a> and dashbuilder runtime is always available in <strong><em>localhost:8280/</em></strong></p><p>There are two demos:</p><ul><li><a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/world_db_dashboard"><strong>world_db_dashboard</strong></a>: A demo showing an authoring environment sharing a database dataset with Dashbuilder Runtime. There are simple dashboards provided in world_db_dashboard/overlay/dashbuilder/models/ which can be imported in the authoring environment and then imported on Dashbuilder Runtime. Use Docker or podman compose to start this demo and you will find an authoring environment in <strong><em>localhost:8080/dashbuilder-webapp</em></strong> and dashbuilder runtime in <strong><em>localhost:8280. </em></strong>It is a lighter demo, hence why we didn’t use Business Central, instead, we used Dashbuilder Webapp.</li><li><a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/jbpm_integration_dashboards"><strong>jbpm_integration_dashboards</strong></a>: This is the demo that we will be discussing this article. It is configured to connect to a jBPM installation and it also provides scripts to start process instances in jBPM while following the progress in real-time in Dashbuilder Runtime.</li></ul><p>Real-time progress and process execution reporting are found in models<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/jbpm_integration_dashboards/models"> Evaluation and Mortgage</a>, and in Kie Server, you will find containers with the same name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*pPYd8XGYy5V7VGSt" /><figcaption>Dashbulder Runtime integrated with jBPM Demo</figcaption></figure><p>This is a demo that makes use of jBPM full installation that includes Kie Server and Business Central running on <strong><em>localhost:8080. </em></strong>It requires at least 4 GB of free disk space and 4g of free RAM memory.</p><h4>Dashbuilder integrated with jBPM</h4><p>The most important piece of integration is about Kie Server credentials and location, we talked about it in<a href="https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1"> Introducing Dashbuilder Runtime</a>, and the system properties configuration can be found in the<a href="https://github.com/jesuino/dashbuilder-docker/blob/7.9/demos/custom_images/dashbuilder-runtime/conf/standalone-demo.xml#L46-L51"> custom dashbuilder image</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*594JCmNVvsh7Zfv_" /><figcaption>Kie Server configuration</figcaption></figure><p>Other important pieces are the<a href="https://medium.com/kie-foundation/developing-custom-components-for-dashbuilder-f6fe9f6e0e64"> custom external components</a> used in models. You can import and develop it in Business Central, but the components are exported along with the dashboards exported ZIP model. In other words, you do not have to worry about moving it to Dashbuilder Runtime, but bear in mind that in jBPM 7.44 release all components are packed in the exported ZIP.</p><h4>jBPM integration Dashboards</h4><p>When you start the<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/jbpm_integration_dashboards"> <strong>jbpm_integration_dashboards</strong></a><strong> </strong>demo and access dashbuilder runtime in <strong>localhost:8280</strong> you will see that multiple dashboards are listed and it happens because<a href="https://medium.com/kie-foundation/multi-dashboards-support-in-dashbuilder-runtime-36dc78d9bb3f"> multi-mode</a> is on using system property<a href="https://github.com/jesuino/dashbuilder-docker/blob/7.9/demos/jbpm_integration_dashboards/docker-compose.yml#L19"> dashbuilder.runtime.multi</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*oWeFJJkbJtlZUjsT" /><figcaption>Dashbuilder Runtime multiple dashboards</figcaption></figure><h4>Evaluation</h4><p>Let’s discuss these dashboards in-depth starting by talking about Evaluation. A long time ago jBPM community created an evaluation example, which goal is an employee evaluation along with PM and HR evaluations. Each evaluation process is represented by a human task that gets the task owner evaluation and store as a task variable. Once all evaluations are done the process is also finished.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*lA8ghlIzxxJzm9O9" /><figcaption>The Evaluation process</figcaption></figure><p>Although evaluation is a very simple process, jBPM gets all information to retrieve knowledge from process executions which allow us to build interesting reports. In the Evaluation dashboard, for example, you will find three pages:</p><p><strong>Evaluation Process Data: </strong>A summary of all evaluations execution along with a heatmap (heatmap is an external component which we will discuss in-depth soon here in this blog) showing the tasks that took more time to finish. This report is in a good format to<a href="https://medium.com/kie-foundation/dashbuilder-runtime-embedded-mode-bc9ff5fb3c39"> embed</a> it in other applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*WExTXTx7QF7ORS4c" /><figcaption>Summary for evaluation executions</figcaption></figure><p><strong>Evaluation Progress</strong>: With this page, we can retrieve real-time execution information of processes and it makes use of Victory Charts to show the completion of the evaluation, a heatmap to show the active process nodes, and two built-in components to show the number of active tasks and the number of process hits in the last minute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nM-DGw6QJPqNQgTo" /><figcaption>Real-time dashboard using Dashbuilder Runtime</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*ndQNdDqi-w94tn4W" /><figcaption>Victory Chart component</figcaption></figure><p><strong>Evaluation By Employee: </strong>This page contains a management report that relies on historical data, not real-time. It queries multiple jBPM tables to you can see details about each evaluation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*k8XfB-RPVdnmD12O" /><figcaption>After executions, users can build reports by querying jBPM tables.</figcaption></figure><p>As you can see this relies on jBPM history tables. To query these tables we used SQL and in a future article we will share all scripts used in these reports, but if you want to see more about it just open <em>Evaluation.zip</em> using<a href="https://medium.com/kie-foundation/importing-and-exporting-dashbuilder-data-9784ccc4cdb"> Data Transfer</a> and you can see all datasets we created.</p><p>With the demo, we also provide the client scripts that access Kie Server and creates users and complete tasks. To see the real-time dashboard in action, open it, and run the script<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/scripts/evaluation_demo"> main.sh</a> from <em>demos/scripts/evaluation_demo.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/0*dHFYUbw7J4BlINsg" /><figcaption>Evaluation Script in action</figcaption></figure><p><strong>Mortgages</strong></p><p>Another famous community process is the mortgage. We decided to build a demo of it because the process can take different paths during the execution and it involves also business rule tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/0*HitSKlvEU8744CDh" /><figcaption>Mortgages Process Definition</figcaption></figure><p>One common concern when running a business process is to identify bottlenecks. The mortgage process has two internal loops:</p><ul><li>When the user enters bad data the process prompts the user until the inputted is corrected.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/0*45ulaYpAhyt2Veeq" /></figure><ul><li>Another loop is after the task “Increase Down Payment”, which re-triggers the execution of the whole process.</li></ul><p>The heatmap component is a good fit to find bottlenecks and what tasks are taking longer to finish. For this purpose, we created a single page in dashboard Mortgage that shows how long each task takes to finish and what tasks are more frequently executed. In other words, if you have such a process in your company and the overall performance does not seem good, but you don’t know what is wrong, you could use dashboards like this to identify what is wrong. In our case:</p><ul><li>If the report shows that the task “Correct Data” is taking too long to finish then a decision that could be made is to improve the form where users input information or call users to finish the form;</li><li>If internal tasks like Final Approval or Increase Down Payment are taking longer than expected, a solution could be to hire more people responsible to complete these tasks.</li></ul><p>This same dashboard can run also in real-time, showing heat information for each task during the process execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*POleg15B4fHIPfUF" /><figcaption>Mortgage process execution in real-time</figcaption></figure><p>For this same dashboard notice again that we use an external heat map component, but we also integrate with a built-in bar chart and filter object, so we can see only Human tasks if we want to do so.</p><p>You can also run this same dashboard using the demo, but this time it requires maven and<a href="https://jbang.dev/"> jbang</a>:</p><ul><li>Make sure that the repository that contains Mortgage process is copied to your local maven, copy<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/custom_images/jbpm-server/repository"> demos/custom_images/jbpm-server/repository</a> to your local maven;</li><li>Have jbang installed and run<a href="https://github.com/jesuino/dashbuilder-docker/tree/7.9/demos/scripts/mortgages"> MortgagesRobot.java</a></li></ul><p>MortgagesRobot is a biased robot to highlight and demo the heatmap component, notice how it takes longer to finish some tasks than others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*OiGMCSY3qtnhfCDB" /><figcaption>The result showing that Final Approval took longer than other tasks to finish due Mortgages Robot algorithm.</figcaption></figure><h4>Conclusion</h4><p>In this article, we shared our Dashbuilder Runtime demos. It is a lot to explore and we plan to come back with more demos and more detailed posts. So stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d78e53edced" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/dashbuilder-runtime-demos-6d78e53edced">Dashbuilder Runtime Demos</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New improvements and  custom components in Dashbuilder]]></title>
            <link>https://medium.com/kie-foundation/new-improvements-and-custom-components-in-dashbuilder-33c718952bad?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/33c718952bad</guid>
            <category><![CDATA[business-central]]></category>
            <category><![CDATA[dashbuilder]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[Manaswini Das]]></dc:creator>
            <pubDate>Thu, 01 Oct 2020 12:59:22 GMT</pubDate>
            <atom:updated>2020-10-01T12:59:22.271Z</atom:updated>
            <content:encoded><![CDATA[<h3>New improvements and custom components in Dashbuilder</h3><p>As you maybe already know, you can use <a href="https://docs.jboss.org/jbpm/release/latest/jbpm-docs/html_single/#jBPMBAM">Dashbuilder</a>, a part of Business Central to create pages and dashboards. Pages are made of small components that can show data. Dashbuilder provides multiple components that users can drag to pages. I’m going to walk you through the new custom components added to Dashbuilder, that you can use to create your own dashboards with your own datasets.</p><h4>Status and Monitoring Donuts</h4><p>These are some React components that are inspired by the bits and parts used in Kogito dashboard. Here is an example of how the Kogito dashboard looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWld6ozElL69tKmGwHV2dw.png" /><figcaption>Image of Kogito Dashboard</figcaption></figure><p>We have two components that we can use to recreate the above dashboard in Dashbuilder, the status component and the monitoring donuts component. Let’s see how each of these components look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JratM7g9kDT9A27slGMjgA.gif" /><figcaption>Here’s how you can add a status component</figcaption></figure><p>Similarly, you can add the monitoring donuts components, you can change the title, height, and width, according to your wish. Here’s how the monitoring donuts component looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w_BSYk-54sq5RxmjIhsceA.gif" /><figcaption>Here’s how you can add a monitoring donuts component</figcaption></figure><p>Putting these components together, you can create the above dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jVlfAewGqyf2pigNuYjM6A.gif" /><figcaption>Recreating a Kogito dashboard</figcaption></figure><h4>Improvements to Victory Charts</h4><p>Victory charts component contains multiple charts to visualize your data, starting from bar to donut. You can add any chart of your choice to visualize any data from any dataset and customize the same to change the labels and values to make it look the way you want it to.</p><p>We have made it more customizable by adding column settings support. The supported column settings are provided by object <a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalColumnSettings.java">ExternalColumnSettings</a> which has the following attributes:</p><ul><li><strong>columnName</strong>: The labels set by user in UI;</li><li><strong>valueExpression</strong>: A JavaScript expression that should be evaluated over the column value;</li><li><strong>valuePattern</strong>: A pattern to format column values.</li></ul><p>Here’s how the customization will look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FYMFAplujpWACj3Y-srOGA.gif" /><figcaption>Victory charts customization</figcaption></figure><h4>Map</h4><p>This is one of the new components that we have added using Leaflet and React. Now, you can provide your own dataset and create visualizations of your geographic data on a world map using Dashbuilder.</p><p>We have the following component properties to make it customizable:</p><ul><li><strong>Center Latitude and Longitude</strong>: To set the coordinates of center of the map;</li><li><strong>Disable Title</strong>: A checkbox to disable the title;</li><li><strong>Title</strong>: To set the title;</li><li><strong>Zoom</strong>:<strong> </strong>To set the zoom factor;</li><li><strong>Bubble max and min radius</strong>: To set bubble maximum and minimum radius for bubbles;</li><li><strong>Auto resize bubbles</strong>: A checkbox to auto resize bubbles relatively</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSTgSOZJrSyxmgU9FOGbkA.gif" /><figcaption>Map component in action</figcaption></figure><h4>Conclusion</h4><p>There is no limit to what library/framework you want to use. We are still including more custom components to allow users to create interactive dashboards. You can find a list of all components <a href="https://github.com/jesuino/dashbuilder-components">here</a>.</p><p>Huge shoutout to <a href="https://medium.com/u/e0557114720b">William Antônio Siqueira</a> for coming up with integrating the <a href="https://raw.githubusercontent.com/jesuino/dashbuilder-data/master/covid19/covid19_deaths.csv">Covid deaths database</a> to the map component and for the super clear map GIF.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33c718952bad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/new-improvements-and-custom-components-in-dashbuilder-33c718952bad">New improvements and  custom components in Dashbuilder</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gradual Export Dashboards from Business Central]]></title>
            <link>https://medium.com/kie-foundation/gradual-export-dashboards-from-business-central-88bd76a23dc5?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/88bd76a23dc5</guid>
            <category><![CDATA[business-central]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[dashbuilder]]></category>
            <category><![CDATA[export]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 18:47:04 GMT</pubDate>
            <atom:updated>2020-09-30T18:47:04.172Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aUsoOwVIzYccvL5M" /></figure><p>Business Central (BC) is a complete application where you can control the full cycle of Business Automation: since authoring until monitoring. Inside BC, monitoring is done by a tool called Dashbuilder (DB) and it allows you to create dashboards and run it inside Business Central or in Dashbuilder Runtimes.</p><p>Since BC 7.25 release, it is possible to export and import these dashboards to other BC installations, this feature was described in depth in<a href="https://medium.com/kie-foundation/importing-and-exporting-dashbuilder-data-9784ccc4cdb"> Importing and exporting Dashbuilder data</a>.</p><p>With the introduction of <a href="https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1">Dashbuilder Runtime</a> you may want to share a specific page or a set of pages along with its datasets to run on Dashbuilder Runtime, but with full export, all pages, and datasets are exported. With Gradual Export it’s now possible to select which assets you want to export using the new Gradual Export feature.</p><h4>Dashboards Import/Export Gradual Export</h4><p>Since Business Central 7.39 it is possible to select which assets you want to export from Business Central to another BC installation or Dashbuilder Runtimes. Following the same steps to export, you will find a new button with the description: “Custom Export”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*9ENbVGr0omZVHDrm" /><figcaption>The new Custom Export Button</figcaption></figure><p>Click on Custom Export will open a wizard that will allow you to select Datasets and Pages, then download a ZIP file that contains only what you selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*piD96ftcpWJKBsDc.gif" /><figcaption>Gradual Export in Action</figcaption></figure><p>Later you can either import this in Dashbuilder Runtime or in another BC installation, bearing in mind that it could override existing assets without any warning, so be careful when importing in another BC installation.</p><p>Using this feature it’s possible to export only the pages, without any datasets. However, if a page depends on a specific dataset it will not allow you to download the ZIP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*PvDoKLpO3C1fuRZuveRrFg.png" /><figcaption>Export with missing dependencies can’t be created</figcaption></figure><p>Once you correct the errors and add all the dependencies for your export, you can download the ZIP. Notice also that the navigation is always exported and if a page is not in the navigation then Runtime creates a navigation group for it.</p><h4>Conclusion</h4><p>The gradual export feature lets you create more fine-grained dashboards applications and run it on Dashbuilder Runtime. This feature together with <a href="https://medium.com/kie-foundation/multi-dashboards-support-in-dashbuilder-runtime-36dc78d9bb3f">multi-tenancy</a> makes it possible to individually open dashboards in the same Runtime installation. Stay tuned for the next articles where we will show how all Dashbuilder new features can work together in a full demo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88bd76a23dc5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/gradual-export-dashboards-from-business-central-88bd76a23dc5">Gradual Export Dashboards from Business Central</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing Custom Components for Dashbuilder]]></title>
            <link>https://medium.com/kie-foundation/developing-custom-components-for-dashbuilder-f6fe9f6e0e64?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/f6fe9f6e0e64</guid>
            <category><![CDATA[components]]></category>
            <category><![CDATA[dashbuilder]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 18:17:30 GMT</pubDate>
            <atom:updated>2020-09-30T18:17:31.380Z</atom:updated>
            <content:encoded><![CDATA[<p>Dashbuilder is the component of Business Central that allows users to create pages and dashboards. Pages are made of small components that can show data, they are so-called displayers.</p><p>By default dashbuilder provides multiple displayers that users can drag to pages, for instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/0*uL__DfwC74hbZQrp" /><figcaption>Reporting components that can be used in Business Central pages</figcaption></figure><p>In Business Central 7.43, we introduced a new way of displaying data by allowing users to create their own custom components that can be based on any modern Javascript library, opening to new possibilities to display business data.</p><p>In this article, we will introduce the brand new External Components API and how to use it in Business Central.</p><h4>External Components API</h4><p>External components are custom page parts that can be developed in order to consume datasets from Business Central and display data in any way that you want. Users can also configure components using parameters provided by the component itself. Dashbuilder allows users to set these parameters values and send it to the component when it is rendered.</p><p>In order to create your first component, the entry point to create components is the file <strong><em>manifest.json</em></strong>, which must be placed in the component root directory. Manifest files must have at least the text parameter called “name”, but other parameters are supported:</p><ul><li><strong>Name</strong>: The component name that will be displayed in the component pallet;</li><li><strong>Icon</strong>: Icon that will be displayed in the component pallet.</li><li><strong>noData</strong>: A flag that indicates that the component does not require a dataset;</li><li><strong>parameters</strong>: A list of parameters that the components need to be collected by the user.</li></ul><p>The list of parameters supported by the component uses ComponentParameter type, which has the following:</p><ul><li><strong>name: </strong>The parameter internal name.</li><li><strong>type</strong>: Parameter type. Possible values are <em>text, natural_number, combo, and color. </em>When using combo type you must set <em>comboValues</em>.</li><li><strong>category</strong>: The category which the field property will be grouped into;</li><li><strong>defaultValue: </strong>The initial value presented to the user;</li><li><strong>label</strong>: The label used in the component parameters UI;</li><li><strong>comboValues: </strong>A list of text values for combo parameters;</li><li><strong>noData: </strong>Special attribute which when true will not consume a dataset.</li></ul><p>A complete manifest would look similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/0*hQcSUeqGODOpdQ-5" /><figcaption>Sample manifest.json file that is used for heatmap component</figcaption></figure><p>When users drag the component to the page a wizard shows up, renders a component preview and the properties form according to the properties defined in the manifest:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*HN2s6pLXjIsRMGns" /><figcaption>Heatmap component with its parameters</figcaption></figure><h4>Building data visualization with external components</h4><p>After manifest.json is finished you can start building your own dashboards. The entry point is index.html. From the index file, you can link javascript and css resources. In javascript code, we can then listen for messages that will be sent by dashbuilder.</p><p><strong>window.addEventListener(“message”, receiveMessage, false);</strong></p><p><strong>function receiveMessage(<em>event</em>) {</strong></p><p><strong>// consume the message</strong></p><p><strong>const params = new <em>Map</em>(event.data.properties);</strong></p><p><strong>}</strong></p><p>The message sent by dashbuilder contains data of type <a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalComponentMessage.java">ExternalComponentMessage</a> and contains only an attribute called properties of type <em>Map&lt;String, Object&gt;</em>. In this object you will find:</p><ul><li>The value for any property you have according to what user set in the UI. To retrieve the value uses the attribute name as the key, for example:</li></ul><p><strong>params<em>.get(“svg”)</em></strong></p><ul><li>A special attribute called <em>dataSet, </em>which is of type<a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalDataSet.java"> ExternalDataSet</a>. This is what you should use to get the data from dashbuilder:</li></ul><p><strong>params.get(“dataSet”)</strong></p><p>The returned dataset object has the following attributes:</p><ul><li><strong><em>columns</em></strong>: List of columns which is of<a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalColumn.java"> ExternalColumn</a> type;</li><li><strong><em>rows</em></strong>: a two-dimensional array with dataset values.</li></ul><p>All the rows values are of string type, to get the actual type you can get the column information and find the actual type: <strong><em>rows[row index][column index]</em></strong>. With the “column index” you can get the column information in columns attribute, a column is represented by<a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalColumn.java"> ExternalColumn</a> object, which has text attributes <strong><em>name</em></strong>, <strong><em>type,</em></strong> and a complex columnSettings attribute. ColumnSettings holds all the user settings for a specific column, it is represented by object<a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/external/ExternalColumnSettings.java"> ExternalColumnSettings</a> which has the following attributes:</p><ul><li><strong>columnName</strong>: The name set by the user in the UI;</li><li><strong>valueExpression</strong>: A javascript expression that should be evaluated over the column value;</li><li><strong>emptyTemplate</strong>: The text that should be used when the column value is empty;</li><li><strong>valuePattern</strong>: A pattern to format column values. Useful for number.</li></ul><p>All column settings are configured by the user when the component is dragged to a page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*PNYUGC1zSHckUYKH" /><figcaption>Users can have settings for each dataset column</figcaption></figure><h4>External Components configuration</h4><p>By default, external components are disabled. You can enable it by setting the system property <strong><em>dashbuilder.components.enable</em></strong> as true.</p><p>Dashbuilder looks for components in the directory configured using the system property <strong><em>dashbuilder.components.dir</em></strong>. The default value is <em>/tmp/dashbuilder/components</em> and <strong>this directory should not be shared with Dashbuilder Runtime. </strong>Your components will live inside this directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*mvk2DACLA6b0b2wZ" /><figcaption>Components directory</figcaption></figure><p>Components assets are served by<a href="https://github.com/kiegroup/appformer/blob/master/dashbuilder/dashbuilder-backend/dashbuilder-external-backend/src/main/java/org/dashbuilder/external/ExternalComponentServlet.java"> ExternalComponentServlet</a>. In Business Central or in Dashbuilder Runtime you can control cache in web.xml using init-param <strong><em>cache-control</em></strong>.</p><h4>External components in Dashbuilder Runtime</h4><p>Recently, we introduced the <a href="https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1?source=collection_home---4------2-----------------------">Dashbuilder Runtime</a> web application and <a href="https://medium.com/kie-foundation/importing-and-exporting-dashbuilder-data-9784ccc4cdb">export/import</a> feature. All the components you have configured in Business Central will be packaged with the ZIP file exported from the Data Transfer feature. When imported in Runtime then it will be partitioned by import if you are using multi-mode.</p><p>Also notice that Runtime caches all the components assets, this can be changed in <em>dashbuilder-runtime.war/WEB-INF/web.xml</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Nd3FgyuwphVjd7Bi" /></figure><p>External component servlet mapping. <strong>Never</strong> change the url-pattern for external components.</p><p>It is also recommended to avoid sharing the components directory between Dashbuilder Runtime and Business Central.</p><h4>Learning more</h4><p>There’s no limit to what you can do, or what library you can use! For this reason, we have a growing library of components with some cool external components, like heatmaps, an alternative chart library (Victory Charts), and soon a new Maps component. Check it in<a href="https://github.com/jesuino/dashbuilder-components"> Github</a>.</p><p>To get started check<a href="https://github.com/jesuino/dashbuilder-components/tree/master/hello-user-component"> out the hello_user</a> example, a very simple component, and then<a href="https://github.com/jesuino/dashbuilder-components/tree/master/simplest_component"> simplest_component</a>, which uses all external component library, including a filter feature that is also available on this new API.</p><h4>Conclusion</h4><p>In this article, we introduced the external components API. This is a new milestone for Dashbuilder and Business Central and it makes it possible to explore Business Central data in ways we didn’t imagine before!</p><p>Next, we will bring tutorials putting all Dashbuilder Runtime features together, stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6fe9f6e0e64" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/developing-custom-components-for-dashbuilder-f6fe9f6e0e64">Developing Custom Components for Dashbuilder</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dashbuilder Runtime Embedded Mode]]></title>
            <link>https://medium.com/kie-foundation/dashbuilder-runtime-embedded-mode-bc9ff5fb3c39?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc9ff5fb3c39</guid>
            <category><![CDATA[dashbuilder]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Fri, 25 Sep 2020 18:48:24 GMT</pubDate>
            <atom:updated>2020-09-25T18:48:24.914Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*auV3syUg7ykhF3lH" /></figure><p>Dashbuilder Runtime (DB) allows you to run your dashboards in a cloud-ready web application. Since jBPM 7.40 users can access their dashboards by logging directly into DB or they can bring dashboards to their application by using the improved embedded mode.</p><p>With embedded mode, Dashbuilder Runtime can be part of users’ own applications. The REST API also allows users to upload dashboards directly into Dashbuilder and navigate through the existing dashboards.</p><p>In this article, we discuss Dashbuilder embedded mode and the REST API that can be used to retrieve dashboards information.</p><h4>Embedding dashboards</h4><p>Every dashboard in DB page can be accessed in embedded mode using the URL format:</p><p><em>${DB_URL}?standalone&amp;perspective=${PG_NAME}</em></p><p>Where:</p><ul><li><strong>DB_URL:</strong> The URL where Dashbuilder Runtime is running;</li><li><strong>PG_NAME:</strong> The dashboard page name</li></ul><p>in Multi-mode you just need to additionally provide the import name:</p><p><em>${DB_URL}?standalone&amp;perspective=${PG_NAME}&amp;import=${IMPORT}</em></p><p>Here’s a sample URL:</p><p><a href="http://localhost:8280/?import=population&amp;perspective=Countries%20Population&amp;standalone">http://localhost:8280/?import=population&amp;perspective=Countries%20Population&amp;standalone</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*anRjrOcJsAVBdLkB" /></figure><p>A dashboard running in embedded mode</p><h4>REST API</h4><p>The integration with the third party application is improved by DB REST API:</p><ul><li><strong><em>GET /api</em></strong>: Provides server information: Runtime Mode and list of available models. Sample</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/0*JGY3xMr5EUjQhQj5" /></figure><ul><li><strong><em>POST /api/dashboard/</em></strong>: Received a POST ZIP with dashboards and register it for use (upload). You must send a form param called “selectedFile” with the file contents. It returns the dashboard id.</li></ul><p><strong><em>curl -u ‘admin:admin’ -F ‘selectedFile=@/home/wsiqueir/Downloads/new_dashboard.zip’</em></strong><a href="http://localhost:8280/rest/api/dashboard"><strong><em> http://localhost:8280/rest/api/dashboard</em></strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*5IE3f5k7Pg6LU2m-" /></figure><p>Sample request to upload a dashboard</p><ul><li><strong><em>GET /api/dashboard/{id}</em></strong>: Retrieves information about the dashboard {id}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*OiNtreb-_iDp1oCa" /><figcaption>Sample response for a dashboard details</figcaption></figure><h4>Javascript Client Library</h4><p>It is possible to wrap the REST calls using a Javascript library published in npm:<a href="https://www.npmjs.com/package/@dashbuilder-js/api"> dashbuilder-js/api</a>. With this, you can use dashboards directly in your application. See examples in<a href="https://github.com/jesuino/dashbuilder-js"> dashbuilder-js repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*qTdohGShr5imi7Fa" /><figcaption>Using dashboards from a Javascript application</figcaption></figure><h4>Conclusion</h4><p>Dashbuilder Runtime can be seamlessly integrated with existing applications. In jBPM 7.43 we also added support to integrate your own components inside DB and in the next article, we will discuss how this can be done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc9ff5fb3c39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/dashbuilder-runtime-embedded-mode-bc9ff5fb3c39">Dashbuilder Runtime Embedded Mode</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi Dashboards support in Dashbuilder Runtime]]></title>
            <link>https://medium.com/kie-foundation/multi-dashboards-support-in-dashbuilder-runtime-36dc78d9bb3f?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/36dc78d9bb3f</guid>
            <category><![CDATA[ky]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[dashbuilder]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Thu, 24 Sep 2020 19:09:11 GMT</pubDate>
            <atom:updated>2020-09-24T19:09:11.672Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*bO1haMiFrWvUO02A" /><figcaption>Foz do Iguaçu Falls</figcaption></figure><p>In a recent blog post, we introduced <a href="https://blog.kie.org/2020/09/introducing-dashbuilder-runtime.html">Dashbuilder Runtime</a> and mentioned that you can either select a ZIP file to be started as the dashboard or upload a dashbuilder one time to be used. These behaviors are called Runtime mode, and they are STATIC and SINGLE_IMPORT. In release 7.42 we introduced a new mode: MULTI. In this article, we talk more about this mode and describe how it works.</p><p>Dashbuilder Runtime can run dashboards exported from Business Central. By default, dashbuilder Runtime runs only one dashboard per installation, but it is possible to run it in a multi-tenancy model to have multiple dashboards in the same installation.</p><p>In multi-tenant mode, dashbuilder isolates each dashboard context to avoid any conflicts. You will be able to install how many dashboards as you want and you can have dashboards by company area or have a dashbuilder multi-tenant installation for a specific area, let’s say, Sales, and have multiple dashboards for that area, for example, <em>Current Year Sales, Internacional Sales </em>and so on.</p><h4>Loading multiple dashboards</h4><p>The Multi-mode is turned off by default. In order to activate it, you must set the system property <strong>dashbuilder.runtime.multi</strong> as true.</p><p>Multi-mode works by scanning all ZIP files under the path configured by <strong>dashbuilder.import.base.dir </strong>and the existing dashboards are loaded during bootstrap. To load some dashboard just access dashbuilder runtime home page and pass the property <strong>import={filename}</strong> where “filename” is the dashboard file name without the extension. The home page for multi-mode is also different from dashbuilder running with a single dashboard, because it lists all the existing datasets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*s5WUbJgIGXCBmhBd" /></figure><p><em>Dashbuilder Runtime Home Page in Multi-Mode</em></p><p>After starting, all dashboards will be listed on the home page and it is possible to upload new dashboards. Dashbuilder Runtime tries to avoid repeated content by warning users if they try to upload dashboards with repeated content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*nuRDNY4f8INCyBTQ" /><figcaption>Warning displayed when a user tries to upload a dashboard with existing content</figcaption></figure><p>Multiple Dashboards and datasets conflict</p><p>It may look simple at the surface, but multiple dashboards need to have an isolated context for datasets. For this purpose, we created AF-2550 which prevents dataset collision by partitioning it by the imported dashboard.</p><p>Since the dataset partition requires more processing during dashboards import, it is possible to turn this feature off by setting system property <strong><em>dashbuilder.dataset.partition=false</em></strong>. This could be useful if you don’t care about datasets collision or if you are sure that datasets won’t collide even in multi-mode.</p><h4>Conclusion</h4><p>Multi-Mode allows the use of the same web application to run multiple dashboards. This same installation can be integrated with other applications using the embedded mode, which will be discussed next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36dc78d9bb3f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/multi-dashboards-support-in-dashbuilder-runtime-36dc78d9bb3f">Multi Dashboards support in Dashbuilder Runtime</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Dashbuilder Runtime]]></title>
            <link>https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/b88637d783f1</guid>
            <category><![CDATA[dashbuilder]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[business-central]]></category>
            <dc:creator><![CDATA[William Antônio Siqueira]]></dc:creator>
            <pubDate>Wed, 23 Sep 2020 18:46:29 GMT</pubDate>
            <atom:updated>2020-09-23T18:46:29.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*_noKK84TET99IImK" /></figure><p>Business Process monitoring via dashboards and reports is a crucial part of a successful business automation deployment. In Business Central (BC), it is possible to monitor the execution of processes and human tasks using dashboards.</p><p>Under the hood, every dashboard living in BC is actually built with a tool called <strong>Dashbuilder. </strong>It allows users to author pages and add reporting elements to it, making it possible to create dashboards in a user-friendly way. Until recently dashboards could only run inside BC. Now, we are happy to introduce Dashbuilder Runtime, which makes it possible to run BC dashboards in a separate web application.</p><h3>Dashbuilder Runtime</h3><p>On Business Central release 7.42.0, we introduced a new standalone application called <strong>Dashbuilder Runtime</strong>. This new feature is a lightweight application able to run dashboards created on Business Central in a containerized fashion, allowing us to cover a lot of business automation use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*HvfFXH-dDeY9-sS-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*HiU5MgjRRQAOGP_q" /></figure><h3>Exporting Dashboards from Business Central</h3><p>Dashboards can be exported in Business Central by accessing <strong><em>Admin -&gt; Dashbuilder Data Transfer</em></strong> feature in Business Central.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*84x-3TEExyHxH_nZ" /></figure><p>Exported dashboards have three components:</p><ul><li><strong>Datasets</strong>: Data from different sources (CSV, SQL, Kie Server…) that can be reused in pages;</li><li><strong>Pages</strong>: User built pages with layout components containing visual components that may be using a dataset;</li><li><strong>Navigation</strong>: Navigation between pages that is used in the Business Central menu.</li></ul><p>With<a href="https://issues.redhat.com/browse/AF-2456"> Gradual Export</a> you can select which pages and datasets will be in the exported ZIP. If you select no page or select a page without selecting a dataset that it uses then you won’t be able to download the export.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*VMJFlQ-KH7V3KASP" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*rRT0ZHOLOczNO2qQ" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*1n0ObQKifJNiD1F5" /></figure><p>The dataset may have dependencies and it must be configured according to the dataset type:</p><ul><li><strong>CSV</strong>: The CSV files are exported along with the ZIP and imported seamlessly in Runtime;</li><li><strong>SQL</strong>: For SQL datasets you just need to make sure that the target dataset is configured in the server where Runtime is running;</li><li><strong>Kie Server</strong>: In Business Central Kie Server datasets uses the same service used when managing Kie Server instances. In Runtime, the configuration is different and we will cover it in the next section.</li></ul><p>The navigation between pages respects the same configuration in Business Central, which means that if page 1 is in group group1 and page 2 is in group2, then the same group will be imported and remain as the navigation in Runtime. A page not added in navigation will be added to a group called “Dashboards”.</p><h3>Kie Server Datasets on Dashbuilder Runtime</h3><p>Kie Server uses BC as a controller: when BC is used as a controller, Kie Server container creation will be done in BC. The same happens for datasets, Kie Server configuration is called template and we can refer to a template to create datasets or install containers.</p><p>If other services need to retrieve Kie Server information then it should use the Kie Server REST API and that’s what Runtime does, it accesses the Kie Server REST API to run queries from datasets.</p><p>When a Kie Server dataset is created in Business Central the <strong>server template</strong> information is provided and it is used by Runtime to look for the Kie Server information:</p><p><em>dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.location</em></p><p><em>dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.user</em></p><p><em>dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.password</em></p><p><em>dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.token</em></p><p>It is also possible to setup Kie Server per dataset:</p><p><em>dashbuilder.kieserver.dataset.{DATA_SET_NAME}.location</em></p><p><em>dashbuilder.kieserver.dataset.{DATA_SET_NAME}.user</em></p><p><em>dashbuilder.kieserver.dataset.{DATA_SET_NAME}.password</em></p><p><em>dashbuilder.kieserver.dataset.{DATA_SET_NAME}.token</em></p><p><strong><em>Notice that token authentication is not used if credentials are provided</em></strong></p><p>One may also want to run the dashboard against another Kie Server installation. Let’s say that datasets were created on a Kie Server in DEV environment, it means that the datasets queries were created on the DEV Kie Server. When the dashboards are exported go, let’s say, to PROD, with another Kie Server, the queries created in DEV won’t be available, so an error will be thrown. In such cases it is possible to port queries from a dataset to another Kie Server by using the replace query boolean property. It can also be set by dataset or by server template:</p><p><em>dashbuilder.kieserver.serverTemplate.{SERVER_TEMPLATE}.replace_query</em></p><p>Or</p><p><em>dashbuilder.kieserver.dataset.{DATA_SET_NAME}.replace_query</em></p><p>It needs to be set only one time so Runtime creates the queries. Once the queries are created you can remove this system property.</p><h3>Installation</h3><p>Dashbuilder Runtime is a Java web application and it is distributed in the form of a WAR and it can be deployed in a Wildfly 18 installation.</p><p>An easy way to deploy is by dropping the WAR (<strong><em>dashbuilder-runtime.war</em></strong>) in <strong><em>{WILDFLY_HOME}/standalone/deployments. </em></strong>By default it uses the root web context (“/”) and the <strong><em>other </em></strong>security domain, making it protected by default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*0bqK_b9aKjMP_nlX" /></figure><p>Dashbuilder Runtime login screen</p><p>Create a user with an <strong><em>admin</em></strong> role to login, it can be created using the <strong><em>add-user.sh</em></strong> utility:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*uY54Q028eqH1_UjD" /></figure><h3>Dashbuilder Runtime configuration</h3><p>Dashbuilder Runtime can be customized using system properties and in this section we some general system properties.</p><h4>Dashboards Path</h4><p>When a dashboard is uploaded it is stored in the filesystem. The path where it will be stored is controlled by the system property <strong>“dashbuilder.import.base.dir</strong>”, which by default points to dir <strong><em>/tmp/dashbuilder</em></strong></p><p>In fact, this system property is the root path for any dashboard model. For example, if there are multiple files on this path, the file can be imported by accessing Dashbuilder Runtime and passing a query parameter <strong>import</strong> with the name of the file that should be loaded, for example: <strong><em>runtime_host?import=sales_dashboard</em></strong> will attempt to load the file <strong><em>/tmp/dashbuilder/sales_dashboard.zip</em></strong></p><h4>Static Dashboard</h4><p>If one wants the runtime instance to load a specific dashboard then one just needs to use the system property <strong>dashbuilder.runtime.import. </strong>Just set this<strong> </strong>property pointing to a local file path and it will be loaded during Runtime startup.</p><h4>Controlling upload size</h4><p>Application servers usually control POST requests size, but is also possible to control the size of uploaded dashboards using the system property <strong>dashbuilder.runtime.upload.size. </strong>The size should be in KB and by default the value is 96kb, meaning that if someone tries to upload a file bigger than 96kb then an error will be displayed and the dashboard won’t be installed.</p><h4>Loading external dashboards</h4><p>Dashboard is in a public accessible URL that can be accessed by Dashbuilder Runtime. Just pass the URL using the import query parameter, for example, <strong><em>runtime_host?import=http://filesHost/sales_dashboard.zip. </em></strong>For security reasons this option is disabled by default and it is possible to enable it by setting the system property “<strong>dashbuilder.runtime.allowExternal</strong>” as <strong>true</strong>.</p><h3>Conclusion</h3><p>In this article, we introduced Dashbuilder Runtime. In the next posts we will cover more features such as Multi Dashboards and Embedding pages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b88637d783f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/introducing-dashbuilder-runtime-b88637d783f1">Introducing Dashbuilder Runtime</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backend support on Kogito Tooling]]></title>
            <link>https://medium.com/kie-foundation/backend-support-on-kogito-tooling-8be682a60b88?source=rss----3909e0c06a69---4</link>
            <guid isPermaLink="false">https://medium.com/p/8be682a60b88</guid>
            <category><![CDATA[jbpm]]></category>
            <category><![CDATA[kogito-tooling]]></category>
            <category><![CDATA[drools]]></category>
            <dc:creator><![CDATA[Guilherme Caponetto]]></dc:creator>
            <pubDate>Tue, 22 Sep 2020 13:31:55 GMT</pubDate>
            <atom:updated>2020-09-22T13:31:54.911Z</atom:updated>
            <content:encoded><![CDATA[<p>Developers can now augment the capabilities of their editors by connecting backend services through an infrastructure that has been included in Kogito Tooling.</p><p>Lots of possibilities of executing code outside the client are enabled/facilitated with this new infrastructure, such as calling a java local backend service, reaching an HTTP endpoint, triggering a command in the terminal, to name a few.</p><p>Let’s check out how it works in this post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-jjf3hFYv7I-1yfI" /><figcaption>Photo by <a href="https://unsplash.com/@mirkoblicke?utm_source=medium&amp;utm_medium=referral">Mirko Blicke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><h4>Backend package</h4><p>A new typescript package named <em>backend</em> has just been integrated into the Kogito Tooling <a href="https://github.com/kiegroup/kogito-tooling">repository</a>. Composed of a number of sub-modules, this package provides a mechanism for connecting editors to backend services. This package is divided as follows:</p><ul><li><strong>api</strong>: Core infrastructure for supporting backend services. All generic API is defined in this sub-module, such as <em>BackendManagerService</em>, <em>BackendProxy</em>, and core related abstractions.</li><li><strong>channel-api</strong>: This sub-module should include all backend related APIs that channels can support.</li><li><strong>http-bridge</strong>: Bridge implementations between channels and HTTP services. Required for channels supporting such communication. A simple bridge would just bypass the requests whereas a more elaborated strategy could, for example, enqueue the requests, thus having more control over them.</li><li><strong>i18n</strong>: Internationalization for backend related features.</li><li><strong>node</strong>: Common backend related implementations that target NodeJS.</li><li><strong>vscode</strong>: Common backend related implementations that specifically target the VS Code channel. The VS Code API can be used on this sub-module to extend generic services and their capabilities.</li></ul><p>Since it is the first iteration of this effort, evolving the infrastructure is expected and encouraged as new services/requirements are being accommodated.</p><h4>Kogito tooling java repository</h4><p>A <a href="https://github.com/kiegroup/kogito-tooling-java">new repository</a> has been created aiming at including java related code with Kogito Tooling. The main idea for having this repository is gathering all the backend services written in java.</p><p>The first project pushed into this new repository is a Quarkus app named kogito-extended-services-quarkus, which is part of the infrastructure and basically works as a router for java backend services compatible with Quarkus. In other words, it is only a matter of exposing a REST endpoint that calls the java service to make it available to be accessed by the channels.</p><p>Finally, Github actions have been configured to automatically build the code and publish snapshot versions into the Maven central repository on a daily basis. Pull requests also trigger a build workflow.</p><h3>Typescript infrastructure for channels</h3><p>The core interfaces of the architecture are <em>Service</em> and <em>Capability</em>. All <em>services</em> are controlled by a backend manager and all <em>capabilities</em> are resolved (and possibly accessed if available) by a backend proxy. There are also some convenient implementations for HTTP services. Let’s check each one of these components in the sections that follow.</p><h4>Service</h4><p>A service<em> </em>has its own life cycle, which is controlled by the infrastructure. In other words, the infrastructure starts and stops the services, usually when the service is required the first time and when a channel is stopped, respectively.</p><p>Developers can define what should be done when the service starts, stops, and how to check if their requirements are satisfied — if the requirements are not met, the service cannot be started up.</p><p>In addition, a service can optionally expose operations to channels through a Capability. The channels, by themselves, can either directly access the capabilities or bridge the communication between editors and services through the envelope.</p><h4>Capability</h4><p>A capability is simply an API associated with a service that is implemented and used by channels. The implementation can be either common among channels or distinct ones, depending mostly on the environment.</p><p>For example, a capability for doing a particular data processing task could be implemented by using the user’s machine in the case of Desktop and VS Code channels, whereas it could be implemented by accessing some HTTP endpoint in the case of the Online channel. In the end, the implementation is irrelevant for the infrastructure as long as the API is followed by the channels.</p><p>Moreover, all API methods provided by a capability should wrap their return in a <em>CapabilityResponse</em> object, which includes a <em>CapabilityResponseStatus</em>. This way, callers of the capability can handle the response in a better way in certain situations, such as the infrastructure or the service itself not being available.</p><h4>Backend manager service</h4><p>The backend manager service controls the life cycle of all services. It is supposed to be started up along with the channel and be stopped right before the channel is closed. In the case of the VS Code channel, for example, the backend manager is started up once the extension is activated and stopped when the extension is deactivated (usually right before the VS Code is closed).</p><p>The backend manager also provides a mechanism to register both bootstrap and lazy services. If a service needs to be available as soon as the manager is up, then such a service should be registered as a bootstrap service. Conversely, if a service could be started up on the first usage, then such a service should be registered as a lazy service. Finally, all registered services are stopped as soon as the backend manager is stopped.</p><h4>Backend proxy</h4><p>The backend proxy simply bridges the access between channels and backend services. Since backend services are optional and/or could be unavailable if their requirements are not satisfied, the backend proxy takes care of resolving the required service, thus letting channels focusing only on the logic of the capability instead of having to deal with service resolving code.</p><h4>Built-in HTTP services</h4><p>Services implementing capabilities that require accessing HTTP endpoints can extend the built-in abstract services <em>HttpService</em> or <em>LocalHttpService</em>, which are located in the <em>api</em> sub-module. As the names suggest, the former is meant for any endpoint while the latter is meant for local endpoints that live on the Quarkus app.</p><p>Both provide the execute method, which can be used to execute HTTP requests. The only difference between them is the given endpoint:</p><ul><li>Services extending <em>HttpService</em> need to provide a full URL, e.g. <a href="http://myserver.com/myservice;">http://myserver.com/myservice;</a></li><li>Since the port of the local Quarkus app is resolved by the infrastructure, services extending <em>LocalHttpService</em> need to provide only the relative endpoint, e.g. /myservice. Behind the scenes, the infrastructure will execute a request on http://localhost:&lt;port&gt;/myservice.</li></ul><h4>VS Code extension for backend services</h4><p>Considering that VS Code is the target channel for the first iteration of the backend services infrastructure, a new VS Code extension named vscode-extension-backend has been added into Kogito Tooling. It already includes a basic set up to support the backend manager and Quarkus app, and should register all services associated with VS Code.</p><p>This way, backend services on VS Code become optional for users, <em>i.e.</em>, the capabilities of the editors can be augmented only if users choose to install the backend extension.</p><h4>Examples</h4><p>Now, let’s take a look at some examples running on the VS Code channel to illustrate services and capabilities.</p><p><strong>Quarkus local app</strong>: Being part of the infrastructure, this service has the sole purpose of starting up the Quarkus app through a java jar command. It does not offer any capabilities for channels. Instead, HTTP endpoints can be exposed inside the Quarkus app to be accessed by channels through other capabilities.</p><p>Thus, the life cycle implementations of this service would contain:</p><ul><li>start: run the java jar command to start up the Quarkus app process.</li><li>stop: kill the active process associated with the Quarkus app.</li><li>satisfyRequirements: Possible requirements are (i) check if the jar file of the Quarkus app exists; (ii) check if java 11+ is available; (iii) find an available port. If these conditions are met, then the service can startup.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqQkU5H-HTFE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqQkU5H-HTFE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqQkU5H-HTFE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8bd6cabefb9c1e537620309b5e352e4/href">https://medium.com/media/d8bd6cabefb9c1e537620309b5e352e4/href</a></iframe><p><strong>Test scenario runner</strong>: This sample service has the sole purpose of running a mvn clean test command on a project that contains test scenario files (.scesim), and reporting back the obtained results. Moreover, triggering the command should be done by channels.</p><p>Thus, the life cycle implementations of this service would contain:</p><ul><li>start: nothing is necessary to be done on the start phase since the command will be triggered by channels.</li><li>stop: kill the active process associated with the test execution.</li><li>satisfyRequirements: Possible requirements are (i) check if java 11+ is available; (ii) check if maven 3.6.2+ is available. If these conditions are met, then the service can startup.</li></ul><p>Since the execution of this service should be triggered by channels, a capability must be associated with the service, which defines a basic API to both trigger and cancel the execution of the test scenarios.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhW1CZlbfVek%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhW1CZlbfVek&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhW1CZlbfVek%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dcde9f8eb55cf810a8a92b491b51ed0/href">https://medium.com/media/0dcde9f8eb55cf810a8a92b491b51ed0/href</a></iframe><p><strong>Quarkus dev runner</strong>: This sample service has the sole purpose of running a mvn clean compile quarkus:dev command on a Quarkus project. Similar to the <em>Test scenario runner</em>, triggering the command should be done by channels.</p><p>Thus, the life cycle implementations of this service would contain:</p><ul><li>start: nothing is necessary to be done on the start phase since the command will be triggered by channels.</li><li>stop: kill the active process associated with the Quarkus dev execution.</li><li>satisfyRequirements: Possible requirements are (i) check if the given project is compatible with Quarkus; (ii) check if java 11+ is available; (iii) check if maven 3.6.2+ is available. If these conditions are met, then the service can startup.</li></ul><p>Since the execution of this service should be triggered by channels, a capability must be associated with the service, which defines a basic API to both trigger and cancel the execution of the Quarkus dev.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQHEV0oqySiM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQHEV0oqySiM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQHEV0oqySiM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8437dad4ae9ba1e74ad58359be1c5404/href">https://medium.com/media/8437dad4ae9ba1e74ad58359be1c5404/href</a></iframe><p>Keep in mind that the examples above use NodeJS code to execute the operations on the terminal. As mentioned, services can also reach HTTP endpoints, enabling code in other languages to be run, such as java.</p><h3>Round trip service sample</h3><p>Now that we’ve learned about the concepts of the backend services infrastructure, let’s inspect another sample that is meant to establish a communication between the editor and a simple java service. With this sample, we will see how a round trip would be done, starting with the editor and going all the way to a java service.</p><p>The java service that will play a part in this sample will simply return a greeting for a given name after a given delay, like Hello, Guilherme!. The intention with the delay is to show that services can take some time to process requests and that’s fine because all the communication is based on promises. Notice that, wherever the flow starts, the associated promise must be handled at some point, either on the channel or in the editor.</p><p>The target channel on this sample will be the VS Code, but the same capability implementation could be shared with the Desktop channel. In practice, both channels would be using the local Quarkus app for reaching the java service. On the other hand, Chrome and Online channels would require a slightly different approach to accomplish the same goal, such as having the Quarkus app deployed on some remote server.</p><h4>Workflow</h4><p>The workflow of this example will be done as follows:</p><ol><li>Starting with some action of the user, the editor calls an API available on the envelope with args name=&quot;Guilherme&quot;, delay=5000. This means that the java service will wait 5000 ms (5 seconds) to return the response;</li><li>The envelope calls the channel following the associated capability API;</li><li>The channel accesses the capability through the backend proxy, which resolves the required service with the backend manager;</li><li>The java service is then accessed through its REST endpoint in the Quarkus app;</li><li>The java service waits for 5s and then return the response containing the string Hello, Guilherme!;</li><li>The resolved promise is passed back all the way to the editor;</li><li>The editor handles the response.</li></ol><p>The following diagram summarizes the steps above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRn8mURfs1AoKpHDt8fDHA.png" /><figcaption>The workflow of the round trip service.</figcaption></figure><blockquote><strong>Note</strong>: If we draw the workflow of the example services that we’ve seen earlier on this post, like the Test Scenario Runner, the User would be directly connected with the channel since the editor and the envelope do not participate in the flow. Also, the backend manager would access a pure NodeJS service, instead of reaching the Quarkus app.</blockquote><h4>Implementation</h4><p>Now, let’s see how we would implement this sample service — code snippets will be provided for the most relevant parts.</p><p><strong>Step 1</strong>: Capability API</p><p>The first step is to define the capability API so all the code can follow. As we’ve seen on the diagram above, the API for this sample service will contain only one method: hello(name, delay).</p><p><strong>Step 2: </strong>Quarkus service (Java)</p><p>The second step is to create the java code that will do all the hard work. Remember that the java code must live on the <a href="https://github.com/kiegroup/kogito-tooling-java">kogito-tooling-java</a> repository, which is picked up by the building process of the backend VS Code extension.</p><p>To get started, the <em>SampleService.java</em> (omitted) is a simple interface that defines our hello method, and, as discussed, the actual implementation should wait for the given delay and then return the response. Here’s how it could be implemented:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce07bdca22fca29987f1ffa6f026f424/href">https://medium.com/media/ce07bdca22fca29987f1ffa6f026f424/href</a></iframe><p>In order for channels to be able to access this service, we need to provide a REST endpoint for that. On the following code, <em>HelloRequest.java</em> and <em>HelloResponse.java</em> (omitted) are just DTOs. Here’s how this endpoint could be implemented:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7e80a5a73a471bdec140871dead7269/href">https://medium.com/media/b7e80a5a73a471bdec140871dead7269/href</a></iframe><p>Now the service is ready to be accessed from its REST endpoint /sample.</p><p><strong>Step 3</strong>: Editor (Java)</p><p>As a third step, let’s focus now on the other edge of this communication: <em>the editor</em>. Since this sample is meant for the KIE GWT editors, the code for this part would live on <a href="https://github.com/kiegroup/appformer">appformer</a> and <a href="https://github.com/kiegroup/kie-wb-common">kie-wb-common</a> repositories.</p><p>The most important code to create on the editor is the API for accessing the envelope. Here’s how this API could be implemented:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bc773b93037647941ba386434782423/href">https://medium.com/media/4bc773b93037647941ba386434782423/href</a></iframe><p>Notice that, the method signature is pretty similar to the capability API that we’ve defined on Step 1. The only difference is that the return promise object (String) must be wrapped in a <em>CapabilityResponse</em>, which is already available on appformer repository. This way, editors could call and handle the response like in the following code snippet:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b9423d5aab10a53e18c81f88abc0f319/href">https://medium.com/media/b9423d5aab10a53e18c81f88abc0f319/href</a></iframe><p>In addition to that, all classes associated with accessing the envelope must be created, such as <em>NoOpSampleService.java</em>, <em>SampleService.java</em>, <em>SampleServiceWrapper.java</em>, and <em>SampleServiceProducer.java</em>. To accomplish that, there are plenty of examples that can be found <a href="https://github.com/kiegroup/appformer/tree/master/appformer-kogito-bridge/src/main/java/org/appformer/kogito/bridge/client">here</a>.</p><p><strong>Step 4</strong>: Envelope and channel code (Typescript)</p><p>The fourth and last step is to prepare the communication between the java service and the editor through the envelope/channel. For that, we will need a couple more lines of code, although they are pretty straightforward.</p><p>Let’s divide this part into 8 simple inner steps.</p><blockquote><strong>Note</strong>: To make it easier to understand, the images that follow show the diff between files, and their path is located on the top of the image.</blockquote><p><strong>Step 4.1</strong>: Set up an identifier for the service. In this case, it will be SAMPLE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*COf6jjKB-qNPXpXj8h59tw.png" /><figcaption>Setting up an identifier for the service.</figcaption></figure><p><strong>Step 4.2</strong>: Create the typescript capability API compatible with the one that we’ve created in Step 3. Notice that the response (string) is wrapped in a <em>CapabilityResponse</em> object as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*A-4v0WeBaRn0yUs66D_zdQ.png" /><figcaption>Creating the capability API.</figcaption></figure><p><strong>Step 4.3</strong>: Include the method that will bridge the communication between editor and envelope on the <em>CapabilityChannelApi</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*yFQg18UeztzjBtPC8Kqefg.png" /><figcaption>Creating the method that will bridge the communication between editor and envelope.</figcaption></figure><p><strong>Step 4.4</strong>: Create the implementation of the service associated with the capability for the VS Code channel. Notice that this service extends <em>LocalHttpService</em> and implements the capability that we’ve created. Moreover, all life cycle method implementations (start, stop, and satisfyRequirements) are inherited from the <em>LocalHttpService</em>, which can be overridden if necessary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*nqpjaUn899mfqJNsxr_Sjg.png" /><figcaption>Creating the implementation of the service for the VS Code channel.</figcaption></figure><p><strong>Step 4.5</strong>: Expose the capability API on the envelope. The editors can then access it from window.envelope.sampleService through the code that we’ve developed in Step 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*Nz2hGQRuuzF_AoJacGJqZg.png" /><figcaption>Exposing the capability API on the envelope.</figcaption></figure><p><strong>Step 4.6</strong>: Implement the glue code for the editor and the envelope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3bV2XniyNTC9vNAFecm07g.png" /><figcaption>Glue code for the editor and the envelope.</figcaption></figure><p><strong>Step 4.7</strong>: Implement the access to the capability through the backend proxy. In this case, the implementation is being done for the VS Code channel. Since this call will be handled by the editor, the channel only intermediates the call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QgcwWDxp5EndaODepgrfew.png" /><figcaption>Accessing the service associated with the capability through the backend proxy.</figcaption></figure><p><strong>Step 4.8</strong>: Register the newly created service as a lazy service on the backend manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9ay_s55997ir7N8XG8pgA.png" /><figcaption>Registering the service as a new lazy service.</figcaption></figure><p>After all these steps, the service should be good to go. It means that, once the user interacts with the editor, a call will be triggered and transferred all the way to the java service, which will process and return the appropriate response back to the editor in a promise-based mechanism.</p><h3>Final remarks</h3><p>In this post, we’ve seen how the backend services infrastructure for Kogito Tooling is designed. Also, we’ve covered some examples and practical type-safe implementation of a java service that communicates with the editor through the envelope.</p><p>Stay tuned because all the possibilities that this new infrastructure enables are yet to come!</p><p>And that’s all for today. Thanks for reading! 😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8be682a60b88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kie-foundation/backend-support-on-kogito-tooling-8be682a60b88">Backend support on Kogito Tooling</a> was originally published in <a href="https://medium.com/kie-foundation">kie-tooling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>