Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-089

JAR failures are reported on the diagram and in the status line

When the JAR pipeline cannot draw a PlantUML diagram, the extension SHALL show on that diagram the message of the cause with the state error or unavailable, and report a warning with the code plantuml-render and the document path in addition to the message on the diagram.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-DIAG-007, in the state “The JAR pipeline is selected”.

Scenarios 8

The situations the tests check; open one to read it.

nominalAn existing JAR file is run
GivenjarPath naming a regular file
Whenthe preview is rendered
Thenthe JAR is run
when every diagram is rendered no PlantUML warning is reported
refusalThe jarPath does not exist
GivenjarPath naming missing.jar and two PlantUML diagrams
Whenthe preview is rendered
Thenboth diagrams show The PlantUML JAR could not be found followed by the resolved path, with state error, and no process starts
refusalThe jarPath is a directory
GivenjarPath naming a directory
Whenthe preview is rendered
Thenevery diagram shows The PlantUML JAR path is not a file followed by the path, with state error, and no process starts
refusalRestricted Mode disables the JAR pipeline
Givenan untrusted workspace, useJar true and two PlantUML diagrams
Whenthe preview is rendered
Thenboth diagrams show PlantUML preview is disabled in an untrusted workspace. with state unavailable and no process starts
refusalThe command to run is missing
InputOutcome
useJar true, an empty jarPath and no plantuml command on the PATHthe diagram shows PlantUML executable "plantuml" was not found on PATH. Set markdownOkfSchemaStudio.plantuml.jarPath to a valid JAR path. with state unavailable, shows no picture and keeps its source disclosure
the renderer called with an absolute executable path that does not existthe message omits on PATH
useJar true, jarPath set to a valid JAR and no java on the PATHthe diagram shows PlantUML executable "java" was not found on PATH. Set markdownOkfSchemaStudio.plantuml.jarPath to a valid JAR path. with state unavailable
java found but not executable (any spawn error other than a missing command)the diagram shows the system error text with state error
the spawn call throws an error with a messagethe diagram shows that message with state error and a warning
the spawn call throws a not-found errorthe diagram shows the missing-executable message with state unavailable
refusalThe process fails or returns no picture
InputOutcome
a process that exits with code 1 and error output Syntax Errorthe diagram shows PlantUML exited with code 1: Syntax Error with state error
a process that exits with code 2 and no error outputthe diagram shows PlantUML exited with code 2: PlantUML returned no diagnostic.
a process that ends on a signal Sthe diagram shows PlantUML exited with signal S followed by a colon and the error output or PlantUML returned no diagnostic., with state error
a process that exits 0 and prints plain textthe diagram shows PlantUML did not return SVG output. with state error
output with an svg start tag and no end tagthe same message appears
boundaryEach failure is also a status-line warning
InputOutcome
a missing JAR, a disabled workspace, a missing command and a failing process, one per diagramthe status line gets one warning with code plantuml-render and the document path per failing diagram
all diagrams renderedno PlantUML warning is reported
a document without PlantUML diagrams, with any jarPath or in an untrusted workspacenothing is reported: no message and no warning
refusalThe host cannot run programs
Givena host without the processes capability and the JAR pipeline chosen
Whenthe preview is rendered
Thenevery diagram shows PlantUML needs a host that can run programs; the built-in engine draws diagrams without one. with state unavailable and no process starts
the session selects the built-in engine instead when the host has no processes capability

Implemented in 2

Tested by 5

Known limits (4)

Replaces

SwRS-MDOKFSTUDIO-DIAG-090A jarPath that is a directory is reported superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-091Restricted Mode disables JAR rendering superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-092A missing plantuml command is reported superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-093A missing Java is reported like a missing command superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-094A failing PlantUML process shows its exit and error output superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-095Output without an SVG is reported superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-096A process that cannot be spawned is reported superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file
SwRS-MDOKFSTUDIO-DIAG-107Each JAR failure is also a status-line warning superseded superseded by SwRS-MDOKFSTUDIO-DIAG-089 Markdown file