Occurances of a process pattern within a single case

Hi there,

is there any statement to count the occurances of a process pattern within a single case?

e.g. “set price block - change price - remove price block” occurs 3 times for case #123

Potential Use Case:
How often is a price block removed without a price change.
So far I can only count the cases for which this pattern occurs at least once (PROCESS EQUALS/MATCH_PROCESS) but not how often.

Very thankful for some advice!

Best regards
Manoah Rudisile

Hi Manoah,

thank you for your question.

You can solve that task using our ACTIVITY_LEAD function, which will return the next activity for each activity.

So you could do this:

FILTER "Activities"."Activity" = 'set price block' 
AND ACTIVITY_LEAD("Activities"."Activity") = 'change price'
AND ACTIVITY_LEAD("Activities"."Activity", 2) = 'remove price block';

This should filter on all ‘set price block’ activities which are followed by ‘change price’ and ‘remove price block’. In your actual query, you can then simply count the activities for each case. Alternatively, you can also use the above condition inside a CASE WHEN.

Your use case is pretty similar to the “Ping Pong Cases” use case, in particular the “Direct Ping Pong Cases”. You can find this as an example in our Examples and Use Cases section in the documentation.

Hope this helps!

Cheers
David

Hi David,

really appreciate your support. Thanks!

If I got it right, with the ACTIVITY_LEAD function I can only count the occurances of one defined process pattern e.g.:

set price block - change price - remove price block

Right?
Probably my description of the use case wasn’t accurate enough. Sorry for that.
Between those activities there can be several other. It is only important, that the sequence is correct:

set price block - … - change price - … - remove price block

A price block can be removed at any time in the process. What I am interested in is, if there has been a price change before.

I hope this made my request somehow clearer.

Thanks again.
Manoah