Noctam/DWP/ACS Test Harness/Notes: Difference between revisions
Jump to navigation
Jump to search
Save my work |
Notes on DCI calls to CISSIM |
||
| Line 13: | Line 13: | ||
*** {{c|DCI923_R_RPLY}} | *** {{c|DCI923_R_RPLY}} | ||
** And the 'system id' from the {{c|ns1:systemID}} value of the provided XML. | ** And the 'system id' from the {{c|ns1:systemID}} value of the provided XML. | ||
* It then uses those values to look up entries in the config for that type of call; the entry is a | * It then uses those values to look up entries in the config for that type of call; the entry is a tuple made up of: | ||
** A list of search specs, each entry a tuple of made up of: {{c|'searchKey', 'searchValue[;trimlength]'}} | |||
** output file | |||
** A list of replacements, each entry a tuple of {{c|'output xml element name', 'replacement'}}, where 'replacement' is typically {{c|@[input xml element name]}} - i.e. '@' (the value found at...) 'input xml element name' (the xml element with the provided name in the input). | |||
* It then just goes through through the replacements finding the output xml elements and replacing them with the values specified (reading them from the input XML document if (when) necessary) | |||
* Finally, it stringifies the XML document object it's been playing with, outputs it (interestingly, using chunked encoding) and goes about its business. | |||
=== Some observations === | |||
OK, this is actually quite flexible, and, although the code is terse and uncommented, it's not that hard to follow. Ultimately, it doesn't do that much (in the above, quite narrow, use case) - I could fairly easily strip out everything that isn't required by a DCI call and just have that as our starting block of code... I might do that, though I want to get PDD and NPS in there too, neither of which are handled in my initial examination above. | |||
Revision as of 16:41, 7 September 2021
| ACS Test Harness |
|---|
|
Meetings Existing System Specifications Diary |
Notes
Just a scratchpad to make notes as I'm looking at stuff. Temp stuff - probably be wiped regularly.
CISSIM
- Reads config provided
- 'FOLDER' is the folder in which the output files are stored
- Handling for DCI calls puts together a lookup key from:
- The 'dialog' - one of:
DCI908_R_RPLYDCI913_R_RPLYDCI923_R_RPLY
- And the 'system id' from the
ns1:systemIDvalue of the provided XML.
- The 'dialog' - one of:
- It then uses those values to look up entries in the config for that type of call; the entry is a tuple made up of:
- A list of search specs, each entry a tuple of made up of:
'searchKey', 'searchValue[;trimlength]' - output file
- A list of replacements, each entry a tuple of
'output xml element name', 'replacement', where 'replacement' is typically@[input xml element name]- i.e. '@' (the value found at...) 'input xml element name' (the xml element with the provided name in the input).
- A list of search specs, each entry a tuple of made up of:
- It then just goes through through the replacements finding the output xml elements and replacing them with the values specified (reading them from the input XML document if (when) necessary)
- Finally, it stringifies the XML document object it's been playing with, outputs it (interestingly, using chunked encoding) and goes about its business.
Some observations
OK, this is actually quite flexible, and, although the code is terse and uncommented, it's not that hard to follow. Ultimately, it doesn't do that much (in the above, quite narrow, use case) - I could fairly easily strip out everything that isn't required by a DCI call and just have that as our starting block of code... I might do that, though I want to get PDD and NPS in there too, neither of which are handled in my initial examination above.