This zone computes the variants, orders them by frequency, and assigns them ids based on this frequency. The workflow dataset is then augmented with its variant id.

![Variants.png](rcFG3LI5L809)

The first python recipe concatenates all activities per case id ordered with the sorting column, which is the variant. It also picks up the first and last activities which are the start and end activities.

Then in the second grouping recipe, variants are regrouped together and counted. Then the windows recipe assigns an id for each variant based on their frequency, the first id being for the top variant in terms of frequency. The final join recipe joins back the variant id to the initial workflow dataset.


