Duration Between An Activity And Current Time

Overview

The Duration Between an Activity and Current Time enrichment calculates how much time has elapsed between a specific activity occurrence in your process and the current moment when the analysis is run. This powerful time-based enrichment enables real-time monitoring of process aging, helping organizations track service level agreements, identify bottlenecks, and monitor open items in their processes. By creating a new case attribute with the calculated duration, you can easily filter, sort, and analyze cases based on how long ago critical activities occurred.

This enrichment is particularly valuable for operational dashboards and real-time process monitoring scenarios. Unlike static duration calculations between two activities, this enrichment provides dynamic time measurements that update each time your dataset is refreshed, making it ideal for tracking aging cases, monitoring response times, and ensuring timely process completion. The enrichment supports various time units from seconds to years, allowing you to choose the most appropriate granularity for your analysis needs.

Common Uses

  • Track aging of open support tickets since initial customer contact
  • Monitor time elapsed since last status update in approval workflows
  • Calculate days since order placement for unfulfilled orders
  • Measure time since patient admission in healthcare processes
  • Track aging of unpaid invoices since issuance
  • Monitor time elapsed since last quality check in manufacturing
  • Identify cases requiring escalation based on time since specific milestones

Settings

New Attribute Name: The name of the new case attribute that will store the calculated duration. Choose a descriptive name that clearly indicates what time period is being measured, such as "Days Since Registration" or "Hours Since Last Update". This attribute will be added to your case table and can be used in filters, calculators, and other enrichments. Avoid using special characters and ensure the name doesn't conflict with existing attributes.

Activity Name: Select the activity from which you want to calculate the time difference to the current moment. This dropdown lists all activities present in your dataset. The enrichment will look for occurrences of this activity in each case and calculate the duration from that activity's timestamp to the current time. If a case doesn't contain the selected activity, the new attribute will be set to null for that case.

Duration Type: Choose the unit of time for the duration calculation. Options include:

  • TimeSpan: Full time representation (days:hours:minutes:seconds)
  • Seconds: Total seconds elapsed
  • Minutes: Total minutes elapsed
  • Hours: Total hours elapsed
  • Days: Total days elapsed (default for most business processes)
  • Weeks: Total weeks elapsed (rounded to nearest week)
  • Months: Total months elapsed (using 30.44 days per month average)
  • Years: Total years elapsed (accounting for leap years with 365.25 days)

Select the unit that best matches your analysis needs and reporting requirements.

Allow Fractional Periods: When enabled, allows decimal values in the duration calculation (e.g., 2.5 days, 1.75 hours). When disabled, values are rounded to the nearest whole number. This setting only applies when Duration Type is not TimeSpan. Enable this for more precise calculations or disable it for cleaner integer values in reports. Fractional periods are particularly useful for shorter time units like hours or days where precision matters.

Examples

Example 1: Support Ticket Aging

Scenario: A customer service team needs to monitor how long support tickets have been open since the initial "Ticket Created" activity to ensure they meet their 48-hour response SLA.

Settings:

  • New Attribute Name: Days Since Ticket Created
  • Activity Name: Ticket Created
  • Duration Type: Days
  • Allow Fractional Periods: true

Output: The enrichment creates a new case attribute "Days Since Ticket Created" with decimal values showing the precise number of days elapsed. For example:

  • Case 1001: 0.5 (created 12 hours ago)
  • Case 1002: 2.3 (created 2 days and 7 hours ago)
  • Case 1003: 5.8 (created almost 6 days ago)

Insights: The team can now create filters to identify tickets older than 2 days that require immediate attention, set up alerts for tickets approaching SLA breach, and track average aging trends over time.

Example 2: Manufacturing Quality Control

Scenario: A manufacturing plant needs to track time elapsed since the last quality inspection for products still in the production line to ensure inspections occur every 4 hours.

Settings:

  • New Attribute Name: Hours Since Last Inspection
  • Activity Name: Quality Inspection Completed
  • Duration Type: Hours
  • Allow Fractional Periods: false

Output: The enrichment generates an integer attribute showing whole hours since the last inspection:

  • Batch A-100: 2 hours
  • Batch A-101: 5 hours (requires immediate inspection)
  • Batch A-102: 1 hour

Insights: Production managers can quickly identify batches overdue for inspection, optimize inspection scheduling, and ensure compliance with quality standards.

Example 3: Healthcare Patient Monitoring

Scenario: A hospital emergency department tracks how long patients have been waiting since triage to prioritize care and meet target wait times.

Settings:

  • New Attribute Name: Minutes Since Triage
  • Activity Name: Patient Triaged
  • Duration Type: Minutes
  • Allow Fractional Periods: false

Output: Creates a minute-based counter for each patient:

  • Patient ID 5001: 45 minutes
  • Patient ID 5002: 120 minutes
  • Patient ID 5003: 15 minutes

Insights: Staff can immediately identify patients with excessive wait times, balance workload across available resources, and track performance against target metrics.

Example 4: Invoice Aging for Accounts Receivable

Scenario: The finance department needs to monitor unpaid invoices to manage cash flow and identify invoices requiring collection efforts, with particular focus on those over 30, 60, and 90 days old.

Settings:

  • New Attribute Name: Invoice Age (Days)
  • Activity Name: Invoice Sent
  • Duration Type: Days
  • Allow Fractional Periods: false

Output: Produces an integer day count for each unpaid invoice:

  • Invoice 2024-1001: 15 days
  • Invoice 2024-1002: 67 days (requires collection call)
  • Invoice 2024-1003: 92 days (escalate to collections)

Insights: The finance team can categorize invoices into aging buckets, prioritize collection efforts on older invoices, and identify customers with payment issues.

Example 5: Procurement Process Monitoring

Scenario: A procurement team tracks time since purchase requisition approval to ensure timely order placement and identify delays in the procurement process.

Settings:

  • New Attribute Name: Days Since PR Approval
  • Activity Name: Purchase Requisition Approved
  • Duration Type: Days
  • Allow Fractional Periods: true

Output: Creates a precise day count showing procurement delays:

  • PR-2024-501: 1.2 days (normal processing)
  • PR-2024-502: 8.7 days (investigate delay)
  • PR-2024-503: 0.4 days (recently approved)

Insights: Procurement managers can identify bottlenecks in the purchasing process, track vendor selection efficiency, and ensure timely order placement to maintain inventory levels.

Output

The enrichment creates a new case-level attribute in your dataset with the calculated duration between the selected activity and the current time. The attribute's data type depends on your Duration Type selection: TimeSpan type for TimeSpan duration, floating-point number for fractional periods, or integer for whole number periods. The attribute value updates dynamically each time the dataset is refreshed, providing real-time aging information.

Cases where the selected activity doesn't exist will have null values for the new attribute, allowing you to easily identify and filter cases missing the activity. The new attribute integrates seamlessly with other mindzie Studio features - use it in filters to identify aged cases, in calculators for average aging analysis, or in dashboards for real-time monitoring. You can also combine this enrichment with performance categorization enrichments to automatically classify cases based on their age (e.g., "New", "Aging", "Overdue").

The enrichment intelligently handles both date-only and datetime comparisons. When timestamps include time components, it calculates precise durations. When dealing with date-only values, it compares at the date level, ensuring accurate calculations regardless of your data's time precision. This makes the enrichment versatile for various data sources and process types.


This documentation is part of the mindzie Studio process mining platform.

An error has occurred. This application may no longer respond until reloaded. Reload ??