Skip to content

Generator: CICS facades type the COMMAREA per program, but a pseudo-conversation carries it across programs #4427

Closed

Description

@squid-protocol

Problem

The generated CICS facades (#4349) type the COMMAREA as the program's own contract DTO, both ways: handleTransaction(String transid, XWsCa request) takes only XWsCa, and returns task.returned(XWsCa.class), which throws when the task RETURNs another class. In a pseudo-conversation the COMMAREA crosses programs: RETURN TRANSID(t) COMMAREA(ws) starts the next task in whichever program owns t, and that program declares its own record over the same bytes. Its DTO is a different class.

So a deployed facade cannot carry a conversation that the runTask proof carries. The #4343 facade proofs (crucible side java-facade, which enters each task through its facade with the scenario's region joined) found these:

  • pc-wizard: PCWIZ RETURN TRANSID('PC03') COMMAREA(WS-STATE) starts PCCONF with a PcwizWsState. PCCONF's handleTransaction(String, PcconfWsState) cannot take it. 5 scenarios fail (back-and-fix, back-clear-keeps-amount, clear-and-bad-amount, happy-post, mapfail-clear-cancel).
  • pc-aid-menu: PCMENU's option 2 does RETURN TRANSID('PC12') with the record PCDETL reads (PcdetlWsCa). PCMENU's handleTransaction then throws in task.returned(PcmenuWsCa.class). 1 scenario fails (option2-next-transid).

The runTask path (java-ported) passes all of these, because the harness passes the COMMAREA object along untyped.

Expected

COBOL passes bytes. A facade at a transaction boundary must accept the COMMAREA any program RETURNing to that transid passes, and answer with what its RETURN passes on. That means either converting by layout (the bytes, as CicsTask.link(..., byte[] area) already does for LINK, #4181), or typing the facade by the transaction's incoming and outgoing records, both of which the navigation facts know.

Acceptance criteria

  • The generated handleTransaction takes and returns the COMMAREA the estate's RETURN TRANSID flows carry, with a regression test in the generator suite (pc-wizard / pc-aid-menu shapes).
  • The crucible ports are regenerated (tests/tools/port_surface.py crucible), and the 6 java-facade cells pass. They are ledgered in tests/cics_crucible/baseline.json until then.

Found by #4343.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugera:4scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions