Skip to main content

RenameProcessDefinitionCommand

Overview

Renames a process definition without creating a new version.

Purpose

Changes the display name of a process definition while keeping the same ID and version. Use this for cosmetic naming changes that don't affect functionality.

Command Type

CB.Administration.Api.Commands.BPM.Process.RenameProcessDefinitiionCommand


Request

{
"cmd": "RenameProcessDefinitiionCommand",
"data": {
"id": 456,
"newName": "SME Loan Approval Workflow"
}
}

Request Fields (data object)

FieldTypeRequiredDescription
idlongYesID of process definition to rename
newNamestringYesNew name for the process (must be unique)

Response

{
"isSuccessful": true,
"message": "Process definition renamed successfully",
"statusCode": "00",
"data": {
"id": 456,
"oldName": "Loan Approval Workflow",
"newName": "SME Loan Approval Workflow",
"version": 2,
"versionUnchanged": true
}
}

Response Fields

FieldTypeDescription
idlongProcess definition ID
oldNamestringPrevious name
newNamestringNew name
versionintVersion number (unchanged)
versionUnchangedbooleanIndicates no version increment occurred

Error Responses

Process Not Found

{
"isSuccessful": false,
"message": "Process definition with ID 456 not found",
"statusCode": "404"
}

Duplicate Name

{
"isSuccessful": false,
"message": "Process definition with name 'SME Loan Approval Workflow' already exists",
"statusCode": "40",
"data": {
"existingProcessId": 789,
"suggestion": "Choose a different name or update the existing process"
}
}

Invalid Name

{
"isSuccessful": false,
"message": "Invalid process name: Name cannot be empty or whitespace only",
"statusCode": "40"
}

When to Use This Command

✅ Use RenameProcessDefinitionCommand When:

  1. Fixing Typos

    {
    "id": 456,
    "newName": "Loan Approval Workflow" // Fixed "Apprval" typo
    }
  2. Clarifying Names

    {
    "id": 456,
    "newName": "SME Loan Approval Workflow" // Added "SME" for clarity
    }
  3. Adding Context

    {
    "id": 456,
    "newName": "Loan Approval Workflow - Above 5M" // Added threshold
    }
  4. Standardizing Naming Conventions

    {
    "id": 456,
    "newName": "[LENDING] Loan Approval Workflow" // Added category prefix
    }

❌ Use UpdateProcessDefinitionCommand Instead When:

  1. Changing BPMN Logic
  2. Modifying Task Definitions
  3. Updating Process Variables
  4. Changing Trigger Events
  5. Updating Context Loaders
  6. Any Functional Changes

Comparison: Rename vs Update

AspectRenameProcessDefinitionCommandUpdateProcessDefinitionCommand
VersionNo version incrementCreates new version
BPMN XMLUnchangedCan be updated
Active InstancesUnaffectedContinue with old version
ConfigurationUnchangedCan be updated
Use CaseCosmetic name changesFunctional changes
SpeedFast (metadata only)Slower (validation required)

Impact on System

What Changes

  • ✅ Process definition name in database
  • ✅ Display name in UI
  • ✅ Search results
  • ✅ API responses

What Stays the Same

  • ✅ Process definition ID
  • ✅ Version number
  • ✅ BPMN XML
  • ✅ Active instances
  • ✅ Completed instances
  • ✅ Historical data
  • ✅ Trigger events
  • ✅ Context loaders
  • ✅ Scheduled executions

Example Scenarios

Scenario 1: Standardizing Names

Before:

  • Process 123: "loan approval"
  • Process 456: "LOAN APPROVAL WORKFLOW"
  • Process 789: "Loan_Approval_Process"

Standardize:

POST /api/process-definitions/123/rename
{
"cmd": "RenameProcessDefinitiionCommand",
"data": { "newName": "[LENDING] Loan Approval Workflow" }
}

POST /api/process-definitions/456/rename
{
"cmd": "RenameProcessDefinitiionCommand",
"data": { "newName": "[LENDING] Loan Approval Workflow - High Value" }
}

POST /api/process-definitions/789/rename
{
"cmd": "RenameProcessDefinitiionCommand",
"data": { "newName": "[LENDING] Loan Approval Workflow - Standard" }
}

After:

  • Process 123: "[LENDING] Loan Approval Workflow"
  • Process 456: "[LENDING] Loan Approval Workflow - High Value"
  • Process 789: "[LENDING] Loan Approval Workflow - Standard"

Scenario 2: Adding Business Context

Original:

"Account Opening Workflow"

Renamed for Clarity:

{
"cmd": "RenameProcessDefinitiionCommand",
"data": {
"id": 456,
"newName": "Account Opening Workflow - Corporate Customers Only"
}
}

Result: Team members immediately understand the process scope without opening documentation.

Scenario 3: Versioning in Name

Some teams prefer version numbers in names:

# Version 1
{
"cmd": "RenameProcessDefinitiionCommand",
"data": { "newName": "Credit Check Workflow v1.0" }
}

# Later update BPMN (version increments to 2)
POST /api/process-definitions/456
{
"cmd": "UpdateProcessDefinitiionCommand",
"data": { "bpmnXml": "..." }
} # Version becomes 2

# Rename to match
POST /api/process-definitions/456/rename
{
"cmd": "RenameProcessDefinitiionCommand",
"data": { "newName": "Credit Check Workflow v2.0" }
}

Best Practices

✅ Do's

  1. Use Consistent Naming Convention

    [CATEGORY] Process Name - Variant

    Examples:
    [LENDING] Loan Approval Workflow - SME
    [DEPOSITS] Account Opening Workflow - Savings
    [COMPLIANCE] KYC Verification Workflow - Enhanced
  2. Include Key Identifiers

    ✅ "Loan Approval - Above 5M"
    ✅ "Account Opening - Corporate"
    ✅ "KYC Check - High Risk"
  3. Keep Names Concise But Descriptive

    ✅ "SME Loan Approval Workflow"
    ❌ "Small and Medium Enterprise Loan Approval Process for amounts exceeding..."
  4. Document Name Changes

    // After renaming, update metadata
    {
    "id": 456,
    "metadata": {
    "nameHistory": [
    { "name": "Loan Approval", "date": "2025-01-01" },
    { "name": "SME Loan Approval Workflow", "date": "2026-01-06" }
    ]
    }
    }

❌ Don'ts

  1. Don't use ambiguous names

    ❌ "Process1"
    ❌ "Workflow"
    ❌ "New Process"
  2. Don't include version numbers if using auto-versioning

    ❌ "Loan Approval v1.0" (version is tracked automatically)
    ✅ "Loan Approval Workflow" (let system track versions)
  3. Don't rename frequently

    • Causes confusion for users
    • Makes audit trails harder to follow
    • Breaks bookmarks/references
  4. Don't use special characters

    ❌ "Loan Approval <CRITICAL>"
    ❌ "Account Opening [NEW!]"
    ✅ "Loan Approval - Critical Priority"
    ✅ "Account Opening Workflow - New Version"

Naming Convention Examples

By Industry

Banking:

[LENDING] Personal Loan Approval
[DEPOSITS] Savings Account Opening
[CARDS] Credit Card Application
[COMPLIANCE] AML Screening

Healthcare:

[PATIENT] Patient Admission Workflow
[BILLING] Insurance Claim Processing
[PHARMACY] Prescription Fulfillment
[COMPLIANCE] HIPAA Audit

Retail:

[ORDER] Order Fulfillment Workflow
[RETURNS] Return Authorization Process
[INVENTORY] Stock Replenishment
[CUSTOMER] Customer Onboarding

By Priority/Urgency

[CRITICAL] High-Value Transaction Approval
[STANDARD] Regular Account Opening
[BATCH] End-of-Day Reconciliation
[REALTIME] Fraud Detection Workflow

By Region/Branch

[LAGOS] Loan Approval Workflow
[ABUJA] Account Opening Process
[REGIONAL] Branch Reconciliation
[HQ] Executive Approval Required

Bulk Renaming

For standardizing multiple processes:

// Pseudo-code for bulk renaming
const processes = await getProcessDefinitionList();

const renamings = [
{ id: 123, newName: "[LENDING] Loan Approval - Personal" },
{ id: 456, newName: "[LENDING] Loan Approval - SME" },
{ id: 789, newName: "[LENDING] Loan Approval - Corporate" }
];

for (const rename of renamings) {
await renameProcessDefinition(rename);
console.log(`Renamed ${rename.id}`);
}

Audit Trail

All rename operations are logged:

{
"auditLog": {
"operation": "RENAME_PROCESS_DEFINITION",
"processId": 456,
"oldName": "Loan Approval Workflow",
"newName": "SME Loan Approval Workflow",
"performedBy": "admin@bank.com",
"timestamp": "2026-01-06T15:30:00Z",
"reason": "Standardizing naming conventions"
}
}


Last Updated: January 6, 2026