🏦 Example

Algorithmating a Credit Approval Process

By Algomation Updated December 7, 2025 ~9 min read
High-level overview of a credit approval process Data Decisioning Orchestration Applicants & bureaus DMN policies BPMN workflow Eligibility Limit & pricing Compliance
Figure 1. High-level stages of a retail credit approval process.

A concrete financial services use case

To make algorithmation tangible, let’s walk through a classic banking scenario: retail credit approval. Every bank has some version of this:

  • Customers apply for a loan or a credit card.
  • The bank evaluates risk, affordability and eligibility.
  • A decision is made: approve, refer or decline.

On the surface, this looks simple. In reality, it hides dozens of rules, exceptions and manual workarounds. Algorithmation turns this complexity into a clean set of BPMN, DMN and CMMN models, bundled in a UAPF package that AI agents – and humans – can rely on.

High-level overview of a credit approval process Data Decisioning Orchestration Applicants & bureaus DMN policies BPMN workflow Eligibility Limit & pricing Compliance
Figure 1. High-level stages of a retail credit approval process.

Step 1 – Model the straight-through BPMN flow

We start by capturing the happy path in BPMN:

  1. Receive credit application.
  2. Collect and validate required data.
  3. Run automated risk and eligibility assessment.
  4. Issue decision (approve / decline) or route to manual review.
  5. Notify customer and downstream systems.

In the BPMN diagram, we explicitly show:

  • Swimlanes for channels (online, branch, call center).
  • Service tasks for data enrichment and scoring.
  • Gateways controlled by DMN decisions (e.g. β€œIs applicant eligible?”).

This BPMN model becomes the spine that everything else attaches to.

Step 2 – Capture the decision logic with DMN

Next, we extract the rules from policy documents and spreadsheets into DMN decision tables. Typical decisions include:

  • Eligibility – Does the customer meet basic criteria?
  • Risk grade – What is the probability of default?
  • Offer configuration – What limit and pricing can we offer?

Each decision becomes a DMN table with clearly defined inputs and outputs:

  • Inputs: income, existing exposures, credit score, employment status, etc.
  • Outputs: eligibility flag, risk grade, maximum limit, recommended APR.

The BPMN process calls these decisions at the appropriate steps. From the perspective of an AI agent, the DMN tables are crystal-clear APIs: send data in, get an explainable decision out.

Step 3 – Use CMMN for manual reviews and exceptions

No credit process is 100% automated. Some applications require human judgment:

  • Edge cases near policy thresholds,
  • Customers with complex income or collateral,
  • Fraud or KYC red flags.

These scenarios are modeled with CMMN:

  • A case is opened when BPMN routes the application to β€œManual review”.
  • Tasks for document collection, additional checks and committee review are defined in CMMN.
  • AI agents can propose actions (e.g. β€œrequest additional income proof”) but final decisions remain with human underwriters.

This gives the bank the best of both worlds: structured oversight with the flexibility to handle truly unique situations.

Step 4 – Package everything into a UAPF model set

Once BPMN, DMN and CMMN models are ready, Algomation exports them as a single UAPF package – for example:

credit-approval.uapf
 β”œβ”€ /models/bpmn/credit-approval-main.bpmn.xml
 β”œβ”€ /models/dmn/eligibility-rules.dmn.xml
 β”œβ”€ /models/dmn/risk-grading.dmn.xml
 β”œβ”€ /models/dmn/offer-configuration.dmn.xml
 β”œβ”€ /models/cmmn/manual-review.cmmn.xml
 └─ /docs/README.md
                      

This package becomes the contract for the credit process:

  • IT uses it to deploy and version the executable logic.
  • Risk and Compliance use it to review and sign off rules.
  • AI teams use it as the skill bundle for credit-related agents.

Step 5 – Let AI agents collaborate with the model set

With algorithmation in place, AI agents can safely support credit operations:

  • A customer-facing assistant helps applicants complete forms, then triggers the BPMN workflow defined in the UAPF package.
  • A back-office agent runs scenario analysis by simulating different DMN outcomes (e.g. what if we adjust policy thresholds?).
  • A risk-monitoring agent flags unusual patterns in manual review cases and suggests updates to DMN tables.

At every step, decisions remain explainable because they are backed by explicit models – not opaque model weights.

Downloadable UAPF example: Retail Credit Approval

To make the concept concrete, this section walks through a complete, synthetic retail credit approval UAPF package. You can inspect the structure, review the models and download the full .uapf file for local experimentation.

Note. This example is intentionally simplified and uses synthetic data and policies. It is not a real bank’s production process.

Package structure

Directory layout of the example package retail-credit-approval.uapf:


retail-credit-approval.uapf/
  manifest.json
  models/
    bpmn/
      credit-approval-main.bpmn.xml
    dmn/
      eligibility-rules.dmn.xml
      risk-grading.dmn.xml
      offer-configuration.dmn.xml
    cmmn/
      manual-review.cmmn.xml
  docs/
    README.md
  tests/
    scenarios/
      happy-path.json
      borderline-risk.json
      manual-review.json
                      

At minimum, the package contains one BPMN process, several DMN decision models, a CMMN case definition, the manifest and lightweight documentation and tests.

Manifest (manifest.json)

The manifest declares the package identity, models and exposed interfaces.


{
  "uapfVersion": "0.1.0",
  "id": "io.algomation.examples.retail-credit-approval",
  "name": "Retail Credit Approval",
  "version": "1.0.0",
  "description": "Synthetic retail credit approval process combining BPMN, DMN and CMMN.",
  "owner": {
    "name": "Algomation Example Library",
    "contact": "[email protected]"
  },
  "models": {
    "bpmn": [
      "models/bpmn/credit-approval-main.bpmn.xml"
    ],
    "dmn": [
      "models/dmn/eligibility-rules.dmn.xml",
      "models/dmn/risk-grading.dmn.xml",
      "models/dmn/offer-configuration.dmn.xml"
    ],
    "cmmn": [
      "models/cmmn/manual-review.cmmn.xml"
    ]
  },
  "interfaces": {
    "processes": [
      {
        "id": "CreditApproval",
        "bpmnProcessId": "credit_approval_main",
        "entryPoint": "StartEvent_ApplicationReceived"
      }
    ],
    "decisions": [
      {
        "id": "EligibilityRules",
        "dmnDecisionId": "EligibilityDecision"
      },
      {
        "id": "RiskGrading",
        "dmnDecisionId": "RiskGradeDecision"
      },
      {
        "id": "OfferConfiguration",
        "dmnDecisionId": "OfferConfigDecision"
      }
    ]
  },
  "tags": ["example", "retail", "credit", "loan"],
  "createdAt": "2025-12-08T00:00:00Z"
}
                      

BPMN: Main credit approval flow

models/bpmn/credit-approval-main.bpmn.xml – core workflow from application to decision.


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
             xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
             id="RetailCreditApprovalDefs"
             targetNamespace="http://algomation.io/examples/retail-credit">

  <process id="credit_approval_main" name="Retail Credit Approval" isExecutable="true">

    <startEvent id="StartEvent_ApplicationReceived" name="Application received">
      <outgoing>Flow_CollectData</outgoing>
    </startEvent>

    <userTask id="Task_CollectData" name="Collect application data">
      <incoming>Flow_CollectData</incoming>
      <outgoing>Flow_ValidateData</outgoing>
    </userTask>

    <serviceTask id="Task_ValidateData" name="Validate data">
      <incoming>Flow_ValidateData</incoming>
      <outgoing>Flow_CallEligibility</outgoing>
    </serviceTask>

    <businessRuleTask id="Task_EligibilityCheck"
                      name="Eligibility rules (DMN)"
                      implementation="dmn:EligibilityDecision">
      <incoming>Flow_CallEligibility</incoming>
      <outgoing>Flow_EligibilityGateway</outgoing>
    </businessRuleTask>

    <exclusiveGateway id="Gateway_Eligibility" name="Eligible?">
      <incoming>Flow_EligibilityGateway</incoming>
      <outgoing>Flow_DeclineIneligible</outgoing>
      <outgoing>Flow_CallRiskGrading</outgoing>
    </exclusiveGateway>

    <businessRuleTask id="Task_RiskGrading"
                      name="Risk grading (DMN)"
                      implementation="dmn:RiskGradeDecision">
      <incoming>Flow_CallRiskGrading</incoming>
      <outgoing>Flow_CallOfferConfig</outgoing>
    </businessRuleTask>

    <businessRuleTask id="Task_OfferConfig"
                      name="Offer configuration (DMN)"
                      implementation="dmn:OfferConfigDecision">
      <incoming>Flow_CallOfferConfig</incoming>
      <outgoing>Flow_OfferGateway</outgoing>
    </businessRuleTask>

    <exclusiveGateway id="Gateway_OfferDecision" name="Auto-approve?">
      <incoming>Flow_OfferGateway</incoming>
      <outgoing>Flow_AutoApprove</outgoing>
      <outgoing>Flow_ManualReview</outgoing>
    </exclusiveGateway>

    <callActivity id="CallManualReview"
                  name="Manual review case (CMMN)"
                  calledElement="ManualReviewCase">
      <incoming>Flow_ManualReview</incoming>
      <outgoing>Flow_ManualReviewOutcome</outgoing>
    </callActivity>

    <endEvent id="EndEvent_Declined" name="Declined">
      <incoming>Flow_DeclineIneligible</incoming>
    </endEvent>

    <endEvent id="EndEvent_Approved" name="Approved">
      <incoming>Flow_AutoApprove</incoming>
      <incoming>Flow_ManualReviewOutcome</incoming>
    </endEvent>

    <sequenceFlow id="Flow_CollectData"
                  sourceRef="StartEvent_ApplicationReceived"
                  targetRef="Task_CollectData"/>
    <sequenceFlow id="Flow_ValidateData"
                  sourceRef="Task_CollectData"
                  targetRef="Task_ValidateData"/>
    <sequenceFlow id="Flow_CallEligibility"
                  sourceRef="Task_ValidateData"
                  targetRef="Task_EligibilityCheck"/>
    <sequenceFlow id="Flow_EligibilityGateway"
                  sourceRef="Task_EligibilityCheck"
                  targetRef="Gateway_Eligibility"/>
    <sequenceFlow id="Flow_DeclineIneligible"
                  sourceRef="Gateway_Eligibility"
                  targetRef="EndEvent_Declined">
      <conditionExpression xsi:type="tFormalExpression">${eligibility == false}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="Flow_CallRiskGrading"
                  sourceRef="Gateway_Eligibility"
                  targetRef="Task_RiskGrading">
      <conditionExpression xsi:type="tFormalExpression">${eligibility == true}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="Flow_CallOfferConfig"
                  sourceRef="Task_RiskGrading"
                  targetRef="Task_OfferConfig"/>
    <sequenceFlow id="Flow_OfferGateway"
                  sourceRef="Task_OfferConfig"
                  targetRef="Gateway_OfferDecision"/>
    <sequenceFlow id="Flow_AutoApprove"
                  sourceRef="Gateway_OfferDecision"
                  targetRef="EndEvent_Approved">
      <conditionExpression xsi:type="tFormalExpression">${requiresManualReview == false}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="Flow_ManualReview"
                  sourceRef="Gateway_OfferDecision"
                  targetRef="CallManualReview">
      <conditionExpression xsi:type="tFormalExpression">${requiresManualReview == true}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="Flow_ManualReviewOutcome"
                  sourceRef="CallManualReview"
                  targetRef="EndEvent_Approved"/>

  </process>
</definitions>
                      

DMN: Eligibility rules

models/dmn/eligibility-rules.dmn.xml – checks basic policy criteria before risk grading.


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
             xmlns:feel="https://www.omg.org/spec/DMN/20191111/FEEL/"
             id="EligibilityDefs"
             name="Eligibility Rules"
             namespace="http://algomation.io/examples/retail-credit/eligibility">

  <decision id="EligibilityDecision" name="Eligibility">
    <variable id="eligibilityVar" name="eligibility" typeRef="boolean"/>
    <informationRequirement>
      <requiredInput href="#ApplicantData"/>
    </informationRequirement>
    <decisionTable id="EligibilityTable" hitPolicy="UNIQUE">
      <input id="inAge">
        <inputExpression typeRef="number">
          <text>applicant.age</text>
        </inputExpression>
        <label>Age</label>
      </input>
      <input id="inCountry">
        <inputExpression typeRef="string">
          <text>applicant.country</text>
        </inputExpression>
        <label>Country</label>
      </input>
      <input id="inEmploymentStatus">
        <inputExpression typeRef="string">
          <text>applicant.employmentStatus</text>
        </inputExpression>
        <label>Employment status</label>
      </input>

      <output id="outEligibility" name="eligibility" typeRef="boolean"/>

      <rule>
        <inputEntry><text>[18..70]</text></inputEntry>
        <inputEntry><text>"LV","EE","LT"</text></inputEntry>
        <inputEntry><text>"EMPLOYED","SELF_EMPLOYED"</text></inputEntry>
        <outputEntry><text>true</text></outputEntry>
      </rule>

      <rule>
        <inputEntry><text>otherwise</text></inputEntry>
        <inputEntry><text>otherwise</text></inputEntry>
        <inputEntry><text>otherwise</text></inputEntry>
        <outputEntry><text>false</text></outputEntry>
      </rule>
    </decisionTable>
  </decision>

  <inputData id="ApplicantData" name="Applicant data">
    <variable id="ApplicantDataVar" name="applicant" typeRef="Applicant"/>
  </inputData>

</definitions>
                      

CMMN: Manual review case

models/cmmn/manual-review.cmmn.xml – supports complex cases that cannot be auto-approved.


<?xml version="1.0" encoding="UTF-8"?>
<cmmn:definitions xmlns:cmmn="http://www.omg.org/spec/CMMN/20151109/MODEL"
                  id="ManualReviewDefs"
                  targetNamespace="http://algomation.io/examples/retail-credit/manual-review">

  <cmmn:case id="ManualReviewCase" name="Manual review of credit application">
    <cmmn:casePlanModel id="ManualReviewPlan" name="Manual review plan">

      <cmmn:stage id="Stage_InitialReview" name="Initial assessment">
        <cmmn:task id="Task_CheckDocuments" name="Check documents"/>
        <cmmn:task id="Task_VerifyIncome" name="Verify income"/>
      </cmmn:stage>

      <cmmn:milestone id="Milestone_RiskCommittee" name="Ready for risk committee"/>

      <cmmn:task id="Task_RiskCommitteeDecision"
                 name="Risk committee decision"
                 isBlocking="true"/>

      <cmmn:milestone id="Milestone_FinalDecision" name="Final decision issued"/>
    </cmmn:casePlanModel>
  </cmmn:case>

</cmmn:definitions>
                      

Documentation (docs/README.md)

Lightweight human-readable docs travel with the package.


# Retail Credit Approval – Example UAPF Package

This synthetic package demonstrates how to model a retail credit approval
process using BPMN, DMN and CMMN and package it as a UAPF archive.

## Components

- BPMN: `credit-approval-main.bpmn.xml`
- DMN: `eligibility-rules.dmn.xml`, `risk-grading.dmn.xml`, `offer-configuration.dmn.xml`
- CMMN: `manual-review.cmmn.xml`
- Tests: basic JSON scenarios in `tests/scenarios/`.

## Disclaimer

Not production-ready. For educational and demonstration purposes only.
                      

⬇ Download full example (.uapf) (~35 KB, ZIP-based UAPF archive)

Try the example model set

The full credit approval example – BPMN, DMN, CMMN and the UAPF package – is available as a downloadable resource in Algomation. You can:

  • Inspect the models to see how decisions and flows are structured.
  • Load the UAPF package into Algomation Studio.
  • Experiment with AI agents calling the model set as an executable skill.

To see how this UAPF package becomes a concrete AI capability, read From Algorithmated Credit to AI Agents , where we wire the same model set into an MCP-based agent.

This example is intentionally generic, so it can be a template for your own credit, onboarding or KYC processes.

To see how this algorithmated credit process could be consumed by a large language model agent, read Empowering Grok with Governed Intelligence , which walks through a hypothetical Grok/xAI integration using UAPF and MCP.

To see how algorithmated credit logic can be consumed by different AI agents, compare Grok integration and Gemini integration .

If you are interested in how the same approach works for public-sector services, see From Algorithmated Permits to AI Agents , where a municipal building permit process is implemented as a UAPF-powered AI capability.

For a broader view on how UAPF scales from single workflows to an enterprise-wide algorithm layer, see From Single Processes to the Algorithmated Enterprise .

Continue your algorithmation journey

Explore more resources on BPMN, DMN, CMMN and UAPF, or contact us for a demo of Algomation Studio.

Algomation
Turning processes into executable intelligence.