Skip to main content
Question

Process flow analysis

  • March 31, 2025
  • 4 replies
  • 67 views

Bharath
Level 4
Forum|alt.badge.img

PROCESS FLOW

Need some assistance, 
I have a CaseID, Activity and Timestamp. I need to get all the cases where the activity flow is A to B to C. 
(NOTE: the activities don't have to be directly followed by) 
I cannot use MATCH_PROCESS_REGEX or any other commads. I need to used CASE WHEN, AND, ACTIVITY_LEAD etc... to solve this. 
Please help me out. 
My approach
CASE WHEN "tab"."Activity" = 'A'
AND ACTIVITY_LEAD(CASE WHEN "tab"."Activity" = 'A' THEN "tab"."Activity" END) = 'B' 
AND ACTIVITY_LEAD(CASE WHEN "tab"."Activity" = 'B' THEN "tab"."Activity" END) = 'C'  
THEN CaseID
END

4 replies

abhishek.chatu14
Level 11
Forum|alt.badge.img+4

Try something like this 

CASE WHEN PROCESS EQUALS 'Activity 1' TO ANY TO 'Activity 2' TO ANY TO 'Activity 3' END THEN CaseID
END

 

I am actually not sure if this works with CASE WHEN


Bharath
Level 4
Forum|alt.badge.img
  • Author
  • Level 4
  • April 1, 2025

Yes i did not try like this, i used this PROCESS EQUALS in a PU_COUNT function. but the thing is i should solve this using only ACTIVITY_LEAD concept. Can you help out with it?

 


abhishek.chatu14
Level 11
Forum|alt.badge.img+4

In your case the activities don't have to be directly followed by each, try going through the following will help you get a solution 

Ping Pong Cases
 


Bharath
Level 4
Forum|alt.badge.img
  • Author
  • Level 4
  • April 2, 2025

Got it. Thank you for the insights.