Business Process Integration

For Both Executive and Technical Readers

Process Diagramming specifies who does what and when. It has almost nothing to say about why a decision is reached inside a gateway. Here is a way to integrate the two.

Every process has a gateway labelled “Approve?” But no instructions.

A typical enterprise process is a diagram with a gateway labelled “Approve?” What happens inside that diamond is left entirely unspecified. Most implementations fill it with hard-coded rules, which cannot handle uncertainty or explain themselves, or with human judgment, which is not auditable and does not scale. Neither produces a record that can be shown to a regulator.

The gateway is a placeholder. Process diagrams specify that a decision is made. They say nothing about how. This is not a flaw in the approach, it was designed that way, leaving the decision itself to whatever system the gateway invokes. The question is what that system is.

The gateway invokes a Decision Service. It gets a traceable answer back.

Business Process Integration is the pattern by which every gateway that requires expertise, credit assessment, clinical triage, fraud detection, underwriting, security escalation, becomes a call to a Decision Service. The process diagram does not contain the logic. It invokes a service, receives a DecisionCertificate, and branches on the result.

The process engine sees only the service call and the returned certificate. The gateway branches on the decision field; the certificate carries everything a regulator needs to inspect.

Clinical pathway BPMN for acute appendicitis

A clinical pathway for suspected acute appendicitis. Two gateways contain decisions the diagram records but does not specify: the diagnosis decision, and the dismissal criterion.

This pathway has a gateway that carries the entire clinical argument: Acute appendicitis diagnosed? The ER evaluation produces a clinical picture in 10–25 minutes, physical examination, lab results, imaging. What emerges is a judgment call. The diamond in the diagram records that a decision was made. It says nothing about which findings drove it, how confident the clinician was, or what would change the call.

The second decision is quieter but equally consequential. The dismissal gateway requires the patient to have been fever-free for at least 24 hours and not more than 36. That sounds like a simple rule. But fever-free in a post-surgical patient on antibiotics is not a single temperature reading, it is a pattern across time, against a background of treatment response and individual variation. The antibiotic protocol itself branches: 3–5 days or 5–9 days. That branch is a judgment about how severe the infection was and how well the patient is responding.

The Decision Service fills both diamonds with a traceable answer. For the diagnosis gateway: the causal model takes the clinical findings, RLQ pain score, rebound tenderness, WBC count, CRP, CT findings, Alvarado score, and returns the probability of acute appendicitis, which findings drove it most, and how much of that signal is causal vs. correlational. The gateway receives a certified answer and routes accordingly. If the probability is in the uncertain range, the certificate names the single finding most likely to change the call, and routes to Additional Clinical Assessment with that request attached.

For the dismissal gateway: the causal model takes the patient’s temperature record after surgery and returns the probability that the fever-free window has been met safely. Both gateways now carry a decision that can be shown to a review board.

The gateway calls the Decision Service. It gets a certificate back, not a string.

The gateway becomes an invocation. The task preceding the gateway calls the Decision Service, passing the case identifier and available evidence. The service runs the full reasoning pipeline and returns a result.

The Decision Service returns a DecisionCertificate. The certificate carries the probability estimate, the reasoning behind it, a robustness check, an explanation of which evidence drove the result, and a full audit record. It does not return a string.

The gateway branches on the certificate. “Approved” routes to the approval path. “Referred” routes to a human reviewer, with the certificate specifying exactly what additional information would most change the decision. “Declined” routes to the decline path with an explanation attached. No logic lives inside the diamond.

The referral path is not a black box. It is a specific request: the certificate names the finding most likely to change the outcome, and the reviewer is asked for that finding specifically.

The causal model is what fills the diamond.

The Decision Service is powered by a causal model built from clinical knowledge. There is plenty of medical data, so it is trained on that. Then cause-and-effect relationships from domain experts are added. The result is a model that can be opened, inspected, and if needed, corrected. The certificate it produces is traceable to every assumption inside it.

The DecisionCertificate is the governance artifact: inspectable, contestable, and submissible to a regulator or a review board.

appendicitis-diagnosis.bayes
CLG network, 6 clinical inputs → AcuteAppendicitis → PostOpFeverDuration, InfectionSeverityScore · 3 U-nodes

The model across four states

State A baseline
State B observational
State C interventional
State D counterfactual

Setting the states →

This one simple model can answer seventeen distinct questions.

This is a primitive model for illustrative purposes. A more sophisticated and realistic model could be almost indistinguishable from a clinician, but probably not entirely: a clinician produces varying results.

Rung 1, Observational

  • Given these clinical findings, what is the posterior probability of acute appendicitis?
  • Given high WBC, how does CRP co-vary? (cousin relationship through InflammationLoad)
  • Given high RLQ pain, how does ReboundTenderness co-vary? (cousin through PainSensitivity)
  • Given this appendicitis severity, what PostOpFeverDuration and InfectionSeverityScore should we expect?
  • Which evidence items most raised the appendicitis posterior from prior? (pattern analysis)
  • Which unobserved finding would most change the diagnosis? (value of information)

Rung 2, Interventional

  • If we surgically intervene (treat appendicitis as confirmed regardless of uncertainty), what are the expected post-operative outcomes?
  • If we suppress inflammation pharmacologically (do(InflammationLoad=−1)), what happens to WBC, CRP, and the appendicitis posterior?
  • What is the pure diagnostic signal of WBC=14 stripped of its back-door confounding through InflammationLoad?
  • What is the causal effect of each clinical input on the appendicitis diagnosis, separated from shared confounder contributions?

Rung 3, Counterfactual

  • Given this patient’s observed findings, had their WBC been normal, what would the appendicitis posterior have been?
  • Had their pain sensitivity been lower, would the clinical presentation still have met the diagnostic threshold?
  • Given that PostOpFeverDuration was 45h, had InflammationLoad been lower at presentation, would they have met the safe-dismissal criterion?
  • Had AlvaradoScore been 5 instead of 7 (different composite presentation), what would the diagnosis have been for this specific patient?

What it cannot answer

  • Time-series questions (no dynamic Bayesian network)
  • Questions about specific lab values below the threshold (CRP and WBC are continuous but priors may not cover edge cases well without recalibration)
  • Diagnosis of conditions other than appendicitis, the model is single-target
  • Population-level causal effects without aggregation across U-node draws

Let’s Ask EARA.

A conversation: the operator types, the LLM listens, the model thinks, the LLM speaks. That is the Enterprise AI Reasoning Architecture.

My patient might have appendicitis. RLQ pain score 7, rebound tenderness, WBC 14, Alvarado 7. What is the likelihood?
Clinical Decision ServiceRung 1 · obs()
AcuteAppendicitis posterior mean 11.9 (scale 0–14). The observational signal is strong: InflammationLoad back-inferred to 3.05 (driven by WBC), PainSensitivity to 1.83 (driven by RLQ pain and rebound). Expected PostOpFeverDuration 41.9h, above the 36h safe-dismissal threshold. InfectionSeverityScore 10.0, indicating extended antibiotic protocol. DecisionCertificate issued. [Record: appendicitis-case-0042]

See The Thinking →

This patient is a known high-pain-sensitivity case. How much of that posterior is the disease and how much is the pain response?
Clinical Decision ServiceRung 2 · do()
Interventional query run with do(RLQPainScore=7, ReboundTenderness=0.8, WBC=14, AlvaradoScore=7). Back-door paths through PainSensitivity and InflammationLoad severed. AcuteAppendicitis posterior falls to 5.15. The gap, 11.9 observational vs 5.15 interventional, is the confounding contribution: elevated pain sensitivity and inflammation load are driving 6.75 units of the observational signal. The residual 5.15 is the causal evidence. DecisionCertificate updated with both estimates.

See The Thinking →

The WBC came back at 14 but the lab flagged a possible dilution error. Had it been 9, would we still have operated?
Clinical Decision ServiceRung 3 · counterfactual
Counterfactual query: actual world obs(WBC=14) with all other evidence → AcuteAppendicitis 11.6. U-nodes abducted, this patient’s individual characteristics fixed. Counterfactual do(WBC=9): AcuteAppendicitis 4.39. Had the WBC been in the normal range, the appendicitis posterior would have been 4.39 rather than 11.6, below the surgical threshold. The WBC result was material to the decision. This is in the certificate and can be submitted to the surgical review board.

See The Thinking →

How do we know the decision was made correctly?
Clinical Decision ServiceAuditRecord
The AuditRecord for appendicitis-case-0042 contains: the formal estimand, the IdentificationCertificate (back-door criterion, adjustment set), the RobustnessReport, the evidence set with soft/hard classifications, the model version, and all three posteriors (observational, interventional, counterfactual). The decision is reproducible, the same evidence against the same model always produces the same certificate. Submissible to the surgical review board, the insurer, and the regulator as-is.

The audit trail is the AuditRecord. The process is auditable because the certificate exists.

The last component in the stack. Where reasoning meets governance.

Business Process Integration is the final component in the core EARA stack. It is the point where certified reasoning outputs leave the architecture and enter the enterprise process. Every component upstream produces inputs to the DecisionCertificate; Business Process Integration assembles and delivers it.

Upstream: the AuditRecord (from 01 Pipeline), the RobustnessReport (from 06 Robustness), the PatternExplanation (from 08 Pattern Analysis), and the InquiryResult (from 05 Inquiry, when the decision is “referred”). Downstream: the enterprise process, the regulator, and the customer. The TrustAlert from 11 Monitoring can suspend the Decision Service until re-elicitation is complete.

appendicitis-diagnosis.bayes · Bayes Server

Setting the states

The LLM translates the operator’s questions into evidence values, then sets the causal model’s nodes.

State A, Baseline (no evidence)

Open the model with no evidence set. All nodes at prior. Capture the full network.

State B, Observational (Rung 1)

  1. Clear all evidence
  2. obs(RLQPainScore = 7.0)
  3. obs(ReboundTenderness = 0.8)
  4. obs(WBC = 14.0)
  5. obs(AlvaradoScore = 7.0)
  6. Capture posterior over all nodes, note AcuteAppendicitis mean

State C, Interventional (Rung 2)

  1. Clear all evidence
  2. do(RLQPainScore = 7.0)
  3. do(ReboundTenderness = 0.8)
  4. do(WBC = 14.0)
  5. do(AlvaradoScore = 7.0)
  6. Capture posterior, AcuteAppendicitis should be noticeably lower than State B

State D, Counterfactual (Rung 3)

  1. Clear all evidence
  2. obs(RLQPainScore = 7.0)
  3. obs(ReboundTenderness = 0.8)
  4. obs(WBC = 14.0)
  5. obs(AlvaradoScore = 7.0)
  6. Switch inference mode to Counterfactual
  7. Run inference, Bayes Server abducts all U-nodes from the actual-world evidence
  8. do(WBC = 9.0) in the counterfactual world
  9. Capture both factual and counterfactual posteriors over AcuteAppendicitis

appendicitis-diagnosis.bayes · Rung 1, Observational

See the Thinking: Rung 1

State B

AcuteAppendicitis 11.9 · InflammationLoad 3.05 · PainSensitivity 1.83 · PostOpFeverDuration 41.9h · InfectionSeverityScore 10.0

The causal model is the brain. The clinical operator uses the LLM to set the values of nodes. Then the nodes do the reasoning:

NodeValue
RLQPainScore7.0
ReboundTenderness0.8
WBC14.0
AlvaradoScore7.0

The nodes are connected by cause-and-effect relationships. High pain and high tenderness together say more than either says alone, they share a common hidden cause. High WBC signals inflammation that also bears on the diagnosis. The model weighs all of it simultaneously and returns a probability.

The result: the appendicitis probability is 11.9 on a 14-point scale, strongly positive. Expected post-operative fever duration is 41.9 hours, above the 36-hour safe-dismissal threshold. The result is reported back to the operator.

The model is auditable. It can be opened, examined and, if needed, modified. We can see the network, no black box.

appendicitis-diagnosis.bayes · Rung 2, Interventional

See the Thinking: Rung 2

State C

AcuteAppendicitis 5.15 · InflammationLoad and PainSensitivity at prior (0±1) · confounding gap: 6.75 units

The causal model is the brain. The clinical operator uses the LLM to set the values of nodes. But this time the operator asks a different question: what would happen if we intervened? The LLM sets the same values, but as do() rather than obs():

NodeValueMode
RLQPainScore7.0do()
ReboundTenderness0.8do()
WBC14.0do()
AlvaradoScore7.0do()

do() severs the cause-and-effect connections coming into each node. The hidden causes, PainSensitivity and InflammationLoad, are cut off. The model no longer infers them from the observed values. Only the direct evidence reaches AcuteAppendicitis.

This is the difference between seeing and doing. In Rung 1, observing WBC=14 tells the model something about the average patient's underlying inflammation, and that inference flows through to the diagnosis. In Rung 2, do(WBC=14) asks a sharper question: what does WBC=14 cause for this patient specifically, stripped of everything that merely correlates with it? The model treats it as an external fact, not a signal from the population.

The result: the appendicitis probability drops to 5.15 on a 14-point scale. The gap between 11.9 (Rung 1) and 5.15 (Rung 2) is the confounding: the portion of the observational signal that came from shared hidden causes, not from the disease itself. The result is reported back to the operator.

The model is auditable. It can be opened, examined and, if needed, modified. We can see the network, no black box.

appendicitis-diagnosis.bayes · Rung 3, Counterfactual

See the Thinking: Rung 3

State D

Factual AcuteAppendicitis 11.6 → Counterfactual 4.39 with do(WBC=9) · U-nodes abducted

The causal model is the brain. The clinical operator uses the LLM to set the values of nodes. This time the operator asks: what would have happened if one thing had been different? The LLM sets the actual-world observations:

NodeValueMode
RLQPainScore7.0obs()
ReboundTenderness0.8obs()
WBC14.0obs()
AlvaradoScore7.0obs()

The model fixes this specific patient's hidden characteristics, abducting the noise terms that explain exactly why their values came out as they did. Then the LLM applies a single counterfactual intervention:

NodeValueMode
WBC9.0do()

Had the WBC been normal, the appendicitis probability would have been 4.39 rather than 11.6: below the surgical threshold. The WBC result was material to the decision. The result is reported back to the operator and is submissible to a review board.

The model is auditable. It can be opened, examined and, if needed, modified. We can see the network, no black box.