orbit-code-ai 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_agent_reference/components/audit-logging.md +12 -6
- package/_agent_reference/components/common-utils.md +253 -84
- package/_agent_reference/components/error-handling.md +142 -81
- package/_agent_reference/components/http-adapters.md +11 -20
- package/_agent_reference/components/input-adapters.md +26 -16
- package/_agent_reference/components/output-adapters.md +23 -16
- package/_agent_reference/components/property-reader.md +24 -12
- package/_agent_reference/components/retry.md +32 -27
- package/_agent_reference/config/naming-conventions.md +8 -5
- package/_agent_reference/config/properties-template.md +2 -1
- package/_agent_reference/esql-coding-standards.md +2 -2
- package/_agent_reference/msgflow-xml-reference.md +31 -10
- package/_agent_reference/templates/file-flow.md +7 -4
- package/_agent_reference/templates/http-flow.md +29 -28
- package/_agent_reference/templates/mq-flow.md +35 -33
- package/dist/cli.mjs +18 -18
- package/package.json +1 -1
- package/skills/apic-api/SKILL.md +1 -1
|
@@ -85,7 +85,7 @@ PASSTHRU('SELECT * FROM users WHERE id = ?' TO Database.DSN VALUES(userId));
|
|
|
85
85
|
## Coding Standards — Error Handling
|
|
86
86
|
- Do NOT use THROW USER EXCEPTION for business logic validations
|
|
87
87
|
- Set error state via: `SET Environment.Variables.MWResponse.status = '<error_code>';`
|
|
88
|
-
- Use `CALL getEsbChannlsErrorCodeDescriptionFrom(errorCode,
|
|
88
|
+
- Use `CALL getEsbChannlsErrorCodeDescriptionFrom(errorCode, channelId, serviceCode, OUT englishDesc, OUT arabicDesc, OUT status)` for localized error messages (see [common-utils](components/common-utils.md))
|
|
89
89
|
- Use `CALL Create_esbXML_Response_Header(...)` for standardized XML response headers
|
|
90
90
|
- All error flows MUST route through the framework `LogError` subflow
|
|
91
91
|
- Route validation failures using `PROPAGATE TO TERMINAL 'out2'; RETURN FALSE;`
|
|
@@ -94,7 +94,7 @@ PASSTHRU('SELECT * FROM users WHERE id = ?' TO Database.DSN VALUES(userId));
|
|
|
94
94
|
|
|
95
95
|
| Artifact | Convention | Example |
|
|
96
96
|
|---|---|---|
|
|
97
|
-
| BROKER SCHEMA | com.qiwa.esb.<
|
|
97
|
+
| BROKER SCHEMA | com.qiwa.esb.<msgflowname-lower> | com.qiwa.esb.getaccountdetails |
|
|
98
98
|
| ESQL module | <FlowName>_<NodeName> | CheckValTransEmployeeFlow_CallDB_GetUser |
|
|
99
99
|
| Node names | UpperCamelCase, descriptive | ValidateRequest, CallEmployeeDB |
|
|
100
100
|
| Subflow names | UpperCamelCase | GetEmployeeData |
|
|
@@ -93,16 +93,28 @@ Message flows use a specific XML format based on EMF (Eclipse Modeling Framework
|
|
|
93
93
|
|
|
94
94
|
Always use these instead of building raw nodes:
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
These are the real subflows in `Qiwa/Framework/Lib/` (xmi:type prefix `Qiwa.Framework.Lib:<Name>`):
|
|
97
|
+
|
|
98
|
+
| Subflow | Purpose | Typical node properties (EXTERNAL) |
|
|
97
99
|
|---|---|---|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
100
|
+
| MQ_Input_Node | MQ input: properties, audit, retry, validation, rollback | PROPERTIES_ENABLED, LOG_ENABLED, RETRY_ENABLED, SCHEMA_VALIDATION_ENABLED, ROLL_BACK_TRANSACTION, queueName, PropertiesGroup, PropertyFilename |
|
|
101
|
+
| MQ_Output_Node | MQ output (defaults CorrelId, applies Priority, optional audit) | ENABLE_AUDIT_OUTPUT |
|
|
102
|
+
| MQ_Dynamic_Output_Node | Output to a runtime-resolved queue | (queue from LocalEnvironment.Destination) |
|
|
103
|
+
| MQ_Dead_Output_Node | Dead / backout routing | DEAD_FLOW |
|
|
104
|
+
| MQ_ReplyToQ_Node | Reply to `MQMD.ReplyToQ` | (none) |
|
|
105
|
+
| Rest_Input_Node | HTTP REST gateway entry | ServiceURL, TimeoutInSec |
|
|
106
|
+
| File_Input_Node / File_Output_Node | File in / out | PROPERTIES_ENABLED, LOG_ENABLED, SCHEMA_VALIDATION_ENABLED |
|
|
107
|
+
| FileCopy | Copy a file within a flow | (Directory/Filename) |
|
|
108
|
+
| PropertyReader | Load the properties XML into `Environment.Properties` | PropertyFilename, PropertiesGroup, LogicalTreePath |
|
|
109
|
+
| ErrorHandler | Central error handling | Is<Backend>Adapter flags, IsAtomic |
|
|
110
|
+
| LogError | Structured error audit | (none) |
|
|
111
|
+
| LogAudit / LogOutgoingAudit | Incoming / outgoing audit | FLOW_START |
|
|
112
|
+
| MWBusinessErrorResponse | Business error response builder | (service-specific) |
|
|
113
|
+
| HTTPRequestAdapter / HTTPResponseAdapter | Outbound HTTP/SOAP call + response normalize | ServiceURL, TimeoutInSec |
|
|
114
|
+
| InternalServiceCaller | Call another ESB flow in-broker | callCorrIDOffset |
|
|
115
|
+
| InternalHTTPRequestAdapter / HTTPInternalCaller | Internal HTTP call variants | ServiceURL |
|
|
116
|
+
| RetryPoint | Re-queue with delay (runs SetRetryProperties) | MAX_RETRY_COUNT, MIN_WAIT_TIME_SEC |
|
|
117
|
+
| SendEmailNotification / SendSMSNotification | Email / SMS notification | (service-specific) |
|
|
106
118
|
|
|
107
119
|
**Framework rule:** Always check the framework index before writing any ESQL or creating any flow node. If a framework subflow or function already does what is needed, use it — never reimplement it. Standard MQ input/output and error handling MUST use framework subflows.
|
|
108
120
|
|
|
@@ -178,8 +190,12 @@ Main processing flows use:
|
|
|
178
190
|
|
|
179
191
|
## Standard Message Structure (Always Required)
|
|
180
192
|
|
|
193
|
+
The outer element is the **service-specific** request/response name (e.g. `GetMyDataRq` / `GetMyDataRs`),
|
|
194
|
+
**not** a literal `<Root>` — framework ESQL reaches it via `InputRoot.XMLNSC.*:*[<]`. `<Root>` below is a
|
|
195
|
+
placeholder for that element:
|
|
196
|
+
|
|
181
197
|
```xml
|
|
182
|
-
<Root>
|
|
198
|
+
<Root> <!-- = the service request/response element, e.g. GetMyDataRq -->
|
|
183
199
|
<Header>
|
|
184
200
|
<TransactionId/>
|
|
185
201
|
<ChannelId/>
|
|
@@ -190,16 +206,21 @@ Main processing flows use:
|
|
|
190
206
|
<ServiceCode/>
|
|
191
207
|
<SessionId/>
|
|
192
208
|
<RequestTime/>
|
|
209
|
+
<MWRequestTime/> <!-- set/copied by the framework -->
|
|
210
|
+
<MWResponseTime/>
|
|
193
211
|
<ResponseStatus>
|
|
194
212
|
<Code/>
|
|
195
213
|
<Status/> <!-- Success | Error -->
|
|
196
214
|
<EnglishMsg/>
|
|
215
|
+
<ArabicMsg/>
|
|
197
216
|
</ResponseStatus>
|
|
198
217
|
</Header>
|
|
199
218
|
<Body/>
|
|
200
219
|
</Root>
|
|
201
220
|
```
|
|
202
221
|
|
|
222
|
+
(See [components/common-utils](components/common-utils.md) for the full header field list.)
|
|
223
|
+
|
|
203
224
|
## Key Constants (from CommonUtils.esql)
|
|
204
225
|
- Success code: `'00000000'`
|
|
205
226
|
- Technical error: `'99999999'`
|
|
@@ -24,7 +24,7 @@ MyServiceApp/
|
|
|
24
24
|
```
|
|
25
25
|
[File_Input_Node] ← reads file from directory
|
|
26
26
|
↓ out
|
|
27
|
-
[PropertyReader] ←
|
|
27
|
+
[PropertyReader] ← PropertyFilename="${broker.name}/MYSERVICE.xml", PropertiesGroup="BS_MyService.ProcessMyFile"
|
|
28
28
|
↓ out
|
|
29
29
|
[LogAudit] ← flowStart=TRUE
|
|
30
30
|
↓ out
|
|
@@ -64,7 +64,8 @@ All failure terminals → [ErrorHandler] → [LogError] → [MQ_Dead_Output_Node
|
|
|
64
64
|
## ProcessMyFile_Compute.esql
|
|
65
65
|
|
|
66
66
|
```esql
|
|
67
|
-
BROKER SCHEMA
|
|
67
|
+
BROKER SCHEMA com.qiwa.esb.processmyfile
|
|
68
|
+
PATH Qiwa.Framework.Lib;
|
|
68
69
|
|
|
69
70
|
CREATE COMPUTE MODULE ProcessMyFile_Compute
|
|
70
71
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
@@ -97,7 +98,8 @@ END MODULE;
|
|
|
97
98
|
## ProcessMyFile_MapOutput.esql
|
|
98
99
|
|
|
99
100
|
```esql
|
|
100
|
-
BROKER SCHEMA
|
|
101
|
+
BROKER SCHEMA com.qiwa.esb.processmyfile
|
|
102
|
+
PATH Qiwa.Framework.Lib;
|
|
101
103
|
|
|
102
104
|
CREATE COMPUTE MODULE ProcessMyFile_MapOutput
|
|
103
105
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
@@ -206,7 +208,8 @@ For simple file routing/archival within a flow:
|
|
|
206
208
|
- [ ] Create MapOutput ESQL for output formatting
|
|
207
209
|
- [ ] Add properties group to properties XML file
|
|
208
210
|
- [ ] Wire ALL failure terminals to `ErrorHandler` → `LogError` → `MQ_Dead_Output_Node`
|
|
209
|
-
- [ ] Set `
|
|
211
|
+
- [ ] Set `PropertyFilename` and `PropertiesGroup` on `PropertyReader` node
|
|
212
|
+
- [ ] BROKER SCHEMA is `com.qiwa.esb.<msgflowname-lower>` with `PATH Qiwa.Framework.Lib;`
|
|
210
213
|
- [ ] Set output filename dynamically in `MapOutput` ESQL
|
|
211
214
|
- [ ] Consider `FileCopy` for archiving input before processing
|
|
212
215
|
- [ ] If schema validation needed: set `ValidationEnabled=TRUE` and provide XSD
|
|
@@ -23,13 +23,13 @@ MyServiceApp/
|
|
|
23
23
|
```
|
|
24
24
|
[Rest_Input_Node] ← HTTP input, parses JSON to XMLNSC
|
|
25
25
|
↓ out
|
|
26
|
-
[PropertyReader] ←
|
|
26
|
+
[PropertyReader] ← PropertyFilename="${broker.name}/MYSERVICE.xml", PropertiesGroup="BS_MyService.GetMyData"
|
|
27
27
|
↓ out
|
|
28
28
|
[LogAudit] ← flowStart=TRUE
|
|
29
29
|
↓ out
|
|
30
30
|
[GetMyData_Compute] ← validate input, set routing
|
|
31
31
|
↓ out
|
|
32
|
-
[HTTPRequestAdapter] ← call backend (set
|
|
32
|
+
[HTTPRequestAdapter] ← call backend (set ServiceURL / TimeoutInSec)
|
|
33
33
|
↓ out
|
|
34
34
|
[HTTPResponseAdapter] ← normalize backend response
|
|
35
35
|
↓ out
|
|
@@ -49,7 +49,8 @@ Note: HTTP flows use `MWBusinessErrorResponse` (not `MQ_Dead_Output_Node`) on th
|
|
|
49
49
|
## GetMyData_Compute.esql
|
|
50
50
|
|
|
51
51
|
```esql
|
|
52
|
-
BROKER SCHEMA
|
|
52
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
53
|
+
PATH Qiwa.Framework.Lib;
|
|
53
54
|
|
|
54
55
|
CREATE COMPUTE MODULE GetMyData_Compute
|
|
55
56
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
@@ -57,24 +58,21 @@ CREATE COMPUTE MODULE GetMyData_Compute
|
|
|
57
58
|
CALL CopyMessageHeaders();
|
|
58
59
|
CALL CopyEntireMessage();
|
|
59
60
|
|
|
60
|
-
-- JSON input arrives as XMLNSC (Rest_Input_Node converts it)
|
|
61
|
-
DECLARE
|
|
61
|
+
-- JSON input arrives as XMLNSC (Rest_Input_Node converts it); reference the service element
|
|
62
|
+
DECLARE rIn REFERENCE TO InputRoot.XMLNSC.*:*[<];
|
|
63
|
+
DECLARE customerId CHARACTER rIn.Body.CustomerId;
|
|
62
64
|
|
|
63
|
-
-- Validate
|
|
65
|
+
-- Validate (business error → set MWResponse.status, route to error branch)
|
|
64
66
|
IF customerId IS NULL OR customerId = '' THEN
|
|
65
|
-
SET Environment.
|
|
66
|
-
|
|
67
|
+
SET Environment.Variables.MWResponse.status = 'E5500003';
|
|
68
|
+
PROPAGATE TO TERMINAL 'out2';
|
|
67
69
|
RETURN FALSE;
|
|
68
70
|
END IF;
|
|
69
71
|
|
|
70
|
-
-- Generate correlation ID
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
InputRoot.XMLNSC.Root.Header.SessionId,
|
|
75
|
-
corrId
|
|
76
|
-
);
|
|
77
|
-
SET OutputRoot.HTTPInputHeader.X-Correlation-Id = corrId;
|
|
72
|
+
-- Generate correlation ID (FUNCTION returns BLOB → cast for the header string)
|
|
73
|
+
SET OutputRoot.HTTPInputHeader."X-Correlation-Id" =
|
|
74
|
+
CAST(getChannelCorrelationID(FIELDVALUE(rIn.Header.ChannelId),
|
|
75
|
+
FIELDVALUE(rIn.Header.TransactionId), '') AS CHAR);
|
|
78
76
|
|
|
79
77
|
RETURN TRUE;
|
|
80
78
|
END;
|
|
@@ -86,20 +84,21 @@ END MODULE;
|
|
|
86
84
|
## GetMyData_PrepareRequest.esql
|
|
87
85
|
|
|
88
86
|
```esql
|
|
89
|
-
BROKER SCHEMA
|
|
87
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
88
|
+
PATH Qiwa.Framework.Lib;
|
|
90
89
|
|
|
91
90
|
CREATE COMPUTE MODULE GetMyData_PrepareRequest
|
|
92
91
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
93
92
|
BEGIN
|
|
94
93
|
CALL CopyMessageHeaders();
|
|
94
|
+
DECLARE rIn REFERENCE TO InputRoot.XMLNSC.*:*[<];
|
|
95
95
|
|
|
96
|
-
-- Set target URL from
|
|
96
|
+
-- Set target URL from the routing-service property (3rd value = URL)
|
|
97
97
|
SET Environment.Destination.HTTP.RequestURL =
|
|
98
98
|
Environment.Properties.BS_MyService.GetMyData.BankIdForRoutingService.qiwa[3];
|
|
99
99
|
|
|
100
100
|
-- Build backend request payload
|
|
101
|
-
SET OutputRoot.XMLNSC.BackendRequest.CustomerId =
|
|
102
|
-
InputRoot.XMLNSC.Root.Body.CustomerId;
|
|
101
|
+
SET OutputRoot.XMLNSC.BackendRequest.CustomerId = rIn.Body.CustomerId;
|
|
103
102
|
|
|
104
103
|
RETURN TRUE;
|
|
105
104
|
END;
|
|
@@ -111,21 +110,22 @@ END MODULE;
|
|
|
111
110
|
## GetMyData_MapResponse.esql
|
|
112
111
|
|
|
113
112
|
```esql
|
|
114
|
-
BROKER SCHEMA
|
|
113
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
114
|
+
PATH Qiwa.Framework.Lib;
|
|
115
115
|
|
|
116
116
|
CREATE COMPUTE MODULE GetMyData_MapResponse
|
|
117
117
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
118
118
|
BEGIN
|
|
119
119
|
CALL CopyMessageHeaders();
|
|
120
|
+
DECLARE rOut REFERENCE TO OutputRoot.XMLNSC.*:*[<];
|
|
120
121
|
|
|
121
122
|
-- Build standard ESB response
|
|
122
|
-
SET
|
|
123
|
-
SET
|
|
124
|
-
SET
|
|
123
|
+
SET rOut.Header.ResponseStatus.Code = GetESBSuccessCode(); -- '00000000'
|
|
124
|
+
SET rOut.Header.ResponseStatus.Status = 'Success';
|
|
125
|
+
SET rOut.Header.ResponseStatus.EnglishMsg = 'Success';
|
|
125
126
|
|
|
126
127
|
-- Map business data from backend response
|
|
127
|
-
SET
|
|
128
|
-
InputRoot.XMLNSC.BackendResponse.Balance;
|
|
128
|
+
SET rOut.Body.AccountBalance = InputRoot.XMLNSC.BackendResponse.Balance;
|
|
129
129
|
|
|
130
130
|
-- Set HTTP response code
|
|
131
131
|
SET OutputRoot.HTTPResponseHeader."$statusCode" = 200;
|
|
@@ -177,8 +177,9 @@ HTTP status code: `200` (ESB pattern — errors are in the payload, not HTTP sta
|
|
|
177
177
|
- [ ] Create Compute, PrepareRequest, MapResponse ESQL modules
|
|
178
178
|
- [ ] Add properties group to properties XML file
|
|
179
179
|
- [ ] Wire ALL failure terminals to `ErrorHandler` → `MWBusinessErrorResponse`
|
|
180
|
-
- [ ] Set `
|
|
181
|
-
- [ ] Set
|
|
180
|
+
- [ ] Set `PropertyFilename` and `PropertiesGroup` on `PropertyReader` node
|
|
181
|
+
- [ ] Set `ServiceURL`/`TimeoutInSec` on `HTTPRequestAdapter`; backend error-mapping flag goes on `ErrorHandler`
|
|
182
|
+
- [ ] BROKER SCHEMA is `com.qiwa.esb.<msgflowname-lower>` with `PATH Qiwa.Framework.Lib;`
|
|
182
183
|
- [ ] Set `HTTP Reply Node` as the success terminal exit
|
|
183
184
|
- [ ] Set `OutputRoot.HTTPResponseHeader."$statusCode"` = 200 in MapResponse
|
|
184
185
|
- [ ] Confirm `UserPassword` is masked in audit config
|
|
@@ -32,13 +32,13 @@ MyServiceDBScript.sql
|
|
|
32
32
|
```
|
|
33
33
|
[MQ_Input_Node]
|
|
34
34
|
↓ out
|
|
35
|
-
[PropertyReader] ←
|
|
35
|
+
[PropertyReader] ← PropertyFilename="${broker.name}/MYSERVICE.xml", PropertiesGroup="BS_MyService.GetMyData"
|
|
36
36
|
↓ out
|
|
37
37
|
[LogAudit] ← flowStart=TRUE
|
|
38
38
|
↓ out
|
|
39
39
|
[GetMyData_Compute] ← your ESQL: validate input, prepare backend call
|
|
40
40
|
↓ out
|
|
41
|
-
[HTTPRequestAdapter] ← set
|
|
41
|
+
[HTTPRequestAdapter] ← set ServiceURL / TimeoutInSec (backend error-mapping flag goes on ErrorHandler)
|
|
42
42
|
↓ out
|
|
43
43
|
[HTTPResponseAdapter]
|
|
44
44
|
↓ out
|
|
@@ -56,7 +56,8 @@ All failure terminals → [ErrorHandler] → [LogError] → [MQ_Dead_Output_Node
|
|
|
56
56
|
## GetMyData_Compute.esql
|
|
57
57
|
|
|
58
58
|
```esql
|
|
59
|
-
BROKER SCHEMA
|
|
59
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
60
|
+
PATH Qiwa.Framework.Lib;
|
|
60
61
|
|
|
61
62
|
CREATE COMPUTE MODULE GetMyData_Compute
|
|
62
63
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
@@ -64,22 +65,21 @@ CREATE COMPUTE MODULE GetMyData_Compute
|
|
|
64
65
|
CALL CopyMessageHeaders();
|
|
65
66
|
CALL CopyEntireMessage();
|
|
66
67
|
|
|
67
|
-
--
|
|
68
|
-
DECLARE
|
|
68
|
+
-- The ESB wraps a per-service element; reference its first child, then Header/Body
|
|
69
|
+
DECLARE rIn REFERENCE TO InputRoot.XMLNSC.*:*[<];
|
|
70
|
+
|
|
71
|
+
-- Validate required input fields (business error → set MWResponse.status, route to error)
|
|
72
|
+
DECLARE customerId CHARACTER rIn.Body.CustomerId;
|
|
69
73
|
IF customerId IS NULL OR customerId = '' THEN
|
|
70
|
-
SET Environment.
|
|
71
|
-
|
|
72
|
-
RETURN FALSE;
|
|
74
|
+
SET Environment.Variables.MWResponse.status = 'E5500003'; -- an ESB_ERROR_CODES value
|
|
75
|
+
PROPAGATE TO TERMINAL 'out2'; -- business-error branch
|
|
76
|
+
RETURN FALSE;
|
|
73
77
|
END IF;
|
|
74
78
|
|
|
75
|
-
-- Set correlation ID
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
InputRoot.XMLNSC.Root.Header.SessionId,
|
|
80
|
-
corrId
|
|
81
|
-
);
|
|
82
|
-
SET OutputRoot.MQMD.CorrelId = CAST(corrId AS BLOB CCSID 1208);
|
|
79
|
+
-- Set correlation ID (FUNCTION returning BLOB: ChannelId, TransactionId, offset)
|
|
80
|
+
SET OutputRoot.MQMD.CorrelId =
|
|
81
|
+
getChannelCorrelationID(FIELDVALUE(rIn.Header.ChannelId),
|
|
82
|
+
FIELDVALUE(rIn.Header.TransactionId), '');
|
|
83
83
|
|
|
84
84
|
RETURN TRUE;
|
|
85
85
|
END;
|
|
@@ -91,20 +91,21 @@ END MODULE;
|
|
|
91
91
|
## GetMyData_PrepareRequest.esql
|
|
92
92
|
|
|
93
93
|
```esql
|
|
94
|
-
BROKER SCHEMA
|
|
94
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
95
|
+
PATH Qiwa.Framework.Lib;
|
|
95
96
|
|
|
96
97
|
CREATE COMPUTE MODULE GetMyData_PrepareRequest
|
|
97
98
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
98
99
|
BEGIN
|
|
99
100
|
CALL CopyMessageHeaders();
|
|
101
|
+
DECLARE rIn REFERENCE TO InputRoot.XMLNSC.*:*[<];
|
|
100
102
|
|
|
101
103
|
-- Build backend request (adjust structure for your backend)
|
|
102
|
-
SET OutputRoot.XMLNSC.BackendRequest.CustomerId
|
|
103
|
-
|
|
104
|
-
SET OutputRoot.XMLNSC.BackendRequest.RequestTime =
|
|
105
|
-
InputRoot.XMLNSC.Root.Header.RequestTime;
|
|
104
|
+
SET OutputRoot.XMLNSC.BackendRequest.CustomerId = rIn.Body.CustomerId;
|
|
105
|
+
SET OutputRoot.XMLNSC.BackendRequest.RequestTime = rIn.Header.RequestTime;
|
|
106
106
|
|
|
107
|
-
--
|
|
107
|
+
-- Target URL from the routing-service property (3rd value = URL).
|
|
108
|
+
-- ApplicationLabel/flowName resolve at runtime; this is the literal-path equivalent:
|
|
108
109
|
SET Environment.Destination.HTTP.RequestURL =
|
|
109
110
|
Environment.Properties.BS_MyService.GetMyData.BankIdForRoutingService.qiwa[3];
|
|
110
111
|
|
|
@@ -118,22 +119,23 @@ END MODULE;
|
|
|
118
119
|
## GetMyData_MapResponse.esql
|
|
119
120
|
|
|
120
121
|
```esql
|
|
121
|
-
BROKER SCHEMA
|
|
122
|
+
BROKER SCHEMA com.qiwa.esb.getmydata
|
|
123
|
+
PATH Qiwa.Framework.Lib;
|
|
122
124
|
|
|
123
125
|
CREATE COMPUTE MODULE GetMyData_MapResponse
|
|
124
126
|
CREATE FUNCTION Main() RETURNS BOOLEAN
|
|
125
127
|
BEGIN
|
|
126
128
|
CALL CopyMessageHeaders();
|
|
127
129
|
CALL CopyEntireMessage();
|
|
130
|
+
DECLARE rOut REFERENCE TO OutputRoot.XMLNSC.*:*[<];
|
|
128
131
|
|
|
129
132
|
-- Map backend response to ESB standard structure
|
|
130
|
-
SET
|
|
131
|
-
SET
|
|
132
|
-
SET
|
|
133
|
+
SET rOut.Header.ResponseStatus.Code = GetESBSuccessCode(); -- '00000000'
|
|
134
|
+
SET rOut.Header.ResponseStatus.Status = 'Success';
|
|
135
|
+
SET rOut.Header.ResponseStatus.EnglishMsg = 'Success';
|
|
133
136
|
|
|
134
137
|
-- Map business data
|
|
135
|
-
SET
|
|
136
|
-
InputRoot.XMLNSC.BackendResponse.Balance;
|
|
138
|
+
SET rOut.Body.AccountBalance = InputRoot.XMLNSC.BackendResponse.Balance;
|
|
137
139
|
-- ... map other fields
|
|
138
140
|
|
|
139
141
|
RETURN TRUE;
|
|
@@ -225,9 +227,8 @@ INSERT INTO MCR_CHANNESBFUNC_TBL (ESBFUNCID, ESBFUNCNAME, REQUEST_QUEUE_NAME, RE
|
|
|
225
227
|
VALUES ('GMYD0001', 'GET_MY_DATA', 'BS.GET.MY.DATA.RQ', 'BS.GET.MY.DATA.RS');
|
|
226
228
|
|
|
227
229
|
-- Grant channel access
|
|
228
|
-
INSERT INTO MCR_CHANNAUTH_TBL (CHANNID, ESBFUNCID)
|
|
229
|
-
VALUES ('
|
|
230
|
-
VALUES ('WEB', 'GMYD0001');
|
|
230
|
+
INSERT INTO MCR_CHANNAUTH_TBL (CHANNID, ESBFUNCID) VALUES ('MOBILE', 'GMYD0001');
|
|
231
|
+
INSERT INTO MCR_CHANNAUTH_TBL (CHANNID, ESBFUNCID) VALUES ('WEB', 'GMYD0001');
|
|
231
232
|
```
|
|
232
233
|
|
|
233
234
|
---
|
|
@@ -243,6 +244,7 @@ VALUES ('WEB', 'GMYD0001');
|
|
|
243
244
|
- [ ] Create queue definition shell script
|
|
244
245
|
- [ ] Create DB script to register service and channel auth
|
|
245
246
|
- [ ] Wire ALL failure terminals to `ErrorHandler`
|
|
246
|
-
- [ ] Set `
|
|
247
|
-
- [ ] Set
|
|
247
|
+
- [ ] Set `PropertyFilename` and `PropertiesGroup` on `PropertyReader` node
|
|
248
|
+
- [ ] Set `ServiceURL`/`TimeoutInSec` on `HTTPRequestAdapter`; set the backend error-mapping flag on `ErrorHandler`
|
|
249
|
+
- [ ] BROKER SCHEMA is `com.qiwa.esb.<msgflowname-lower>` with `PATH Qiwa.Framework.Lib;`
|
|
248
250
|
- [ ] Confirm `UserPassword` is in `maskingIn` and `maskingOut`
|
package/dist/cli.mjs
CHANGED
|
@@ -83759,7 +83759,7 @@ async function printStartupScreen() {
|
|
|
83759
83759
|
const sLen = ` ● ${sL} Ready — type /help to begin`.length;
|
|
83760
83760
|
out.push(boxRow(sRow, W2, sLen));
|
|
83761
83761
|
out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
|
|
83762
|
-
out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.
|
|
83762
|
+
out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.23"}${RESET}`);
|
|
83763
83763
|
out.push("");
|
|
83764
83764
|
process.stdout.write(out.join(`
|
|
83765
83765
|
`) + `
|
|
@@ -334230,7 +334230,7 @@ function getAnthropicEnvMetadata() {
|
|
|
334230
334230
|
function getBuildAgeMinutes() {
|
|
334231
334231
|
if (false)
|
|
334232
334232
|
;
|
|
334233
|
-
const buildTime = new Date("2026-06-
|
|
334233
|
+
const buildTime = new Date("2026-06-28T08:19:59.996Z").getTime();
|
|
334234
334234
|
if (isNaN(buildTime))
|
|
334235
334235
|
return;
|
|
334236
334236
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -358647,7 +358647,7 @@ function buildPrimarySection() {
|
|
|
358647
358647
|
}, undefined, false, undefined, this);
|
|
358648
358648
|
return [{
|
|
358649
358649
|
label: "Version",
|
|
358650
|
-
value: "0.1.
|
|
358650
|
+
value: "0.1.23"
|
|
358651
358651
|
}, {
|
|
358652
358652
|
label: "Session name",
|
|
358653
358653
|
value: nameValue
|
|
@@ -410387,7 +410387,7 @@ function getAceSystemPromptSection() {
|
|
|
410387
410387
|
return `# IBM App Connect Enterprise (ACE) Expertise
|
|
410388
410388
|
|
|
410389
410389
|
You are an expert IBM App Connect Enterprise (ACE) developer and autonomous coding assistant.
|
|
410390
|
-
You specialize in writing, modifying, debugging, and architecting ACE artifacts — ESQL routines (.esql), Message flows (.msgflow), Subflows (.subflow), XSD schemas (.xsd), and project configuration files. You understand the
|
|
410390
|
+
You specialize in writing, modifying, debugging, and architecting ACE artifacts — ESQL routines (.esql), Message flows (.msgflow), Subflows (.subflow), XSD schemas (.xsd), and project configuration files. You understand the ESB framework conventions deeply.
|
|
410391
410391
|
|
|
410392
410392
|
## ACE File Types You Work With
|
|
410393
410393
|
- **.esql** — ESQL modules (Compute, Filter, Database modules, Functions, Procedures)
|
|
@@ -410405,7 +410405,7 @@ These hold for every ACE task, even quick edits. Load the detailed reference fil
|
|
|
410405
410405
|
- **Write complete files** — read before modifying, then write the full updated file. Never partial snippets.
|
|
410406
410406
|
- **ESQL:** use REFERENCE TO for repeated tree paths; evaluate CARDINALITY() once before loops (never in a WHILE condition); use \`SET OutputRoot = InputRoot;\` for full copies.
|
|
410407
410407
|
- **Security:** PASSTHRU with string concatenation is FORBIDDEN — always parameterize with \`?\` placeholders. Never introduce SQL/command injection.
|
|
410408
|
-
- **Framework first:** never reimplement what a
|
|
410408
|
+
- **Framework first:** never reimplement what a framework subflow/function already does. Standard MQ I/O and error handling MUST use framework subflows.
|
|
410409
410409
|
- **Flows:** every node type needs a matching xmlns; wire all failure terminals to error handlers; subflow terminals use Capital I/O (InTerminal.Input/OutTerminal.Output), built-in nodes use lowercase (InTerminal.in/OutTerminal.out).
|
|
410410
410410
|
- **Naming:** BROKER SCHEMA \`com.qiwa.esb.<flow_lowercase>\`; ESQL module \`<FlowName>_<NodeName>\` must match the computeExpression/filterExpression exactly.
|
|
410411
410411
|
- **application.descriptor** must always be a SINGLE LINE of XML.
|
|
@@ -470725,7 +470725,7 @@ function WelcomeV2() {
|
|
|
470725
470725
|
dimColor: true,
|
|
470726
470726
|
children: [
|
|
470727
470727
|
"v",
|
|
470728
|
-
"0.1.
|
|
470728
|
+
"0.1.23",
|
|
470729
470729
|
" "
|
|
470730
470730
|
]
|
|
470731
470731
|
}, undefined, true, undefined, this)
|
|
@@ -470925,7 +470925,7 @@ function WelcomeV2() {
|
|
|
470925
470925
|
dimColor: true,
|
|
470926
470926
|
children: [
|
|
470927
470927
|
"v",
|
|
470928
|
-
"0.1.
|
|
470928
|
+
"0.1.23",
|
|
470929
470929
|
" "
|
|
470930
470930
|
]
|
|
470931
470931
|
}, undefined, true, undefined, this)
|
|
@@ -471151,7 +471151,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
471151
471151
|
dimColor: true,
|
|
471152
471152
|
children: [
|
|
471153
471153
|
"v",
|
|
471154
|
-
"0.1.
|
|
471154
|
+
"0.1.23",
|
|
471155
471155
|
" "
|
|
471156
471156
|
]
|
|
471157
471157
|
}, undefined, true, undefined, this);
|
|
@@ -471405,7 +471405,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
471405
471405
|
dimColor: true,
|
|
471406
471406
|
children: [
|
|
471407
471407
|
"v",
|
|
471408
|
-
"0.1.
|
|
471408
|
+
"0.1.23",
|
|
471409
471409
|
" "
|
|
471410
471410
|
]
|
|
471411
471411
|
}, undefined, true, undefined, this);
|
|
@@ -474766,7 +474766,7 @@ ${args || "The user wants to generate a new ACE application. Follow Step 1: ask
|
|
|
474766
474766
|
});
|
|
474767
474767
|
registerBundledSkill({
|
|
474768
474768
|
name: "ace-review",
|
|
474769
|
-
description: "Perform a thorough code review of IBM ACE artifacts — ESQL correctness, flow wiring, naming conventions, error handling, framework usage, and
|
|
474769
|
+
description: "Perform a thorough code review of IBM ACE artifacts — ESQL correctness, flow wiring, naming conventions, error handling, framework usage, and ESQL coding standards",
|
|
474770
474770
|
aliases: ["ace-audit"],
|
|
474771
474771
|
model: "gemini-3.1-flash-lite",
|
|
474772
474772
|
whenToUse: 'When the user wants a code review of their ACE project, ESQL modules, message flows, or subflows. Triggered by mentions of "review", "audit", "check" in the context of ACE/ESQL/msgflow files',
|
|
@@ -474808,7 +474808,7 @@ Perform a thorough code review of the specified IBM ACE file(s) or the entire pr
|
|
|
474808
474808
|
- **application.descriptor:** Is it single-line XML? Are all shared library references present?
|
|
474809
474809
|
- **.project:** Are all dependencies listed?
|
|
474810
474810
|
- **File organization:** Does the package path follow com/qiwa/esb/<service>/ convention?
|
|
474811
|
-
- **
|
|
474811
|
+
- **Standards adherence:** BROKER SCHEMA format, error handling via Environment.Variables.MWResponse.status, LogError routing
|
|
474812
474812
|
|
|
474813
474813
|
## Instructions
|
|
474814
474814
|
|
|
@@ -474918,7 +474918,7 @@ Use the real node names and terminal labels from THIS app.
|
|
|
474918
474918
|
4. **Key transformations:** What the ESQL does to the message tree; which fields are mapped.
|
|
474919
474919
|
5. **Error handling:** How errors are caught and routed; which terminals wire to error handlers.
|
|
474920
474920
|
6. **External dependencies:** DB calls (stored procedures), SOAP/REST backends, queue names.
|
|
474921
|
-
7. **Framework usage:** Which
|
|
474921
|
+
7. **Framework usage:** Which framework subflows are used and why.
|
|
474922
474922
|
8. **State management:** How Environment.Variables carries intermediate state.
|
|
474923
474923
|
9. **Non-obvious design decisions:** Anything a new developer might find confusing.
|
|
474924
474924
|
|
|
@@ -474932,7 +474932,7 @@ ${args || "The user did not specify a target. Ask which file, application folder
|
|
|
474932
474932
|
});
|
|
474933
474933
|
registerBundledSkill({
|
|
474934
474934
|
name: "ace-refactor",
|
|
474935
|
-
description: "Refactor IBM ACE ESQL code for performance, clarity, and alignment with
|
|
474935
|
+
description: "Refactor IBM ACE ESQL code for performance, clarity, and alignment with ESQL coding standards",
|
|
474936
474936
|
aliases: [],
|
|
474937
474937
|
model: "gemini-3.1-pro-preview",
|
|
474938
474938
|
whenToUse: "When the user wants to improve, clean up, optimize, or refactor their ESQL code or message flows",
|
|
@@ -474947,7 +474947,7 @@ ${readInstructions([
|
|
|
474947
474947
|
"components/error-handling.md"
|
|
474948
474948
|
])}
|
|
474949
474949
|
|
|
474950
|
-
Refactor the specified file for performance and clarity following strict
|
|
474950
|
+
Refactor the specified file for performance and clarity following strict ESQL coding standards. Always read the file first, then write the complete refactored version.
|
|
474951
474951
|
|
|
474952
474952
|
## Refactoring Rules (Apply ALL)
|
|
474953
474953
|
|
|
@@ -475057,7 +475057,7 @@ ${args || "No flow specified. Ask the user which flow or ESQL module needs test
|
|
|
475057
475057
|
});
|
|
475058
475058
|
registerBundledSkill({
|
|
475059
475059
|
name: "ace-scaffold",
|
|
475060
|
-
description: "Scaffold a new IBM ACE message flow with ESQL from a description — creates .msgflow and .esql files following
|
|
475060
|
+
description: "Scaffold a new IBM ACE message flow with ESQL from a description — creates .msgflow and .esql files following framework conventions",
|
|
475061
475061
|
aliases: ["ace-flow"],
|
|
475062
475062
|
model: "gemini-3.1-pro-preview",
|
|
475063
475063
|
whenToUse: "When the user wants to create a single new message flow, add a new subflow to an existing project, or quickly scaffold a flow from a description",
|
|
@@ -492042,7 +492042,7 @@ Usage: orbit --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
492042
492042
|
pendingHookMessages
|
|
492043
492043
|
}, renderAndRun);
|
|
492044
492044
|
}
|
|
492045
|
-
}).version("0.1.
|
|
492045
|
+
}).version("0.1.23 (Orbit AI)", "-v, --version", "Output the version number");
|
|
492046
492046
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
492047
492047
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
492048
492048
|
if (canUserConfigureAdvisor()) {
|
|
@@ -492564,7 +492564,7 @@ if (false) {}
|
|
|
492564
492564
|
async function main2() {
|
|
492565
492565
|
const args = process.argv.slice(2);
|
|
492566
492566
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
492567
|
-
console.log(`${"0.1.
|
|
492567
|
+
console.log(`${"0.1.23"} (Orbit AI)`);
|
|
492568
492568
|
return;
|
|
492569
492569
|
}
|
|
492570
492570
|
if (args.includes("--provider")) {
|
|
@@ -492668,4 +492668,4 @@ async function main2() {
|
|
|
492668
492668
|
}
|
|
492669
492669
|
main2();
|
|
492670
492670
|
|
|
492671
|
-
//# debugId=
|
|
492671
|
+
//# debugId=636F7570F245EA3D64756E2164756E21
|
package/package.json
CHANGED
package/skills/apic-api/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apic-api
|
|
3
|
-
description: Generate a complete IBM API Connect (APIC) API definition for the DataPower API Gateway — full OpenAPI 2.0 (or 3.0) YAML including the x-ibm-configuration assembly (middleware logging, JWT validate, token-expiration switch, ESB response envelope, and catch handlers). Standard NHC
|
|
3
|
+
description: Generate a complete IBM API Connect (APIC) API definition for the DataPower API Gateway — full OpenAPI 2.0 (or 3.0) YAML including the x-ibm-configuration assembly (middleware logging, JWT validate, token-expiration switch, ESB response envelope, and catch handlers). Standard NHC middleware is baked in with opt-out flags.
|
|
4
4
|
trigger: /apic-api
|
|
5
5
|
---
|
|
6
6
|
|