Repository navigation
feat(cobol-to-java): BMS screens -> view models, handlers and web views (#3619) - #3703
Merged
Merged
Conversation
…ws (#3619) Every BMS map a converted program SENDs or RECEIVEs becomes a `<Map>Screen` view model in dto.screen: - a property per named field, citing its BMS line, POS, LENGTH, ATTRB and symbolic-map names; - LAYOUT: every field in screen order, labels included (ScreenField); - ScreenModel's screenCells(): the positioned cells, OCCURS expanded; - fromValues / screenValues for form binding. Services: - render<Map> per SEND and submit<Map>(input, aid) per RECEIVE (`aid` = EIBAID); - each cites its COBOL lines, with a business-logic TODO; - a map no single BMS source defines gets a TODO naming the candidates and, when its mapset is known, the maps the mapset defines. This found a real CBSA bug: BNK1CCS sends MAP('BNK1CCM'), the mapset's name. New config ui.flavour (none | thymeleaf | openapi-only; default none): - openapi-only: a REST controller per program, @Valid bodies (@SiZe from LENGTH, @pattern from ATTRB=NUM), springdoc 2.5.0; - thymeleaf: a web controller per program and one generic templates/screen.html drawing any screen on its 24x80 grid, with ENTER / PF3 / CLEAR; - the starters are added to Maven and Gradle builds. Everything is recorded in traceability.json; TODOs flow into the worklist; the guardrail inventories the new classes. Matrix configs ui-thymeleaf and ui-openapi-plain; preflight compiles CardDemo ui-thymeleaf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3619. Part of #3625.
What
CICS programs talk to users through 3270 screens defined in BMS maps. The verified skeleton already joins every
SEND/RECEIVE MAPto its map's fields (screen_bindings, ledger field BMS screen fields). This PR turns those facts into the application's screen layer.Always (when a program uses screens):
dto.screen.<Map>Screen, one view model per map:POS,LENGTH,ATTRBand symbolic-map names;LAYOUT: every field in screen order, labels included;fromValues/screenValuesfor form binding.It follows the config's Lombok or plain style, and stays a class even under
dto_style: record, because a form bean must be mutable.ScreenField/ScreenCell/ScreenModel:ScreenModel.screenCells()turns any screen into positioned cells (labels, outputs, input boxes, OCCURS expanded). The layout logic is compiled Java, not template code.Service handlers:
render<Map>(screen)per SEND, andsubmit<Map>(input, aid)per RECEIVE, whereaidis the key pressed (EIBAID). Each cites its COBOL lines, and the business logic is a TODO.ui.flavour(new config key, defaultnone):noneopenapi-only@RestControllerper program:GET /api/v1/<program>/screens/<map>renders,POSTsubmits with@Valid(@Sizefrom LENGTH,@PatternfromATTRB=NUM); springdoc 2.5.0 serves/v3/api-docsand Swagger UIthymeleaf@Controllerper program, plus one generictemplates/screen.htmlthat draws any screen on its 24×80 grid from its cells, with ENTER / PF3 / CLEAR buttonsThe needed starters are added to the Maven and Gradle builds. A flavour requires
features.servicesandfeatures.rest_controllers.Found along the way: a bug in the CBSA sample
BNK1CCS.cbl:236, on CLEAR, sendsMAP('BNK1CCM'), which is the mapset's name; its only map isBNK1CC, used by every other SEND and RECEIVE in the program. The generated service says so:… no single BMS source defines it (candidates: none in the repository); mapset BNK1CCM defines BNK1CC.Evidence
ui-thymeleafandui-openapi-plain). Preflight now also compiles CardDemoui-thymeleaf.USERIDis an 8-character input, and a PF3 submit round-trips through the service;USERIDgets 400 from@Valid;/v3/api-docslists the screen's GET and POST, withmaxLength: 8from the BMS LENGTH.dto/screenpackage and the services of screen programs (21 / 9 / 5). zECS, zopeneditor and DSF are unchanged, and the refraction snapshots are unchanged.test_bms_screens.pyruns a real scan with a label, IC, NUM, DRK and OCCURS fields, a continued BMS macro, an unresolvable map and a mapset-named map, across all three flavours, plus the config validation, manifest and worklist.Paper trail
traceability.json:screen-view-model,screen-field(BMS line and position),screen-send,screen-receiveandscreen-endpointentries.layout-changed.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g