Process Analytics - March 2023 News
Tags: news, bpmn, api, visualization
Published: 2023-04-06 09:09:00

Welcome to the Process Analytics monthly news 👋.

Our “always” reminder: The goal of the Process Analytics project is to provide a means to rapidly display meaningful Process Analytics components in your web pages using BPMN 2.0 notation and Open Source libraries.

Greetings, fellow process enthusiasts 👋 As we welcome the first signs of spring, the Process Analytics team has been hard at work, bringing you some exciting updates for March. We recently took the stage at the Bonita Day Paris event, where we showcased our project to an enthusiastic audience. And that's not all! We've also been busy cooking up a new API that lets you style BPMN elements with just a few lines of code. We're always looking for ways to improve your workflow, so read on for more details on these exciting developments!

## Highlights from our participation at Bonita Day

We recently had the pleasure of participating in [Bonita Day Paris 2023](https://fr.bonitasoft.com/ecosysteme/evenements/bonita-day-paris-2023), an event that brings together experts and enthusiasts in the field of business process management and automation. Not only did we get to showcase our latest project features and functionalities, but we also had the chance to network with other professionals in the industry and hear feedback from analysts and clients of Bonitasoft. 

![People presenting a Process Analytics demo at Bonita Day Paris 2023](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3pv33hgbi8toyewcob8a.jpg)

We introduced attendees to the exciting world of process mining, and explained our project, [Process Analytics](https://process-analytics.dev/?utm_source=dev.to&utm_medium=display&utm_campaign=news). To give attendees a deeper understanding of our project's capabilities, we demonstrated process monitoring in two scenarios: offline and online. Using [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js), we showed how developers can use our libraries to create custom visualizations that fit their specific needs. 

Overall, it was a great experience for us to connect with other experts in the field and demonstrate the unique benefits of the Process Analytics project.

## Our demo at Bonita Day: a look inside

Our [live demo](https://github.com/process-analytics/bonita-day-demo-2023) at Bonita Day gave attendees a deep look into the capabilities of our project. We showed two process monitoring scenarios that demonstrated the various features of the bpmn-visualization TypeScript library, including applying CSS and overlays, registering interactions, and styling elements programmatically.

We demonstrated the interaction possibilities of the library that allows us to explore the different BPMN processes used in the demo and navigate to the sub-process, which was also part of the presentation.

![Demo part 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2jxbujpgmh4mxxkhleh.gif)

In case monitoring, we demonstrated the ability to visualize the results of a mock recommendation system and take actions by interacting with the BPMN elements.

![Demo part 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/37hffgyrn128h5baklhr.gif)

Our process monitoring scenario also showed the happy path animated on the BPMN process diagram. 

For more details, check out the [demo on GitHub](https://github.com/process-analytics/bonita-day-demo-2023).

## The Process Analytics Project website

In [February](https://medium.com/p/5f0546b55b26), we gave [our website](https://process-analytics.dev/?utm_source=dev.to&utm_medium=display&utm_campaign=news) a fresh new look, and in March we focused on reworking the menu and improving the design for mobile users (see figure below). We're happy to announce that we have more improvements in the pipeline, so stay tuned for further updates in the coming months!

![The Process Analytics website rendered on mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqrabzbssve0cswsc90h.png)


## bpmn-visualization TypeScript library

In **March**, we released 2 versions: [0.32.0](https://github.com/process-analytics/bpmn-visualization-js/releases/tag/v0.32.0) & [0.33.0](https://github.com/process-analytics/bpmn-visualization-js/releases/tag/v0.33.0). The former includes several improvements, while the latter introduces the new update style API for programmatically styling BPMN elements.

### Update style programmatically

Release [0.33.0](https://github.com/process-analytics/bpmn-visualization-js/releases/tag/v0.33.0) includes a new functionality that allows you to easily and programmatically style BPMN elements. Let's take a sneak peek at how to use this new feature with an example.

Let's say you want to monitor the progress of the execution of a BPMN process dynamically and progressively, like in the "Supplier Contact" process shown in our [case-monitoring](https://process-analytics.github.io/bonita-day-demo-2023/?use-case=case-monitoring)  demo at Bonita Day. 

![BPMN elements with specific styles](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4i5x8tvmb1uhtzjkfsur.png)

With the update style API, you can achieve this easily by defining three states for the style - the activity currently under execution, the element that has just finished execution, and the elements that are already executed. To configure the style of the activity currently under execution, you can use the [updateStyle](https://process-analytics.github.io/bpmn-visualization-js/api/classes/BpmnElementsRegistry.html#updateStyle) method with the following parameters:

```typescript
bpmnVisualization.bpmnElementsRegistry.updateStyle(activityId,
   {
      fill: {color: 'blue', opacity: 10},
      font: {opacity: 'default'},
      opacity: 'default',
      stroke: {color: 'blue', width: 3},
   });
```

For the element that has just finished execution, you can reduce its opacity using the **updateStyle** method like this:

```typescript
bpmnVisualization.bpmnElementsRegistry.updateStyle(
  lastExecutedId, {opacity: 50});
```

Finally, for the elements that are already executed, you can further reduce their font and fill opacities using the updateStyle method with the following parameters:

```typescript
bpmnVisualization.bpmnElementsRegistry.updateStyle(
  pastExecutedId,
  {
    font: {
      opacity: 15,
    },
    opacity: 20,
  });
```

In the coming weeks, we will provide several examples demonstrating the usage of this API in various use cases, and we also have plans for several improvements to be made on this API.

## That’s All Folks!

That’s everything we were up to in March and we hope you found something in there to like. Stay tuned for more cool stuff coming up this spring 👋.

In the meantime, stay on top of the latest news and releases by following us:

* Website: [https://process-analytics.dev](https://process-analytics.dev/?utm_source=dev.to&utm_medium=display&utm_campaign=news)
* Twitter: [@ProcessAnalyti1](https://twitter.com/ProcessAnalyti1)
* GitHub: [https://github.com/process-analytics](https://github.com/process-analytics)
* Discord: [Join our server!](https://discord.com/invite/HafnBYsRXd)
* YouTube: [Process Analytics YouTube channel](https://www.youtube.com/@process-analytics)

*Cover photo "Spring ball" by [Hannah Jacobson](https://unsplash.com/photos/pTfdcT0hxGc) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)*