On This Page

Process Mining Functions

Functions specific to process mining, for analyzing event sequences and process flows.

Understanding Process Mining Functions

These functions help you analyze the sequence of activities within cases:

  • Directly followed by: Activity A is immediately followed by activity B (no activities in between)
  • Eventually followed by: Activity A is followed by activity B at some point (other activities may occur between)

Common Patterns

  • Check Immediate Sequence:

    directlyFollowedBy("Submit", "Review")
    // Returns true if Submit → Review with no events between
  • Check Eventual Sequence:

    eventuallyFollowedBy("Order Placed", "Order Shipped")
    // Returns true even if there are activities between
  • Find Process Deviations:

    // Cases where approval was skipped
    eventuallyFollowedBy("Request", "Complete") && 
    not eventuallyFollowedBy("Request", "Approve")
  • Identify Rework Patterns:

    // Activity repeats immediately (self-loop)
    directlyFollowedBy("Review", "Review")
  • Compliance Checks:

    // Verify mandatory sequence
    if(eventuallyFollowedBy("Create", "Approve"), "Compliant", "Missing Approval")

directlyFollowedBy

(activity1, activity2)

Checks whether one activity is immediately followed by another activity in the case.

Parameters
activity1 string The first activity name
activity2 string The activity that should directly follow
Returns boolean
Examples
directlyFollowedBy("Submit", "Review") true if Submit is immediately followed by Review
See Also

eventuallyFollowedBy

(activity1, activity2)

Checks whether one activity is eventually followed by another activity in the case.

Parameters
activity1 string The first activity name
activity2 string The activity that should eventually follow
Returns boolean
Examples
eventuallyFollowedBy("Order", "Ship") true if Order is eventually followed by Ship
Notes

Returns true even if there are other activities between the two.

See Also