java.lang.Object
com.scivicslab.turingworkflow.plugins.report.sections.basic.CheckResultsSection
All Implemented Interfaces:
SectionBuilder

public class CheckResultsSection extends Object implements SectionBuilder
POJO section builder that collects and outputs messages with % prefix.

Pure business logic - no CallableByActionName. Use CheckResultsSectionActor to expose as an actor.

The % prefix is used in workflows to mark lines that should be collected and displayed in the final report.

Since:
2.16.0
Author:
devteam@scivicslab.com
  • Constructor Details

    • CheckResultsSection

      public CheckResultsSection()
  • Method Details

    • setConnection

      public void setConnection(Connection connection)
      Sets the database connection for log queries.
      Parameters:
      connection - the JDBC connection to the H2 log database
    • setSessionId

      public void setSessionId(long sessionId)
      Sets the session ID to query logs from.
      Parameters:
      sessionId - the session ID
    • generate

      public String generate()
      Generates the section content.

      Queries the log database for messages prefixed with %. Lines matching the pattern (optionally preceded by a [node-xxx] prefix) are extracted, deduplicated, sorted, and output under a [Check Results] header.

      Specified by:
      generate in interface SectionBuilder
      Returns:
      the formatted check results content, or empty string if none found
    • getTitle

      public String getTitle()
      Returns the section title.

      If null or empty, the section content is output without a title line.

      Always returns null because the title is embedded within the generated content.

      Specified by:
      getTitle in interface SectionBuilder
      Returns:
      the section title, or null for no title