Linear Flow discipline + organization #224
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s

This commit is contained in:
harid 2026-06-26 18:09:45 +07:00
parent 832c5d2cb3
commit 3d2fc5128a
7 changed files with 1591 additions and 1148 deletions

View file

@ -129,14 +129,23 @@ export interface ExecutionContext {
/**
* Service / (Profile)
*
* "Circular Dependency" API Org API
* resultData Org profile
* (Linear Flow)
* commandType: C-PM-01, 02, 14
*
* - endpoint /org/command/excexute/create-officer-profile service (thin wrapper)
* - consumer rabbitmq handler service (no HTTP loopback)
* - consumer rabbitmq handler service (Linear Flow)
*
* Behavior preserve CommandController.CreateOfficeProfileExcecute
*
* Batch semantics: all-or-nothing transaction (sequential)
* throw rollback batch propagate error ()
* return result success count
*
* Keycloak: operations (createUser/addUserRoles/removeUserRoles/updateUserAttributes)
* transaction preserve behavior Keycloak rollback
* DB rollback Keycloak operation Keycloak
*
* Design note: แก้ปัญหา "Circular Dependency" API Org API
* resultData Org profile
*/
export class ExecuteOfficerProfileService {
private commandRepository = AppDataSource.getRepository(Command);