orbit-code-ai 0.1.0

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.
@@ -0,0 +1,554 @@
1
+ ---
2
+ name: ace-app-mq
3
+ description: Scaffold a complete IBM ACE MQ application using a two-phase multi-agent approach — Phase 1 creates all directories and empty files, Phase 2 fills each file with correct content.
4
+ trigger: /ace-app-mq
5
+ ---
6
+
7
+ # /ace-app-mq
8
+
9
+ Scaffold a complete IBM ACE MQ application.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /ace-app-mq <AppName> [description of what the app does]
15
+
16
+ Examples:
17
+ /ace-app-mq GetAccountDetails returns account details by customer ID
18
+ /ace-app-mq ProcessBatchFile processes incoming batch files
19
+ ```
20
+
21
+ ## Variables to Derive
22
+
23
+ From `{AppName}` (PascalCase input):
24
+ - `{appnamelowercase}` = all lowercase, no separators. e.g. `GetAccountDetails` → `getaccountdetails`
25
+ - `{DOMAIN}` = uppercase with dashes. e.g. `GetAccountDetails` → `GET-ACCOUNT-DETAILS`
26
+
27
+ **MQ applications have exactly TWO msgflow files:**
28
+ - `GW_{AppName}.msgflow` — gateway/entry flow (NO "Flow" suffix)
29
+ - `{AppName}Flow.msgflow` — main orchestration flow (WITH "Flow" suffix)
30
+
31
+ ---
32
+
33
+ ## PHASE 1 — Launch Scaffold Agent
34
+
35
+ Use the Agent tool to launch a general-purpose agent with this exact prompt:
36
+
37
+ > Create the following directory structure and empty files for the IBM ACE MQ application `{AppName}`. Use the Bash tool to create directories (mkdir -p) and the Write tool to create each file with a single comment placeholder `<!-- TODO -->` for XML/JSON/SQL files, `#!/bin/bash` for shell files, or `-- TODO` for ESQL files. Do not add any real content yet.
38
+ >
39
+ > Directories to create:
40
+ > - `{AppName}/XSD&Swagger/XSD/`
41
+ > - `{AppName}/XSD&Swagger/common/types/`
42
+ > - `{AppName}/com/qiwa/esb/{appnamelowercase}/`
43
+ >
44
+ > Files to create (empty placeholders):
45
+ > - `{AppName}/.project`
46
+ > - `{AppName}/application.descriptor`
47
+ > - `{AppName}/XSD&Swagger/{DOMAIN}.xml`
48
+ > - `{AppName}/XSD&Swagger/{AppName}.json`
49
+ > - `{AppName}/XSD&Swagger/XSD/{AppName}.xsd`
50
+ > - `{AppName}/com/qiwa/esb/{appnamelowercase}/GW_{AppName}.msgflow`
51
+ > - `{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow.msgflow`
52
+ > - `{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_Compute.esql`
53
+ > - `{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_MapResponse.esql`
54
+ > - `{AppName}/{AppName}QueuesDefinition.sh`
55
+ > - `{AppName}/{AppName}DBScript.sql`
56
+ >
57
+ > Report "SCAFFOLD DONE" when all files and directories exist.
58
+
59
+ Wait for the scaffold agent to complete before proceeding to Phase 2.
60
+
61
+ ---
62
+
63
+ ## PHASE 2 — Launch Content Agents (in parallel)
64
+
65
+ After scaffold is confirmed, launch multiple agents in parallel using the Agent tool — one per file group. Each agent uses the Write tool to overwrite the placeholder with real content.
66
+
67
+ ### Agent A — Project files
68
+
69
+ Write these two files:
70
+
71
+ **`{AppName}/.project`** — exact content:
72
+ ```xml
73
+ <?xml version="1.0" encoding="UTF-8"?>
74
+ <projectDescription>
75
+ <name>{AppName}</name>
76
+ <comment></comment>
77
+ <projects>
78
+ <project>Framework</project>
79
+ </projects>
80
+ <buildSpec>
81
+ <buildCommand>
82
+ <name>com.ibm.etools.mft.applib.applibbuilder</name>
83
+ <arguments>
84
+ </arguments>
85
+ </buildCommand>
86
+ <buildCommand>
87
+ <name>com.ibm.etools.mft.applib.applibresourcevalidator</name>
88
+ <arguments>
89
+ </arguments>
90
+ </buildCommand>
91
+ <buildCommand>
92
+ <name>com.ibm.etools.mft.connector.policy.ui.PolicyBuilder</name>
93
+ <arguments>
94
+ </arguments>
95
+ </buildCommand>
96
+ <buildCommand>
97
+ <name>com.ibm.etools.mft.applib.mbprojectbuilder</name>
98
+ <arguments>
99
+ </arguments>
100
+ </buildCommand>
101
+ <buildCommand>
102
+ <name>com.ibm.etools.msg.validation.dfdl.mlibdfdlbuilder</name>
103
+ <arguments>
104
+ </arguments>
105
+ </buildCommand>
106
+ <buildCommand>
107
+ <name>com.ibm.etools.mft.flow.adapters.adapterbuilder</name>
108
+ <arguments>
109
+ </arguments>
110
+ </buildCommand>
111
+ <buildCommand>
112
+ <name>com.ibm.etools.mft.flow.sca.scabuilder</name>
113
+ <arguments>
114
+ </arguments>
115
+ </buildCommand>
116
+ <buildCommand>
117
+ <name>com.ibm.etools.msg.validation.dfdl.mbprojectresourcesbuilder</name>
118
+ <arguments>
119
+ </arguments>
120
+ </buildCommand>
121
+ <buildCommand>
122
+ <name>com.ibm.etools.mft.esql.lang.esqllangbuilder</name>
123
+ <arguments>
124
+ </arguments>
125
+ </buildCommand>
126
+ <buildCommand>
127
+ <name>com.ibm.etools.mft.map.builder.mslmappingbuilder</name>
128
+ <arguments>
129
+ </arguments>
130
+ </buildCommand>
131
+ <buildCommand>
132
+ <name>com.ibm.etools.mft.flow.msgflowxsltbuilder</name>
133
+ <arguments>
134
+ </arguments>
135
+ </buildCommand>
136
+ <buildCommand>
137
+ <name>com.ibm.etools.mft.flow.msgflowbuilder</name>
138
+ <arguments>
139
+ </arguments>
140
+ </buildCommand>
141
+ <buildCommand>
142
+ <name>com.ibm.etools.mft.decision.service.ui.decisionservicerulebuilder</name>
143
+ <arguments>
144
+ </arguments>
145
+ </buildCommand>
146
+ <buildCommand>
147
+ <name>com.ibm.etools.mft.pattern.capture.PatternBuilder</name>
148
+ <arguments>
149
+ </arguments>
150
+ </buildCommand>
151
+ <buildCommand>
152
+ <name>com.ibm.etools.mft.json.builder.JSONBuilder</name>
153
+ <arguments>
154
+ </arguments>
155
+ </buildCommand>
156
+ <buildCommand>
157
+ <name>com.ibm.etools.mft.restapi.ui.restApiDefinitionsBuilder</name>
158
+ <arguments>
159
+ </arguments>
160
+ </buildCommand>
161
+ <buildCommand>
162
+ <name>com.ibm.etools.mft.policy.ui.policybuilder</name>
163
+ <arguments>
164
+ </arguments>
165
+ </buildCommand>
166
+ <buildCommand>
167
+ <name>com.ibm.etools.msg.validation.dfdl.dfdlqnamevalidator</name>
168
+ <arguments>
169
+ </arguments>
170
+ </buildCommand>
171
+ <buildCommand>
172
+ <name>com.ibm.etools.mft.bar.ext.barbuilder</name>
173
+ <arguments>
174
+ </arguments>
175
+ </buildCommand>
176
+ <buildCommand>
177
+ <name>com.ibm.etools.mft.unittest.ui.TestCaseBuilder</name>
178
+ <arguments>
179
+ </arguments>
180
+ </buildCommand>
181
+ </buildSpec>
182
+ <natures>
183
+ <nature>com.ibm.etools.msgbroker.tooling.applicationNature</nature>
184
+ <nature>com.ibm.etools.msgbroker.tooling.messageBrokerProjectNature</nature>
185
+ </natures>
186
+ </projectDescription>
187
+ ```
188
+
189
+ **`{AppName}/application.descriptor`** — exact content (single line, no line breaks):
190
+ ```xml
191
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:appDescriptor xmlns="http://com.ibm.etools.mft.descriptor.base" xmlns:ns2="http://com.ibm.etools.mft.descriptor.app"><references><sharedLibraryReference><libraryName>Framework</libraryName></sharedLibraryReference></references></ns2:appDescriptor>
192
+ ```
193
+
194
+ ---
195
+
196
+ ### Agent B — Msgflow files
197
+
198
+ Write these two files:
199
+
200
+ **`{AppName}/com/qiwa/esb/{appnamelowercase}/GW_{AppName}.msgflow`**
201
+
202
+ CRITICAL: This is the gateway flow. Name is `GW_{AppName}.msgflow` — NO "Flow" suffix.
203
+
204
+ ```xml
205
+ <?xml version="1.0" encoding="UTF-8"?>
206
+ <ecore:EPackage xmi:version="2.0"
207
+ xmlns:xmi="http://www.omg.org/XMI"
208
+ xmlns:ComIbmMQInput.msgnode="ComIbmMQInput.msgnode"
209
+ xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode"
210
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
211
+ xmlns:eflow="http://www.ibm.com/wbi/2005/eflow"
212
+ xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility"
213
+ nsURI="com/qiwa/esb/{appnamelowercase}/GW_{AppName}.msgflow"
214
+ nsPrefix="com_qiwa_esb_{appnamelowercase}_GW_{AppName}.msgflow">
215
+ <eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1">
216
+ <eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
217
+ <translation xmi:type="utility:TranslatableString" key="GW_{AppName}"
218
+ bundleName="com/qiwa/esb/{appnamelowercase}/GW_{AppName}"
219
+ pluginId="{AppName}"/>
220
+ <composition>
221
+ <nodes xmi:type="ComIbmMQInput.msgnode:FCMComposite_1"
222
+ xmi:id="FCMComposite_1_1" location="23,170"
223
+ queueName="BS.{VERB}.{RESOURCE}.RQ">
224
+ <translation xmi:type="utility:ConstantString" string="MQ Input"/>
225
+ </nodes>
226
+ <nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1"
227
+ xmi:id="FCMComposite_1_2" location="300,170"
228
+ computeExpression="esql://routine/com.qiwa.esb.{appnamelowercase}#{AppName}Flow_Compute.Main"
229
+ computeMode="all">
230
+ <translation xmi:type="utility:ConstantString" string="{AppName}Flow_Compute"/>
231
+ </nodes>
232
+ <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1"
233
+ targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1"
234
+ sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
235
+ </composition>
236
+ <propertyOrganizer/>
237
+ <stickyBoard/>
238
+ </eClassifiers>
239
+ </ecore:EPackage>
240
+ ```
241
+
242
+ **`{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow.msgflow`**
243
+
244
+ CRITICAL: This is the main flow. Name is `{AppName}Flow.msgflow` — WITH "Flow" suffix.
245
+
246
+ ```xml
247
+ <?xml version="1.0" encoding="UTF-8"?>
248
+ <ecore:EPackage xmi:version="2.0"
249
+ xmlns:xmi="http://www.omg.org/XMI"
250
+ xmlns:ComIbmCompute.msgnode="ComIbmCompute.msgnode"
251
+ xmlns:ComIbmMQOutput.msgnode="ComIbmMQOutput.msgnode"
252
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
253
+ xmlns:eflow="http://www.ibm.com/wbi/2005/eflow"
254
+ xmlns:utility="http://www.ibm.com/wbi/2005/eflow_utility"
255
+ nsURI="com/qiwa/esb/{appnamelowercase}/{AppName}Flow.msgflow"
256
+ nsPrefix="com_qiwa_esb_{appnamelowercase}_{AppName}Flow.msgflow">
257
+ <eClassifiers xmi:type="eflow:FCMComposite" name="FCMComposite_1">
258
+ <eSuperTypes href="http://www.ibm.com/wbi/2005/eflow#//FCMBlock"/>
259
+ <translation xmi:type="utility:TranslatableString" key="{AppName}Flow"
260
+ bundleName="com/qiwa/esb/{appnamelowercase}/{AppName}Flow"
261
+ pluginId="{AppName}"/>
262
+ <composition>
263
+ <nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1"
264
+ xmi:id="FCMComposite_1_1" location="23,170"
265
+ computeExpression="esql://routine/com.qiwa.esb.{appnamelowercase}#{AppName}Flow_PrepDpRq.Main"
266
+ computeMode="all">
267
+ <translation xmi:type="utility:ConstantString" string="{AppName}Flow_PrepDpRq"/>
268
+ </nodes>
269
+ <nodes xmi:type="ComIbmCompute.msgnode:FCMComposite_1"
270
+ xmi:id="FCMComposite_1_2" location="300,170"
271
+ computeExpression="esql://routine/com.qiwa.esb.{appnamelowercase}#{AppName}Flow_MapResponse.Main"
272
+ computeMode="all">
273
+ <translation xmi:type="utility:ConstantString" string="{AppName}Flow_MapResponse"/>
274
+ </nodes>
275
+ <nodes xmi:type="ComIbmMQOutput.msgnode:FCMComposite_1"
276
+ xmi:id="FCMComposite_1_3" location="580,170"
277
+ queueName="BS.{VERB}.{RESOURCE}.RS">
278
+ <translation xmi:type="utility:ConstantString" string="MQ Output"/>
279
+ </nodes>
280
+ <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1"
281
+ targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1"
282
+ sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
283
+ <connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_2"
284
+ targetNode="FCMComposite_1_3" sourceNode="FCMComposite_1_2"
285
+ sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
286
+ </composition>
287
+ <propertyOrganizer/>
288
+ <stickyBoard/>
289
+ </eClassifiers>
290
+ </ecore:EPackage>
291
+ ```
292
+
293
+ ---
294
+
295
+ ### Agent C — ESQL files
296
+
297
+ Write these two files:
298
+
299
+ **`{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_Compute.esql`**
300
+
301
+ ```esql
302
+ BROKER SCHEMA com.qiwa.esb.{appnamelowercase}
303
+ PATH Qiwa.Framework.Lib;
304
+
305
+ CREATE COMPUTE MODULE {AppName}Flow_Compute
306
+ CREATE FUNCTION Main() RETURNS BOOLEAN
307
+ BEGIN
308
+ CALL CopyMessageHeaders();
309
+
310
+ SET Environment.Variables.Properties = InputRoot.Properties;
311
+ SET Environment.Variables.MQMD = InputRoot.MQMD;
312
+ SET Environment.Variables.MQRFH2 = InputRoot.MQRFH2;
313
+ SET Environment.Variables.XMLNSC = InputRoot.XMLNSC;
314
+
315
+ DECLARE rInBodyRef REFERENCE TO InputRoot.XMLNSC.{AppName}Rq.Body;
316
+ DECLARE rInHeaderRef REFERENCE TO InputRoot.XMLNSC.{AppName}Rq.Header;
317
+
318
+ -- *** Implement business logic here based on user's description ***
319
+
320
+ RETURN TRUE;
321
+ END;
322
+
323
+ CREATE PROCEDURE CopyMessageHeaders() BEGIN
324
+ DECLARE I INTEGER 1;
325
+ DECLARE J INTEGER;
326
+ SET J = CARDINALITY(InputRoot.*[]);
327
+ WHILE I < J DO
328
+ SET OutputRoot.*[I] = InputRoot.*[I];
329
+ SET I = I + 1;
330
+ END WHILE;
331
+ END;
332
+
333
+ CREATE PROCEDURE CopyEntireMessage() BEGIN
334
+ SET OutputRoot = InputRoot;
335
+ END;
336
+ END MODULE;
337
+ ```
338
+
339
+ **`{AppName}/com/qiwa/esb/{appnamelowercase}/{AppName}Flow_MapResponse.esql`**
340
+
341
+ ```esql
342
+ BROKER SCHEMA com.qiwa.esb.{appnamelowercase}
343
+ PATH Qiwa.Framework.Lib;
344
+
345
+ CREATE COMPUTE MODULE {AppName}Flow_MapResponse
346
+ CREATE FUNCTION Main() RETURNS BOOLEAN
347
+ BEGIN
348
+ SET OutputRoot.Properties = Environment.Variables.Properties;
349
+ SET OutputRoot.MQMD = Environment.Variables.MQMD;
350
+ SET OutputRoot.MQRFH2 = Environment.Variables.MQRFH2;
351
+
352
+ DECLARE rInHeader REFERENCE TO Environment.Variables.XMLNSC.{AppName}Rq.Header;
353
+
354
+ CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC';
355
+ CREATE FIRSTCHILD OF OutputRoot.XMLNSC.{AppName}Rs NAME 'Header';
356
+ DECLARE rOutHeader REFERENCE TO OutputRoot.XMLNSC.{AppName}Rs.Header;
357
+ CREATE LASTCHILD OF OutputRoot.XMLNSC.{AppName}Rs NAME 'Body';
358
+
359
+ -- *** Map output fields here based on user's description ***
360
+
361
+ CALL Create_esbXML_Response_Header(GetESBSuccessCode(), rInHeader, rOutHeader);
362
+ RETURN TRUE;
363
+ END;
364
+
365
+ CREATE PROCEDURE CopyMessageHeaders() BEGIN
366
+ DECLARE I INTEGER 1;
367
+ DECLARE J INTEGER;
368
+ SET J = CARDINALITY(InputRoot.*[]);
369
+ WHILE I < J DO
370
+ SET OutputRoot.*[I] = InputRoot.*[I];
371
+ SET I = I + 1;
372
+ END WHILE;
373
+ END;
374
+
375
+ CREATE PROCEDURE CopyEntireMessage() BEGIN
376
+ SET OutputRoot = InputRoot;
377
+ END;
378
+ END MODULE;
379
+ ```
380
+
381
+ ---
382
+
383
+ ### Agent D — Config files
384
+
385
+ Write these five files:
386
+
387
+ **`{AppName}/XSD&Swagger/{DOMAIN}.xml`**
388
+
389
+ ```xml
390
+ <properties refresh-policy="automatic">
391
+
392
+ <group name="{AppName}.{AppName}Flow">
393
+ <group name="Logging">
394
+ <property name="LogEnabled" value="TRUE" />
395
+ <property name="AuditEnabled" value="TRUE" />
396
+ <property name="MaskingEnabled" value="TRUE" />
397
+ <property name="key1" value="" />
398
+ <property name="value1" value="" />
399
+ <property name="key2" value="" />
400
+ <property name="value2" value="" />
401
+ <property name="key3" value="" />
402
+ <property name="value3" value="" />
403
+ <property name="key4" value="" />
404
+ <property name="value4" value="" />
405
+ </group>
406
+ <group name="Variables">
407
+ <property name="ServerDown" value="E0000616" />
408
+ <property name="TimeOutError" value="E9999998" />
409
+ </group>
410
+ <group name="SchemaValidation">
411
+ <property name="ValidationEnabled" value="TRUE" />
412
+ </group>
413
+ <group name="Retry">
414
+ <property name="RetryEnabled" value="FALSE" />
415
+ <property name="minWaitDurationSec" value="60" />
416
+ <property name="maxRetryCount" value="5" />
417
+ </group>
418
+ </group>
419
+
420
+ </properties>
421
+ ```
422
+
423
+ **`{AppName}/XSD&Swagger/XSD/{AppName}.xsd`**
424
+
425
+ Generate appropriate request/response body fields based on the user's description:
426
+
427
+ ```xml
428
+ <?xml version="1.0" encoding="UTF-8"?>
429
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
430
+ xmlns:tns="http://www.qiwa.sa/esb/{appnamelowercase}/v1"
431
+ xmlns:common="http://www.qiwa.sa/esb/common/types/v1"
432
+ targetNamespace="http://www.qiwa.sa/esb/{appnamelowercase}/v1"
433
+ elementFormDefault="qualified">
434
+
435
+ <xs:import namespace="http://www.qiwa.sa/esb/common/types/v1"
436
+ schemaLocation="../common/types/ESB_common_types_v1.0.xsd"/>
437
+
438
+ <xs:complexType name="{AppName}Rq_BodyType">
439
+ <xs:sequence>
440
+ <!-- Fields derived from user description -->
441
+ </xs:sequence>
442
+ </xs:complexType>
443
+
444
+ <xs:complexType name="{AppName}Rs_BodyType">
445
+ <xs:sequence>
446
+ <!-- Fields derived from user description -->
447
+ </xs:sequence>
448
+ </xs:complexType>
449
+
450
+ <xs:complexType name="{AppName}Rq_MessageType">
451
+ <xs:sequence>
452
+ <xs:element name="Header" type="common:ESBXMLRequestHeader_Type"/>
453
+ <xs:element name="Body" type="tns:{AppName}Rq_BodyType"/>
454
+ </xs:sequence>
455
+ </xs:complexType>
456
+
457
+ <xs:complexType name="{AppName}Rs_MessageType">
458
+ <xs:sequence>
459
+ <xs:element name="Header" type="common:ESBXMLResponseHeader_Type"/>
460
+ <xs:element name="Body" type="tns:{AppName}Rs_BodyType"/>
461
+ </xs:sequence>
462
+ </xs:complexType>
463
+
464
+ <xs:element name="{AppName}Rq" type="tns:{AppName}Rq_MessageType"/>
465
+ <xs:element name="{AppName}Rs" type="tns:{AppName}Rs_MessageType"/>
466
+
467
+ </xs:schema>
468
+ ```
469
+
470
+ **`{AppName}/XSD&Swagger/{AppName}.json`**
471
+
472
+ ```json
473
+ {
474
+ "swagger": "2.0",
475
+ "info": { "title": "{AppName}", "version": "1.0" },
476
+ "basePath": "/esb/{AppName}",
477
+ "consumes": ["application/xml"],
478
+ "produces": ["application/xml"],
479
+ "paths": {
480
+ "/{appnamelowercase}": {
481
+ "post": {
482
+ "operationId": "{AppName}",
483
+ "parameters": [{ "in": "body", "name": "body", "schema": { "$ref": "#/definitions/{AppName}Rq_MessageType" } }],
484
+ "responses": { "200": { "schema": { "$ref": "#/definitions/{AppName}Rs_MessageType" } } }
485
+ }
486
+ }
487
+ },
488
+ "definitions": {
489
+ "{AppName}Rq_MessageType": {},
490
+ "{AppName}Rs_MessageType": {}
491
+ }
492
+ }
493
+ ```
494
+
495
+ **`{AppName}/{AppName}QueuesDefinition.sh`**
496
+
497
+ ```bash
498
+ #!/bin/bash
499
+ # Queue definitions for {AppName}
500
+
501
+ runmqsc QMGR_NAME << EOF
502
+
503
+ DEFINE QLOCAL('BS.{VERB}.{RESOURCE}.RQ.BACKOUT') DEFPSIST(YES) MAXDEPTH(640000) REPLACE
504
+ DEFINE QLOCAL('BS.{VERB}.{RESOURCE}.RQ') DEFPSIST(YES) MAXDEPTH(640000) BOQNAME('BS.{VERB}.{RESOURCE}.RQ.BACKOUT') BOTHRESH(5) REPLACE
505
+
506
+ DEFINE QLOCAL('BS.{VERB}.{RESOURCE}.RS.BACKOUT') DEFPSIST(YES) MAXDEPTH(640000) REPLACE
507
+ DEFINE QLOCAL('BS.{VERB}.{RESOURCE}.RS') DEFPSIST(YES) MAXDEPTH(640000) BOQNAME('BS.{VERB}.{RESOURCE}.RS.BACKOUT') BOTHRESH(5) REPLACE
508
+
509
+ EOF
510
+ ```
511
+
512
+ **`{AppName}/{AppName}DBScript.sql`**
513
+
514
+ ```sql
515
+ -- Register the service in routing table
516
+ INSERT INTO MCR_CHANNESBFUNC_TBL (ESBFUNCID, ESBFUNCNAME, REQUEST_QUEUE_NAME, RESPONSE_QUEUE_NAME)
517
+ VALUES ('{ABBREV}0001', '{AppName}', 'BS.{VERB}.{RESOURCE}.RQ', 'BS.{VERB}.{RESOURCE}.RS');
518
+
519
+ -- Grant channel access (add channels as needed)
520
+ INSERT INTO MCR_CHANNAUTH_TBL (CHANNID, ESBFUNCID) VALUES ('MOBILE', '{ABBREV}0001');
521
+ INSERT INTO MCR_CHANNAUTH_TBL (CHANNID, ESBFUNCID) VALUES ('WEB', '{ABBREV}0001');
522
+ ```
523
+
524
+ ---
525
+
526
+ ## After All Agents Complete
527
+
528
+ Print this summary:
529
+
530
+ ```
531
+ ✓ {AppName} MQ application created
532
+
533
+ {AppName}/
534
+ ├── .project
535
+ ├── application.descriptor
536
+ ├── {AppName}QueuesDefinition.sh
537
+ ├── {AppName}DBScript.sql
538
+ ├── XSD&Swagger/
539
+ │ ├── {DOMAIN}.xml
540
+ │ ├── {AppName}.json
541
+ │ └── XSD/
542
+ │ └── {AppName}.xsd
543
+ └── com/qiwa/esb/{appnamelowercase}/
544
+ ├── GW_{AppName}.msgflow ← gateway (no "Flow" suffix)
545
+ ├── {AppName}Flow.msgflow ← main flow
546
+ ├── {AppName}Flow_Compute.esql
547
+ └── {AppName}Flow_MapResponse.esql
548
+
549
+ Reminder:
550
+ - Copy ESB_common_types_v1.0.xsd into XSD&Swagger/common/types/
551
+ - Replace {VERB} and {RESOURCE} in queue names with actual values
552
+ - Fill in XSD body field definitions
553
+ - Update ESBFUNCID to a unique 4-char abbreviation + 4-digit sequence
554
+ ```