ores.inbox.approval_part

Table of Contents

Reference data table of the parts of an approval: the functions whose approval a request may need. Examples: 'controller', 'finance', 'market_risk', 'operations'.

A part is what makes a request need several different people. Each part names the permission a person needs to answer for it, and its answer_order: a part with a lower order must approve before a part with a higher one can be answered, and parts with the same order are answered in parallel. A request's parts are the distinct parts of its changes, and the request is approved only when every one of them has an approval. A refusal from a part that can be answered ends the request.

Parts are managed by the system tenant. A tenant without a function grants the part's permission to whichever role does that work, so the part is decided by a permission and not by a job title.

1. Flags

2. Columns

2.1. code

Unique part code.

Examples: 'controller', 'market_risk'.

2.2. name

Human-readable name for the part.

std::string(faker::word::noun()) + " Part"

2.3. description

What the part is responsible for.

std::string(faker::lorem::sentence())

2.4. decide_permission_code

The permission a person needs to answer for this part.

Examples: 'inbox::approvals:decide_finance'.

std::string("inbox::approvals:decide_finance")

2.5. answer_order

The place of the part in the order of answers. A part can be answered only once every part with a lower order has approved. Parts with the same order are answered in parallel.

faker::number::integer(1, 3)

2.6. display_order

Order for UI display purposes.

faker::number::integer(1, 100)

3. Foreign keys

3.1. decide_permission_code

The permission a decider needs. Permissions are held by the system tenant, so the check reads it.

4. SQL

4.1. Flags

5. Validation function

6. Insert trigger

6.1. Validations

column validation_function
change_reason_code ores_dq_validate_change_reason_fn

7. C++

7.1. Flags

7.2. Repository

7.3. Domain includes

#include <string>

7.4. Entity includes

#include <string>

7.5. Conventions

7.6. Table display

column header
code Code
name Name
decide_permission_code Decide Permission
answer_order Answer Order
modified_by Modified By
version Version

7.7. Presentation

7.7.1. Detail fields

field label widget type is_key is_required placeholder
code Code codeEdit line_edit true true Enter part code
name Name nameEdit line_edit   true Enter display name
description Description descriptionEdit text_edit     Enter a description
decide_permission_code Decide Permission permissionEdit line_edit   true Enter a permission code

7.7.2. Columns

enum_name field header type width
Code code Code string 160
Name name Name string 200
DecidePermissionCode decide_permission_code Decide Permission string 200
AnswerOrder answer_order Answer Order int 100
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

7.8. Custom repository methods

8. See also

Emacs 29.3 (Org mode 9.6.15)