Skip to content

Conversation

@sadilchamishka
Copy link
Contributor

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

Copilot AI review requested due to automatic review settings October 3, 2025 05:35
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 implements multiple workflow support in the workflow engine by updating database queries, DAO interfaces, and service implementations to handle scenarios where multiple workflows can be associated with the same request.

  • Updated SQL queries to include workflow ID parameters for more precise data filtering
  • Modified DAO methods to support workflow-specific operations alongside existing request-based operations
  • Enhanced DTOs to include workflow information and replaced direct database access with service calls

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pom.xml Updated carbon identity framework version to 7.8.521-SNAPSHOT
WorkflowEngineConstants.java Added new SQL queries with workflow ID parameters and updated existing queries
ApprovalTaskDAOImpl.java Enhanced methods to support workflow-specific operations and updated query usage
WorkflowRequestDAO.java Removed entire interface (file deleted)
WorkflowRequestDAOImpl.java Removed entire implementation (file deleted)
ApprovalTaskDAO.java Added new method signatures with workflow ID parameters
ApprovalTaskSummaryDTO.java Added workflowId field with getter/setter methods
ApprovalTaskDTO.java Added workflowName field with getter/setter methods
ApprovalTaskServiceImpl.java Major refactoring to use workflow management service instead of direct DAO calls

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

try {
String createdTime = WorkflowEngineServiceDataHolder.getInstance().getWorkflowManagementService()
.getWorkflowRequestBean(requestId).getCreatedAt();
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The date format pattern is hardcoded. Consider extracting this as a constant to improve maintainability and ensure consistency across the codebase.

Copilot uses AI. Check for mistakes.
Comment on lines 822 to 824
// Convert to epoch millis (assuming system default timezone, or use ZoneId.of("UTC"))
long epochMillis = localDateTime
.atZone(ZoneId.systemDefault())
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

Using ZoneId.systemDefault() can lead to inconsistent behavior across different environments. Consider using a specific timezone like UTC for consistent timestamp handling.

Suggested change
// Convert to epoch millis (assuming system default timezone, or use ZoneId.of("UTC"))
long epochMillis = localDateTime
.atZone(ZoneId.systemDefault())
// Convert to epoch millis using UTC timezone for consistency
long epochMillis = localDateTime
.atZone(ZoneId.of("UTC"))

Copilot uses AI. Check for mistakes.
Copy link

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 5
#### Log Improvement Suggestion No: 6
#### Log Improvement Suggestion No: 7
#### Log Improvement Suggestion No: 9
#### Log Improvement Suggestion No: 10
#### Log Improvement Suggestion No: 11
#### Log Improvement Suggestion No: 12
#### Log Improvement Suggestion No: 13
#### Log Improvement Suggestion No: 14
#### Log Improvement Suggestion No: 15
#### Log Improvement Suggestion No: 17

@sadilchamishka sadilchamishka reopened this Oct 3, 2025
@sadilchamishka sadilchamishka force-pushed the multiple-workflow-support branch from 5a78f40 to 4524bc0 Compare October 3, 2025 07:30
Copy link

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 7
#### Log Improvement Suggestion No: 8
#### Log Improvement Suggestion No: 9
#### Log Improvement Suggestion No: 11
#### Log Improvement Suggestion No: 12
#### Log Improvement Suggestion No: 13
#### Log Improvement Suggestion No: 14
#### Log Improvement Suggestion No: 15
#### Log Improvement Suggestion No: 16
#### Log Improvement Suggestion No: 17
#### Log Improvement Suggestion No: 18
#### Log Improvement Suggestion No: 19
#### Log Improvement Suggestion No: 20
#### Log Improvement Suggestion No: 21
#### Log Improvement Suggestion No: 22
#### Log Improvement Suggestion No: 23
#### Log Improvement Suggestion No: 24
#### Log Improvement Suggestion No: 25

@sadilchamishka sadilchamishka changed the title Multiple workflow support Multiple workflow support for the same operations Oct 3, 2025
@sadilchamishka sadilchamishka force-pushed the multiple-workflow-support branch from 3550e04 to d98cae7 Compare October 3, 2025 09:09
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.

1 participant