Skip to content

Conversation

@ThaminduR
Copy link
Contributor

Issue

wso2/product-is#25509

This pull request introduces support for handling and exposing the flow type in the flow execution API. The main changes include adding the flowType property to the flow execution response model, ensuring it is included in API responses and error DTOs, and updating related utility methods and OpenAPI documentation.

Flow Execution Response Model Updates

  • Added the flowType property to the FlowExecutionResponse class, including its getter/setter, builder method, and validation annotations. Updated equals, hashCode, and toString methods to account for flowType. [1] [2] [3] [4]
  • Updated the flow execution service logic to set the flowType property in the response object.

Error Handling Enhancements

  • Introduced a new FlowExecutionErrorDTO class extending ErrorDTO, with a flowType property for error responses.
  • Updated utility methods in Utils.java to include flowType when constructing error DTOs and API error responses, and propagated flowType from exceptions. [1] [2] [3] [4] [5]

API Documentation

  • Modified the OpenAPI YAML (flow-execution.yaml) to require flowType in the flow execution response schema and documented its purpose.

Copilot AI review requested due to automatic review settings September 2, 2025 04:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds flow type support to the flow execution API by introducing the flowType property to both success and error responses, enabling better identification and categorization of different flow types.

Key changes:

  • Added flowType property to FlowExecutionResponse model with validation annotations
  • Created new FlowExecutionErrorDTO class extending ErrorDTO to include flow type in error responses
  • Updated utility methods to propagate flow type from exceptions to error responses

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
flow-execution.yaml Added flowType as required property in OpenAPI schema with description and example
Utils.java Updated error handling methods to accept and propagate flowType parameter
FlowExecutionErrorDTO.java New error DTO class extending ErrorDTO with flowType property
FlowExecutionServiceCore.java Set flowType in response object during flow execution
FlowExecutionResponse.java Added flowType property with validation, updated equals/hashCode/toString methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ThaminduR ThaminduR merged commit 5d36bad into wso2:master Sep 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants