TPS BA Unitوحدة تحليل الأعمال في TPS / Work Templatesقوالب العمل / Use Case Document (13-Header)وثيقة حالة الاستخدام (13 بنداً)

Use Case Document (13-Header)وثيقة حالة الاستخدام (13 بنداً)

Dev-ready behaviour spec: main, alternative and exception flowsمواصفة سلوك جاهزة للتطوير: التدفق الرئيسي والبديل والاستثنائي
DOCX Requirements & Specificationالمتطلبات والمواصفات

Get the templateاحصل على القالب

TPS-BA-UseCase-Template.docx
Download DOCXتنزيل DOCX
Guidance text inside the file is marked in italic gray — delete it before issue. Placeholders appear in blue. نصوص الإرشاد داخل الملف بخط مائل رمادي — احذفها قبل الإصدار. وتظهر العناصر النائبة باللون الأزرق.
All templatesكل القوالب TPS BA Unitالصفحة الرئيسية

What this template isما هذا القالب

The unit's standard use case format: thirteen headers covering actors, pre/post-conditions, the main flow, every alternative and exception flow, data specifications with validation rules, UI elements and NFRs — detailed enough that development and QC need nothing else.صيغة حالة الاستخدام المعتمدة في الوحدة: ثلاثة عشر بنداً تغطي الفاعلين والشروط القبلية والبعدية والتدفق الرئيسي وكل تدفق بديل واستثنائي ومواصفات البيانات بقواعد التحقق وعناصر الواجهة والمتطلبات غير الوظيفية — بتفصيل يكفي التطوير والجودة دون أي شيء آخر.

When to use itمتى تستخدمه

Document structureهيكل الوثيقة

1
1. Use Case ID & Name1. معرّف الحالة واسمها
UC-xxx plus a verb-object name.معرّف UC-xxx واسم من فعل ومفعول.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Use a stable ID scheme (UC-xx) and a verb-object name from the actor's goal.استخدم ترميزاً ثابتاً (UC-xx) واسماً بصيغة فعل-مفعول من هدف الفاعل.
  2. Keep one goal per use case — one actor achieving one outcome.اجعل لكل حالة استخدام هدفاً واحداً — فاعل واحد يحقق نتيجة واحدة.
  3. Record version and owner on the case itself.سجّل الإصدار والمالك على الحالة نفسها.
🚫 Don’tلا تفعل
  1. Don't name cases after screens ("Invoice screen") — name the goal ("Allocate receipt").لا تسمِّ الحالات بأسماء شاشات («شاشة الفواتير») — سمِّ الهدف («تخصيص مقبوض»).
  2. Don't renumber IDs after test cases start referencing them.لا تعد ترقيم المعرفات بعد أن تبدأ حالات الاختبار بالإحالة إليها.
  3. Don't create a use case for every CRUD click — group trivial maintenance.لا تنشئ حالة لكل نقرة إدخال وتعديل — جمّع الصيانة البسيطة.
💡 Exampleمثال

"UC-07 — Manually Allocate Unmatched Receipt (owner: BA team, v1.1) — the reconciliation officer allocates a receipt the engine could not match."«UC-07 — التخصيص اليدوي لمقبوض غير مطابق (المالك: فريق التحليل، v1.1) — يخصص موظف المطابقة مقبوضاً عجز المحرك عن مطابقته.»

2
2. Description & Scope2. الوصف والنطاق
One paragraph on what the actor achieves.فقرة واحدة عمّا يحققه الفاعل.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Summarise the goal and business value in 2–3 sentences.لخّص الهدف وقيمته للعمل في جملتين أو ثلاث.
  2. State the system boundary — what this case includes and which UCs continue it.حدد حدود النظام — ما تشمله الحالة وأي الحالات تكملها.
  3. Mention frequency and criticality — reviewers prioritise by them.اذكر التكرار ودرجة الحرجية — فبهما يرتب المراجعون الأولوية.
🚫 Don’tلا تفعل
  1. Don't retell the whole main flow here.لا تعد سرد التدفق الأساسي كاملاً هنا.
  2. Don't blur scope with neighbouring cases — cross-reference them instead.لا تُذوّب النطاق مع الحالات المجاورة — اربطها بإحالة بدلاً من ذلك.
  3. Don't skip the business value — a case with no value is a candidate to delete.لا تُغفل قيمة العمل — حالة بلا قيمة مرشحة للحذف.
💡 Exampleمثال

"Covers manual allocation of the ~6% of receipts auto-matching cannot resolve (~540/month). Excludes bulk re-processing (UC-09). Critical: unallocated cash blocks customer credit release."«تغطي التخصيص اليدوي لنحو 6% من المقبوضات التي لا يحسمها المحرك (~540 شهرياً). ولا تشمل إعادة المعالجة الجماعية (UC-09). حرجة: النقد غير المخصص يجمّد إطلاق ائتمان العملاء.»

3
3. Actors3. الفاعلون
Primary and secondary actors, human and system.الفاعلون الرئيسيون والثانويون، بشراً وأنظمة.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Name the primary actor by role and every secondary/system actor.سمِّ الفاعل الرئيس بدوره وكل فاعل ثانوي أو نظامي.
  2. Use the same actor names across all use cases — keep one actor glossary.استخدم أسماء الفاعلين نفسها عبر كل الحالات — مسرد فاعلين واحد.
  3. State each actor's needed permission level.اذكر مستوى الصلاحية المطلوب لكل فاعل.
🚫 Don’tلا تفعل
  1. Don't use department names or personal names as actors.لا تستخدم أسماء إدارات أو أشخاص فاعلين.
  2. Don't forget system actors (the ERP, the scheduler) — they carry interfaces.لا تنسَ الفاعلين النظاميين (نظام الموارد، المجدول) — فهم يحملون الواجهات.
  3. Don't mix the approver into a case whose actor is the requester — that's a second case or an extension.لا تُقحم المعتمد في حالة فاعلها مقدّم الطلب — تلك حالة ثانية أو امتداد.
💡 Exampleمثال

"Primary: Reconciliation Officer (allocation permission). Secondary: Treasury Supervisor (approves above SAR 50K), ERP AR module (posts the allocation)."«الرئيس: موظف المطابقة (صلاحية تخصيص). الثانوي: مشرف الخزينة (يعتمد ما فوق 50 ألف ريال)، ووحدة الذمم في نظام الموارد (تُقيّد التخصيص).»

4
4. Pre-conditions4. الشروط القبلية
What must already be true before step 1.ما يجب أن يكون صحيحاً قبل الخطوة 1.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. List only states that must be true BEFORE the trigger — and are checkable.اذكر فقط الحالات الواجب تحققها قبل الزناد — والقابلة للفحص.
  2. Phrase each as a verifiable state, not an activity.صُغ كلاً منها حالة يمكن التحقق منها، لا نشاطاً.
  3. Reference the UC or process that establishes each pre-condition.أحِل إلى الحالة أو العملية التي تُنشئ كل شرط مسبق.
🚫 Don’tلا تفعل
  1. Don't list obvious platform facts ("system is running").لا تذكر بدهيات المنصة («النظام يعمل»).
  2. Don't hide business rules here — rules govern the flow, not the entry.لا تُخفِ قواعد العمل هنا — القواعد تحكم التدفق لا الدخول.
  3. Don't write pre-conditions the actor cannot know or check.لا تكتب شروطاً لا يستطيع الفاعل معرفتها أو فحصها.
💡 Exampleمثال

"1) The receipt exists with status Unmatched (from UC-03 ingestion). 2) The officer holds the allocation permission. 3) The invoice register is current as of last night."«1) المقبوض قائم بحالة غير مطابق (من حالة الاستقبال UC-03). 2) الموظف يملك صلاحية التخصيص. 3) سجل الفواتير محدّث حتى ليلة أمس.»

5
5. Post-conditions5. الشروط البعدية
The guaranteed state on success and on failure.الحالة المضمونة عند النجاح وعند الفشل.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. State the success end-state AND the failure end-states.اذكر حالة النهاية عند النجاح وحالات النهاية عند الفشل.
  2. Describe post-conditions as data/state changes an auditor could verify.صِف النواتج تغييرات بيانات وحالات يستطيع مدقق التحقق منها.
  3. Note side effects: notifications sent, logs written, downstream postings.دوّن الآثار الجانبية: الإشعارات المرسلة والسجلات المكتوبة والقيود اللاحقة.
🚫 Don’tلا تفعل
  1. Don't promise outcomes the flow doesn't produce.لا تعد بنواتج لا ينتجها التدفق.
  2. Don't omit the "minimal guarantee" when the case fails midway.لا تُغفل «الضمان الأدنى» عند فشل الحالة في منتصفها.
  3. Don't restate the main flow's last step as the post-condition.لا تعد صياغة آخر خطوة في التدفق شرطاً لاحقاً.
💡 Exampleمثال

"Success: receipt Matched, allocation posted to ERP, audit entry written. Failure guarantee: receipt remains Unmatched, no partial posting, attempt logged."«النجاح: المقبوض مطابق والتخصيص مقيّد في نظام الموارد وقيد التدقيق مكتوب. ضمان الفشل: يبقى المقبوض غير مطابق، لا قيد جزئياً، والمحاولة مسجلة.»

6
6. Trigger6. المحفّز
The event that starts the use case.الحدث الذي يبدأ الحالة.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. State the single event that starts the flow — user action, time, or message.حدد الحدث الواحد الذي يبدأ التدفق — فعل مستخدم أو وقت أو رسالة.
  2. Distinguish the trigger from the pre-conditions around it.ميّز الزناد عن الشروط المسبقة المحيطة به.
  3. For time/message triggers, state source and frequency.لزناد الوقت أو الرسائل، اذكر المصدر والتكرار.
🚫 Don’tلا تفعل
  1. Don't list several triggers — that usually means several use cases.لا تذكر عدة زنادات — فذلك غالباً يعني عدة حالات.
  2. Don't write vague triggers ("when needed").لا تكتب زنادات مبهمة («عند الحاجة»).
  3. Don't confuse the trigger with the actor's goal.لا تخلط الزناد بهدف الفاعل.
💡 Exampleمثال

"Trigger: the officer opens an item from the Unmatched Receipts queue (typically each morning after the 07:30 ingestion run)."«الزناد: يفتح الموظف عنصراً من طابور المقبوضات غير المطابقة (عادة كل صباح بعد تشغيلة الاستقبال 07:30).»

7
7. Main Flow7. التدفق الرئيسي
Numbered actor–system steps for the happy path.خطوات مرقّمة بين الفاعل والنظام للمسار السعيد.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Number the steps and alternate actor action ↔ system response.رقّم الخطوات وناوب بين فعل الفاعل واستجابة النظام.
  2. Keep it the SUCCESS path only — 5 to 12 steps.أبقه مسار النجاح فقط — من 5 إلى 12 خطوة.
  3. Mark the branch points where alternatives/exceptions fork (at step 4 → Alt 4a).علّم نقاط التفرع حيث تنشعب البدائل والاستثناءات (عند الخطوة 4 ← البديل 4أ).
🚫 Don’tلا تفعل
  1. Don't embed if/else inside the main flow — that's what Alt/Exc flows are for.لا تضمّن إن/وإلا داخل التدفق الأساسي — لهذا وُجدت التدفقات البديلة والاستثنائية.
  2. Don't describe UI mechanics ("clicks the blue button") — describe intent.لا تصف ميكانيكا الشاشة («ينقر الزر الأزرق») — صِف القصد.
  3. Don't skip the system's confirmations — testers assert on them.لا تتجاوز تأكيدات النظام — فعليها يبني المختبرون تحققهم.
💡 Exampleمثال

"1 Officer opens the unmatched receipt. 2 System shows candidate invoices ranked by amount/date. 3 Officer selects invoice(s). 4 System validates totals [Alt 4a partial]. 5 Officer confirms. 6 System posts, marks Matched, logs."«1 يفتح الموظف المقبوض غير المطابق. 2 يعرض النظام الفواتير المرشحة مرتبة بالمبلغ والتاريخ. 3 يختار الموظف الفاتورة/الفواتير. 4 يتحقق النظام من الإجماليات [البديل 4أ جزئي]. 5 يؤكد الموظف. 6 يُقيّد النظام ويحوّل الحالة إلى مطابق ويسجّل.»

8
8. Alternative Flows8. التدفقات البديلة
Legitimate variations, each anchored to a main-flow step.تنويعات مشروعة، كل منها مثبّت إلى خطوة في التدفق الرئيسي.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Give each alternative an ID tied to its branch step (Alt 4a) and a name.أعطِ كل بديل معرفاً مرتبطاً بخطوة تفرعه (البديل 4أ) واسماً.
  2. State where the alternative rejoins the main flow (or ends the case).بيّن أين يعود البديل للتدفق الأساسي (أو ينهي الحالة).
  3. Cover the legitimate variations: partial allocation, multiple invoices, on-account.غطِّ التنويعات المشروعة: التخصيص الجزئي وتعدد الفواتير والدفع تحت الحساب.
🚫 Don’tلا تفعل
  1. Don't put failures here — failures are exceptions, not alternatives.لا تضع الإخفاقات هنا — فهي استثناءات لا بدائل.
  2. Don't leave an alternative without its rejoin/exit point.لا تترك بديلاً بلا نقطة عودة أو خروج.
  3. Don't duplicate main-flow steps inside the alternative — start from the branch.لا تكرر خطوات التدفق الأساسي داخل البديل — ابدأ من نقطة التفرع.
💡 Exampleمثال

"Alt 4a — Partial allocation: amounts differ; officer allocates part and leaves remainder on-account with a reason code; rejoin at step 5."«البديل 4أ — تخصيص جزئي: المبالغ مختلفة؛ يخصص الموظف جزءاً ويُبقي الباقي تحت الحساب برمز سبب؛ ويعود عند الخطوة 5.»

9
9. Exception Flows9. التدفقات الاستثنائية
Errors and failures with the exact system response and message.الأخطاء والإخفاقات مع استجابة النظام والرسالة بدقة.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Cover system failures and business rejections separately, each with its recovery.غطِّ أعطال النظام والرفض النظامي كلاً على حدة مع سبيل التعافي.
  2. State what the user sees, what is logged, and the guaranteed end-state.بيّن ما يراه المستخدم وما يُسجَّل وحالة النهاية المضمونة.
  3. Reference the business rule that fires each rejection (BR ref).أحِل إلى قاعدة العمل التي تطلق كل رفض.
🚫 Don’tلا تفعل
  1. Don't write "system shows an error" — specify which and what next.لا تكتب «يعرض النظام خطأ» — حدد أيّه وما التالي.
  2. Don't leave exceptions dead-ended without recovery or escalation.لا تترك الاستثناءات طرقاً مسدودة بلا تعافٍ أو تصعيد.
  3. Don't hide the most instructive cases — reviewers learn most from exceptions.لا تُخفِ أكثر الحالات تعليماً — من الاستثناءات يتعلم المراجعون أكثر.
💡 Exampleمثال

"Exc 6a — ERP posting fails: system keeps receipt Suspended, queues retry ×3, alerts the supervisor after the third failure; officer sees 'sent for posting — pending confirmation'."«الاستثناء 6أ — فشل القيد في نظام الموارد: يُبقي النظام المقبوض معلّقاً ويعيد المحاولة ثلاثاً وينبّه المشرف بعد الثالثة؛ ويرى الموظف «أُرسل للقيد — بانتظار التأكيد».»

10
10. Business Rules10. قواعد العمل
BR-xx rules referenced from the flows.قواعد BR-xx تُستدعى من التدفقات.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. Number rules (BR-UC07-01) and reference them from the steps they govern.رقّم القواعد (BR-UC07-01) وأحِل إليها من الخطوات التي تحكمها.
  2. Write each rule as a decision the system can evaluate.اكتب كل قاعدة قراراً يستطيع النظام تقييمه.
  3. Record the rule's source and owner — who can change it.سجّل مصدر القاعدة ومالكها — من يملك تغييرها.
🚫 Don’tلا تفعل
  1. Don't bury rules inside flow steps where testers will miss them.لا تدفن القواعد داخل خطوات التدفق حيث يفوّتها المختبرون.
  2. Don't state rules twice with different thresholds — one rule, one home.لا تذكر القاعدة مرتين بحدّين مختلفين — قاعدة واحدة وموطن واحد.
  3. Don't encode tomorrow's exceptions as today's rules — keep rules current.لا ترمّز استثناءات الغد قواعد اليوم — أبقِ القواعد بحاضرها.
💡 Exampleمثال

"BR-UC07-02 (owner: Head of Collections): manual allocations above SAR 50,000 require supervisor approval before posting."«BR-UC07-02 (المالك: مدير التحصيل): التخصيصات اليدوية فوق 50,000 ريال تتطلب اعتماد المشرف قبل القيد.»

11
11. Data Specifications11. مواصفات البيانات
Field-level table: type, length, mandatory, validation, error message.جدول على مستوى الحقل: النوع والطول والإلزامية والتحقق ورسالة الخطأ.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. List the fields the case reads and writes, with type, mandatory flag and validation.اذكر الحقول التي تقرؤها الحالة وتكتبها، مع النوع والإلزامية والتحقق.
  2. State default values and where each field's list of values comes from.حدد القيم الافتراضية ومصدر قائمة قيم كل حقل.
  3. Mark fields that feed the audit trail or downstream postings.علّم الحقول التي تغذي سجل التدقيق أو القيود اللاحقة.
🚫 Don’tلا تفعل
  1. Don't repeat the whole data dictionary — only this case's fields.لا تكرر قاموس البيانات كاملاً — حقول هذه الحالة فقط.
  2. Don't leave validation as "as per business" — name the rule.لا تترك التحقق «حسب العمل» — سمِّ القاعدة.
  3. Don't invent field names that differ from the SRS data section.لا تبتكر أسماء حقول تخالف قسم البيانات في وثيقة SRS.
💡 Exampleمثال

"Reason Code: mandatory on partial allocation; list maintained by finance (8 values); written to the audit trail and to the ERP posting memo."«رمز السبب: إلزامي عند التخصيص الجزئي؛ قائمته تديرها المالية (8 قيم)؛ يُكتب في سجل التدقيق ومذكرة القيد في نظام الموارد.»

12
12. UI Elements12. عناصر الواجهة
Screens and controls the flows use, with states.الشاشات وعناصر التحكم التي تستخدمها التدفقات، بحالاتها.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. List screens/components the case touches and their key states (empty, loading, error).اذكر الشاشات والمكوّنات التي تمسها الحالة وحالاتها الرئيسة (فارغة، تحميل، خطأ).
  2. Reference wireframes/prototypes by ID instead of describing pixels.أحِل إلى المخططات أو النماذج بمعرفاتها بدل وصف التفاصيل البصرية.
  3. Note bilingual and RTL requirements where they bite (numbers, dates, alignment).دوّن متطلبات اللغتين والاتجاه حيث تؤثر (الأرقام والتواريخ والمحاذاة).
🚫 Don’tلا تفعل
  1. Don't lock visual design here — this is scope, not styling.لا تُقفل التصميم البصري هنا — هذا نطاق لا تنسيق.
  2. Don't forget the empty and error states — they are half the build.لا تنسَ حالتي الفراغ والخطأ — فهما نصف البناء.
  3. Don't reference screens that no longer exist in the prototype.لا تُحِل إلى شاشات لم تعد موجودة في النموذج.
💡 Exampleمثال

"Screens: Unmatched Queue (WF-11), Allocation Workspace (WF-12: candidates panel, split-allocation grid, approval banner). Empty state: 'queue clear' with last-run time."«الشاشات: طابور غير المطابق (WF-11)، ومساحة التخصيص (WF-12: لوحة المرشحات وشبكة التقسيم وشريط الاعتماد). حالة الفراغ: «الطابور خالٍ» مع وقت آخر تشغيلة.»

13
13. NFRs & Open Issues13. المتطلبات غير الوظيفية والمسائل المفتوحة
Performance/security notes and what is still undecided.ملاحظات الأداء والأمن وما لم يُحسم بعد.
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
✅ Doافعل
  1. State case-specific NFRs only: response, volume at peak, permissions.اذكر المتطلبات غير الوظيفية الخاصة بالحالة فقط: الاستجابة وذروة الحجم والصلاحيات.
  2. Log open issues with an owner and a due date each.سجّل النقاط المفتوحة بمالك وتاريخ استحقاق لكل منها.
  3. Close the loop: issues resolved move into the flows, not stay parked.أغلق الدائرة: ما يُحسم من النقاط ينتقل إلى التدفقات ولا يبقى مركوناً.
🚫 Don’tلا تفعل
  1. Don't restate global NFRs from the SRS.لا تعد ذكر المتطلبات غير الوظيفية العامة من وثيقة SRS.
  2. Don't let open issues age without owners — an ownerless issue is a risk.لا تدع النقاط المفتوحة تشيخ بلا مالك — نقطة بلا مالك خطرٌ.
  3. Don't baseline the use case while a blocking issue is open.لا تعتمد الحالة خط أساس ونقطة حاجبة ما زالت مفتوحة.
💡 Exampleمثال

"NFR: candidate list returns in <2s for a payer with 500 open invoices. Open: OI-3 — does on-account require a customer notification? Owner: Head of Collections, due 15 Jul."«غير وظيفي: قائمة المرشحات تعود في أقل من ثانيتين لدافع له 500 فاتورة مفتوحة. مفتوح: OI-3 — هل يستلزم الدفع تحت الحساب إشعار العميل؟ المالك: مدير التحصيل، الاستحقاق 15 يوليو.»

Practitioner tipsنصائح الممارسين