Counter annotation on a task definition


#1

Hi everyone

I have just started using bpmn.io and I find it very useful. I wanted to ask you about the ability to add a counter number in the task definition. The goal is to provide such a counter for the user, so he can see how many times this part of process was accessed. I found nice video that shows this approach, but I was not able to fine any API, or example implementation for this. I am talking here about those blue circles in the corner of tasks. Here is lik to video:

Here is screen of this feature:

What kind of feature of bpmn is it ?


#2

Sorry for reliving this topic, but I really would like an answer. The documentation doesn’t help…
Can anyone help?


#3

Counters are a special case of overlays:

image

Implement them using the overlays service:

var overlays = bpmnJS.get('overlays');

// attach an overlay to a node
overlays.add('SCAN_OK', {
  position: {
    bottom: 0,
    right: 0
  },
  html: '<div>Mixed up the labels?</div>'
});