S. Orazbayev
Work / W-04 — Parliament CRMCase study · 4 of 5

W-04 · Government CRM · 2025

Legally binding document workflows for Parliament, on one BPMN engine

Key resultsAll results
  • 3 Modules from scratch
  • 1 → 4 One BPMN API across four modules
  • ~40% Less duplicated code

Document and appeals management for the Mazhilis and the Senate: deputies' inquiries, the Parliamentary Institute and documents sent for the President's signature.

problem —
Parliament documents move through multi-step approvals and must not change after registration
built —
three modules from scratch and one BPMN API shared by four modules
result —
~40% less duplicated code, new modules ~30% faster; a production-blocking bug fixed
FIG. 16 — Parliament: the Mazhilis and the Senate · a document's lifecycle, draft → dispatch · illustrative
Skip to the case ↓
  1. A draft is made from a template and edited online
  2. Sent on its route — approvals in parallel or in turn
  3. Returned with a comment — revised and approved
  4. One signatory signs with a qualified e-signature
  5. Registered — a number is assigned and the text is locked
  6. With a cover letter it goes out — to a state body, the Institute or the President
  7. Every step stays in the route history — one process API for four modules

01Problem and context

The CRM manages documents and appeals for both chambers of Parliament. Every document follows a BPMN process — drafting, approvals, signing, registration — and its route and history must be visible. Some documents go to the President for signature. After registration a document becomes legally fixed.

02Constraints

  • aWorkflow lives in a BPMN process engine; the UI starts processes, completes tasks and changes statuses.
  • bLegal immutability after registration.
  • cNational e-signature (NCALayer) and online document editing (OnlyOffice).
  • dRussian and Kazakh UI; state directories (BIN/IIN, government bodies, sessions, convocations).

03My role

I built three modules from scratch — Deputies' inquiries, the Parliamentary Institute and "For the President's signature" — with the full BPMN lifecycle: draft, review, sign, archive. I worked on Interaction management and the Contacts core, and proposed and implemented one BPMN API used by four modules. We — a team of 13 — built the rest of the CRM.

04Decisions and why

Decision
One BPMN API — a single startProcess and changeProcessStatus — for all four modules.
Why
Each module called the engine differently, and the differences turned into bugs. One API cut duplicated code by ~40% and made new modules ~30% faster to build.
Rejected
Per-module process calls.
Decision
Lock editing in the UI once a document is registered; the server checks it too and rejects a change that does not match.
Why
A registered parliamentary document is legally fixed; every screen must reflect that and offer no way to edit it.
Rejected
Allowing edits with a warning.
Decision
Embed OnlyOffice for document editing.
Why
Users edit real office documents; the file stays the single source of truth.
Rejected
Downloading the file, editing it locally and uploading it again.
Decision
A shared form-component library — searchable reference-data selects, masked inputs, localised validation.
Why
Dozens of forms pick from the same state directories; one set of controls keeps them consistent and cut form-development time by ~25%.
Rejected
A separate select per form.

05Figures

FIG. 16-A — A document's lifecycle in one chamber: draft, approvals, signature, registration, dispatch · illustrative

06Tradeoffs and what went wrong

An infinite re-render loop in the inquiry card blocked production: a tabs higher-order component was created inside render, so React saw a new component type every time and remounted it. Memoising it fixed the loop. Moving create/send logic from the view to the form unified two creation flows into one, at the cost of reworking a screen that already worked.

07Quality

Testing
A dedicated QA team tested every release.
Data loss
In edit mode, the back button asks for confirmation, so unsaved work is not lost.
Inputs
Masked inputs moved to react-number-format.
Validation
Form validation messages localised. BIN/IIN validation for individuals, legal entities and government bodies.

08Result in numbers

3
Modules from scratch
1 → 4
One BPMN API across four modules
~40%
Less duplicated code
~30%
Faster new-module development
~25%
Less time per form
~20 h
Per week, part-time contract

09What I'd do differently

  1. Agree the shared BPMN API before the first module, not after the fourth.
  2. Add render-performance checks to code review.

10Credits

Product
Product and analysts — Parliament CRM team
Backend
Backend and process engine — backend team
Frontend
Team of 13