Update README.md
This commit is contained in:
67
README.md
67
README.md
@@ -59,3 +59,70 @@ Jika SOA meminta format JSON Array seperti ini:
|
||||
{ "key": "teller", "value": "811" },
|
||||
{ "key": "trxId", "value": "TRX-123" }
|
||||
]
|
||||
```
|
||||
Gunakan sintaks **Inline List of Maps** dari SpEL (Kurung kurawal di dalam kurung kurawal):
|
||||
* **Expression Rule:** `{ {'key': 'teller', 'value': '811'}, {'key': 'trxId', 'value': #transaction.id} }`
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Cara Menjalankan Aplikasi Lokal
|
||||
|
||||
### Prasyarat:
|
||||
* Java 17+
|
||||
* Maven 3.x
|
||||
* Database Oracle (Sesuaikan URL/Credential di `application.yaml`)
|
||||
|
||||
### Langkah-langkah:
|
||||
1. Pastikan database Oracle menyala.
|
||||
2. Jalankan perintah:
|
||||
```bash
|
||||
./mvnw spring-boot:run
|
||||
```
|
||||
3. Saat *startup* pertama, `DataSeeder.java` akan menyuntikkan data *dummy* dan konfigurasi.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Uji Coba (API Testing)
|
||||
|
||||
Gunakan Postman atau *browser* untuk menembak *endpoint* berikut:
|
||||
|
||||
**Test Kotran 1001 (Global + Mapping + Math + Array):**
|
||||
```http
|
||||
GET http://localhost:8080/api/v1/soa/generate-payload?transactionId=TRX-555&kotran=1001
|
||||
```
|
||||
|
||||
*Output yang diharapkan:*
|
||||
```json
|
||||
{
|
||||
"RequestHeader": {
|
||||
"MessageSender": "TPS_CORE",
|
||||
"MessageType": "JSON",
|
||||
"ChannelId": "116",
|
||||
"GlobalTimestamp": "2026-02-28 06:15:00"
|
||||
},
|
||||
"TLBF_ACC": "1234567890",
|
||||
"TLBF_AMT": 5000.0,
|
||||
"TLBF_CCY": "USD",
|
||||
"messageHeader": {
|
||||
"property": [
|
||||
{
|
||||
"propertyKey": "tellerId",
|
||||
"propertyValue": "8119852"
|
||||
},
|
||||
{
|
||||
"propertyKey": "transactionCode",
|
||||
"propertyValue": "TRX-555"
|
||||
},
|
||||
{
|
||||
"propertyKey": "currency",
|
||||
"propertyValue": "USD"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔒 Error Handling & Worklist Integration
|
||||
Aplikasi ini di-desain *Fail-Safe*. Jika ada *mandatory field* yang gagal terpetakan (bernilai `null` setelah *fallback*), `MappingEngineService` akan melempar `RuntimeException`. Di arsitektur *Production*, *exception* ini akan ditangkap oleh *Orchestrator* untuk kemudian disimpan ke tabel **Worklist** agar bisa diperbaiki konfigurasinya dan di-*retry* secara manual tanpa kehilangan transaksi.
|
||||
Reference in New Issue
Block a user