Skip to content

Serialise composite result rows with the serializer and the read group #30

Todo

Description

@schmunk42

Split out of #18 ("CompositeRowsTrait::row() serialises by reflection and bypasses #[Groups]").

Problem

The composite tools (flowable_get_process_status, flowable_history_get) build their rows in CompositeRowsTrait::row() by reflection over the public properties of the resource objects. That bypasses the serializer and its #[Groups], so a property that is not in the read group of a resource still appears in a composite row.

Proposal

Normalise the rows with the serializer and the read group of the row's resource, so that a composite row and the resource's own item have the same fields.

Related finding from the work on #18

The outputSchema of flowable_dmn_evaluate declares the items of result as objects, while each row is the engine's list of result variables {name, type, value}, i.e. an array. A client that validates structuredContent strictly against the outputSchema rejects every non-empty result. tests/Http/McpToolResultShapeTest.php pins the current state with a FINDING comment. Fix the declared type (or the normalisation) together with this issue.

structuredContent and outputSchema are both built for jsonld; the README section "Results and errors" describes where their keys differ.

Activity

  1. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions