Blog Posts BPMN DMN

CUSTOMIZE PATH AND NAME OF GENERATED DMN/BPMN SVGs ON VS CODE

Blog: Drools & jBPM Blog

To allow new automated workflows and more customizability when creating or editing .dmn/.bpmn files on VS Code, on Kogito Tooling 0.16.0, we introduced new extension settings that allow users to define where to save and what to call the generated SVG files.

Check out the example below:

AVAILABLE SETTINGS

Both DMN e BPMN Editors now have this feature, so to start using it, all you have to do is configure the new available settings:

For this, you will need to access the settings page on VS Code or edit your settings.json file directly:

Svg Filename Template: Define the name of the generated SVG file.
Note: It must not contain a sub-path, as this should be defined in the SVG File Path setting.

SVG File Path: This setting is used to define the path where the generated SVG file should be saved.
Note: It must be a writable path anywhere on your file system.

For both settings, some predefined variables can be used to compose their values, as they will be replaced with the corresponding values according to the table below.

PREDEFINED VARIABLES

Let’s say you have a workspace with the following structure opened on your VS Code instance and you are editing myDecision1.dmn on the DMN Editor extension:

These are the variables available and their respective values for the case described above:

Token Value
${workspaceFolder} /user/home/myProject
${fileDirname} /user/home/myProject/decisions
${fileExtname} .dmn
${fileBasename} myDecision1.dmn
${fileBasenameNoExtension} myDecision1

These predefined variables were based on VS Code’s Predefined Variables, except they are only available for tasks.json and launch.json configuration files. (Support for the settings.json configuration file is being tracked on the following issues: https://github.com/microsoft/vscode/issues/2809 and https://github.com/microsoft/vscode/issues/46471)

EXAMPLE OF USAGE

Using the same workspace structure detailed above we might want to save generated SVG files in the myProject/assets/decisions/.dmn/ directory with the following name: "myDecision1.svg".
For that the settings should have the following values:

kogito.dmn.svgFilenameTemplate ${fileBasenameNoExtension}.svg
kogito.dmn.svgFilePath ${workspaceFolder}/assets/decisions/${fileExtname}/

The same goes for BPMN files.

Feel free to leave your feedback and questions in the comment section!

The post CUSTOMIZE PATH AND NAME OF GENERATED DMN/BPMN SVGs ON VS CODE appeared first on KIE Community.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/customize-path-and-name-of-generated-dmn-bpmn-svgs-on-vs-code/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×