Your Queries Run in Milliseconds. Why Does Your Business Process Take Days?
🏢 ⏱️ 🤖
YOUR QUERIES RUN IN MILLISECONDS. WHY DOES YOUR BUSINESS PROCESS TAKE DAYS?
From Software Digital Twins to understanding how your organization actually works
SOFTWARE DIGITAL TWIN · PROCESS MINING · ORGANIZATIONAL PERFORMANCE · ENTERPRISE AI
Exploring what a Digital Twin could bring to your organization
In my previous articles, I explored how a Software Digital Twin could connect technical knowledge, and how Conway's Law helps explain the organization behind the software.
In Beyond Conway's Law , I discussed how connected knowledge could support better decisions about software boundaries and team responsibilities.
In this post, we take that exploration one step further.
What benefits could a Digital Twin bring to understanding how a company actually works?
By connecting software behavior, business events and organizational responsibilities, we could gain a clearer view of where delays accumulate, how work moves between departments and which changes deserve closer investigation.
Drawing on research into process mining and Digital Twins of Organizations, we will explore these possibilities through an illustrative business example.
An order that takes seconds to enter, but days to confirm.
1. Fast software. Slow business.
Companies spend considerable effort making their software faster.
They optimize SQL queries, introduce caching, redesign APIs and monitor response times.
These improvements matter. A slow database can affect thousands of users and make an entire business process harder to execute.
But there is another kind of performance that technical monitoring alone cannot explain.
Consider a hypothetical company using an ERP system.
A sales representative enters an order. The application responds quickly. SQL Server saves the data. No errors appear.
Yet the customer receives the final confirmation three days later.
What happened between those two moments?
- The discount required an additional approval.
- One product needed an availability check.
- Missing information sent the order back to sales.
- The corrected order entered another approval queue.
- A scheduled integration transferred the final status overnight.
Every individual software operation may have performed correctly.
The delay accumulated across decisions, queues, corrections and handoffs.
Improving one query might help one step. Understanding the total delay requires following the work across the entire process.
2. Your documented process and your observed process
Ask a company how order confirmation works, and you may receive a clear process diagram:
THE DOCUMENTED PROCESS
ORDER → APPROVAL → SHIPMENT → INVOICE
Now examine the recorded events.
You may discover repeated checks, partial deliveries, corrections and alternative routes that the diagram does not show.
Some variations are necessary. Others may reflect outdated rules or avoidable friction.
Process mining helps investigate that difference.
It uses recorded events to discover process behavior, compare observed execution with a reference model and analyze performance.
The Process Mining Manifesto describes these foundations: process discovery, conformance checking and process enhancement.
For a SQL Server professional, there is a useful analogy.
An execution plan helps us investigate how a query runs. Recorded business events help us investigate how work moves through a company.
The analogy has limits. Business processes include human decisions, changing priorities and activities that may never be recorded.
But the analytical habit is familiar: inspect the evidence before deciding where the bottleneck is.
3. The Software Digital Twin explains implementation. Events reveal execution.
A Software Digital Twin can connect source code, stored procedures, database structures, interfaces and business rules.
This helps answer questions such as:
Which components implement order approval, and what might be affected if the approval rule changes?
Business events add another dimension:
- What happened?
- Which business objects were involved?
- When did it happen?
- Which system recorded it?
- Which role or department participated, where that information is available?
Connecting these two views could support a more informative investigation.
A PROPOSED CONNECTED KNOWLEDGE MODEL
SOFTWARE IMPLEMENTATION
Code · SQL procedures · Tables · APIs · Rules
↕
OBSERVED BUSINESS EXECUTION
Events · Objects · Timestamps · Process variants
↕
ORGANIZATIONAL CONTEXT
Responsibilities · Policies · Exceptions · Support knowledge
For example:
Which delayed orders passed through this validation rule, which application versions implemented it, and what exceptions are documented?
This integration is an architectural proposal for extending the Software Digital Twin. Building it requires reliable identifiers and mappings between technical components and business events.
The connection between organizational digital twins and process mining is already a research topic, including Park and van der Aalst's Realizing A Digital Twin of An Organization Using Action-oriented Process Mining .
The opportunity is to connect the implementation of a rule with its observed operational context.
4. An ERP process involves more than one object
Following an order sounds straightforward until you examine its relationships.
One order can contain many lines. Those lines can be delivered in different shipments. One shipment can include items from several orders. Invoices can cover partial deliveries.
Which identifier should define the process?
The order? The shipment? The invoice?
Each choice gives a useful perspective, but forcing every event into one perspective can lose relationships or duplicate events.
Object-centric process mining addresses this modeling problem.
Instead of assigning every event to a single case, it allows events to relate to objects of different types.
Wil van der Aalst explains this challenge in Object-Centric Process Mining: Dealing with Divergence and Convergence in Event Data .
For enterprise software, this matters because the business operates through interconnected objects, rather than one isolated workflow.
A connected representation can preserve more of that structure and help us investigate interactions between purchasing, inventory, sales and accounting.
5. Your database contains data. Does it contain the history you need?
There is an important practical question before any AI or process-mining project begins.
Do the available records actually describe the process?
An order table might tell you that an order is currently approved. It may not tell you how many times approval was requested, when the order was corrected or why it returned to sales.
The current state is not necessarily the execution history.
Useful sources can include application event logs, workflow histories, audit records and integration logs.
SQL Server Change Data Capture and system-versioned temporal tables can also contribute, where available and configured appropriately.
However, a row change needs interpretation before it becomes a meaningful business event.
Updating a status column might represent approval, an automated correction or an administrative action. The data model alone may not explain which one occurred.
Timestamp interpretation matters too.
With completion timestamps alone, we can measure elapsed time between recorded events. We cannot reliably separate active work from waiting without additional information.
A useful model must make these gaps visible.
6. What AI can add to the investigation
AI can make connected knowledge easier to explore.
An assistant could retrieve relevant process paths, business policies, code locations and support incidents in response to a question.
Show the longest order-confirmation paths, the rules involved and the documented reasons for additional approval.
Numerical results should come from explicit queries or analytical tools. The assistant can explain those results and connect them to supporting evidence.
Answers should identify their sources, observation period and relevant model or software versions.
Finding that delayed orders frequently require a particular approval is a useful observation. It does not, by itself, prove that the approval causes the delay.
Those orders might also be larger, more complex or more likely to contain unavailable products.
AI can help formulate and investigate hypotheses. A plausible explanation still needs validation.
7. From understanding the past to exploring possible changes
Once a process is understood, the next question becomes:
What could happen if we changed the way this process works?
We might explore scenarios such as:
- Increasing the frequency of an integration job.
- Automating a well-defined validation.
- Changing an approval threshold.
- Adding capacity to a recurring queue.
- Preparing for a higher volume of incoming orders.
Research such as PMSD: Data-Driven Simulation Using System Dynamics and Process Mining explores how event data and process-mining results can support simulation models.
Simulation adds its own requirements: explicit assumptions, appropriate modeling of resources and dependencies, and validation against observed behavior.
Faster approval might simply move the queue to the warehouse. An improvement to one department may have little effect on total completion time.
The value of simulation is exploring those interactions before implementing a change.
8. How close are we to a Digital Twin of the organization?
Digital Twin terminology deserves some precision.
In the distinction discussed by Lyytinen, Weber, Becker and Pentland in Digital twins of organization: implications for organization design :
- A digital model represents selected aspects of reality.
- A digital shadow is automatically updated from observed reality.
- A digital twin, in the stronger sense, adds two-way interaction between model and reality.
A continuously refreshed process map may therefore be better described as a digital shadow, even if it provides substantial business value.
The same research explains why an organization is harder to represent than a machine.
People interpret policies, negotiate priorities, learn and change their behavior. Conflicts and new ways of working can emerge.
A model of recorded operations captures part of this reality.
It can support organizational understanding without being a complete replica of the organization.
9. Start with one process and one measurable question
A practical starting point is one process with a recurring problem.
For our example:
Where does order-confirmation time accumulate, and which recurring paths are associated with the longest delays?
-
Identify the available events.
Establish what each event means and which parts of the process are unobserved. -
Connect the relevant objects.
Preserve relationships between orders, lines, approvals and deliveries. -
Validate the observed paths with the teams.
Check that the model reflects how work is actually performed. -
Link selected rules and technical components.
Use the Software Digital Twin to add implementation context. -
Investigate one improvement and measure its outcome.
Compare similar cases before and after the change.
Useful measures include median and high-percentile confirmation time, repeated approval cycles, correction frequency and the percentage of orders completed within the expected time.
Where the data supports it, also examine queue time and active processing time separately.
The first success is a clearer explanation of a real operational problem, followed by a measurable improvement.
A question for CEOs and CTOs
You probably know whether your applications are available.
You may know whether your database queries are fast.
But can you explain where time accumulates between a customer's request and the final business outcome?
Can you connect that time to process paths, rules, system behavior and organizational responsibilities?
These questions create an opportunity to bring technical knowledge and operational knowledge together.
Final thought
A Software Digital Twin helps us explore how software is built and connected.
Business events help us observe how that software participates in the company's daily operations.
Process mining helps reveal paths and variations. Simulation can help explore possible changes. AI can make the connected evidence easier to investigate.
Together, they offer a promising direction for understanding organizational performance.
Understand the implementation.
Observe the execution.
Investigate the dependencies.
Test an improvement.
Measure the business outcome.
Your queries may already run in milliseconds.
The next performance bottleneck may be in the way work moves through your company.
Research and further reading
The business example and connected architecture in this article are illustrative proposals. The following publications provide research foundations for process mining, organizational digital twins and data-driven simulation.
-
van der Aalst, W., et al. (2012).
Process Mining Manifesto.
Business Process Management Workshops, pp. 169–194.
https://doi.org/10.1007/978-3-642-28108-2_19 -
Park, G., and van der Aalst, W. M. P. (2021).
Realizing A Digital Twin of An Organization Using Action-oriented Process Mining.
2021 3rd International Conference on Process Mining (ICPM), pp. 104–111.
https://doi.org/10.1109/ICPM53251.2021.9576846 -
van der Aalst, W. M. P. (2019).
Object-Centric Process Mining: Dealing with Divergence and Convergence in Event Data.
Software Engineering and Formal Methods, pp. 3–25.
https://doi.org/10.1007/978-3-030-30446-1_1 -
Pourbafrani, M., and van der Aalst, W. M. P. (2020).
PMSD: Data-Driven Simulation Using System Dynamics and Process Mining.
Version available on arXiv:2010.00943.
https://arxiv.org/abs/2010.00943 -
Lyytinen, K., Weber, B., Becker, M. C., and Pentland, B. T. (2024).
Digital twins of organization: implications for organization design.
Journal of Organization Design, 13, pp. 77–93. Published online in 2023. Open access.
https://doi.org/10.1007/s41469-023-00151-z
Continue exploring the series
- The Software Digital Twin: The Future of Enterprise Software Management
- Your Software Architecture is a Mirror of your Organization
- Beyond Conway's Law: Using AI to Redesign How Teams and Software Work Together
ABOUT THE AUTHOR
Luca Biondi — Software development, SQL Server performance, enterprise architecture and Artificial Intelligence.
#DigitalTwin #SoftwareDigitalTwin #DigitalTwinOfAnOrganization #ProcessMining #ObjectCentricProcessMining #BusinessProcessManagement #SQLServer #EnterpriseAI #ArtificialIntelligence #KnowledgeGraphs #OrganizationalDesign #BusinessProcessOptimization #DigitalTransformation #CTO #TechnologyLeadership

Comments
Post a Comment