Skip to content

Conversation

@os-cib
Copy link
Contributor

@os-cib os-cib commented Nov 24, 2025

No description provided.

@os-cib os-cib requested a review from patrickCIB November 24, 2025 09:55
@patrickCIB patrickCIB requested a review from Copilot November 24, 2025 17:52
Copilot finished reviewing on behalf of patrickCIB November 24, 2025 17:53
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 refactors the BpmProvider architecture to prepare for alternative implementations by converting SevenProvider from a concrete class with method implementations to a delegating wrapper that exposes sub-providers. The BpmProvider interface is updated with default methods that delegate to specialized provider interfaces (ITaskProvider, IProcessProvider, etc.).

Key changes:

  • SevenProvider methods replaced with getter methods that return specialized providers
  • BpmProvider interface converted to use default methods with delegation pattern
  • Service layer afterPropertiesSet() validation logic removed
  • Helper methods changed from protected to public static for reusability
  • SevenUserProvider simplified to use BpmProvider interface directly

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 35 comments.

Show a summary per file
File Description
SevenProvider.java Removed 1000+ lines of method implementations, replaced with provider getters
BpmProvider.java Converted to interface with default delegation methods calling getters
ProcessProvider.java Extracted groupProcessStatisticsByKeyAndTenant to public static helper
SevenProviderBase.java Changed filterResources visibility to public static
VariableProvider.java Changed mergeVariablesValues visibility to public static
SevenUserProvider.java Simplified to use BpmProvider interface instead of casting
Multiple Service classes Removed SevenProvider validation in afterPropertiesSet()

Critical Issue Found:

  • TaskService.java still references and uses the uninitialized sevenProvider field (lines 87, 259), which will cause NullPointerException at runtime
  • Multiple service classes declare unused sevenProvider fields that should be removed for code cleanliness

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


/**
* Fetch process diagram, a xml that contains the specification to render the diagram.
* @param processDefinitionId filter by process definition id.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

@param tag "processDefinitionId" does not match any actual parameter of method "fetchDiagram()".

Copilot uses AI. Check for mistakes.
* @param group the group to be updated.
* @param user the user performing the update.
* Download bpmn from a process definition id.
* @param processDefinitionId filter by process definition id.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

@param tag "processDefinitionId" does not match any actual parameter of method "downloadBpmn()".

Copilot uses AI. Check for mistakes.
* @param authorizationId the ID of the authorization to be deleted.
* @param user the user performing the deletion.
* Search statistics from a process.
* @param id filter by process id.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

@param tag "id" does not match any actual parameter of method "findProcessStatistics()".

Copilot uses AI. Check for mistakes.
*
* @param groupId the ID of the group.
* @param userId the ID of the user to be added.
* @param flowUser the user performing the operation.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

@param tag "flowUser" does not match any actual parameter of method "addMemberToGroup()".

Copilot uses AI. Check for mistakes.
*
* @param groupId the ID of the group.
* @param userId the ID of the user to be removed.
* @param flowUser the user performing the operation.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

@param tag "flowUser" does not match any actual parameter of method "deleteMemberFromGroup()".

Copilot uses AI. Check for mistakes.
@os-cib os-cib force-pushed the cibseven-CIB7-792-prepare-BpmProvider-alternative branch from be8ca27 to 03f5e21 Compare November 24, 2025 19:07
@os-cib os-cib force-pushed the cibseven-CIB7-792-prepare-BpmProvider-alternative branch from 03f5e21 to e1ee094 Compare November 25, 2025 10:27
@patrickCIB patrickCIB requested a review from Copilot November 27, 2025 08:58
Copilot finished reviewing on behalf of patrickCIB November 27, 2025 08:59
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

Copilot reviewed 20 out of 21 changed files in this pull request and generated 23 comments.

Comments suppressed due to low confidence (12)

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:40

    @Autowired private ISystemProvider systemProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:39

    @Autowired private IBatchProvider batchProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:38

    @Autowired private IJobProvider jobProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:37

    @Autowired private IDecisionProvider decisionProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:36

    @Autowired private IUserProvider userProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:35

    @Autowired private IJobDefinitionProvider jobDefinitionProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:34

    @Autowired private IIncidentProvider incidentProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:33

    @Autowired private IUtilsProvider utilsProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:32

    @Autowired private IFilterProvider filterProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:31

    @Autowired private IActivityProvider activityProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:30

    @Autowired private IProcessProvider processProvider;

cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:29

    @Autowired private ITaskProvider taskProvider;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -812,85 +719,820 @@ Collection<User> findUsers(Optional<String> id, Optional<String> firstName, Opti
* @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder, // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult, // Pagination of results. Specifies the index of the first result to return.
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
*
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

@param tag "maxResults," does not match any actual parameter of method "findGroups()".

Suggested change
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
* @param maxResults // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Copilot uses AI. Check for mistakes.
Comment on lines +767 to +776
* @param id, // Filter by the id.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId, // Filter by resource id. * @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder, // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult, // Pagination of results. Specifies the index of the first result to return.
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

@param tag "type," does not match any actual parameter of method "findAuthorization()".

Suggested change
* @param id, // Filter by the id.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId, // Filter by resource id. * @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder, // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult, // Pagination of results. Specifies the index of the first result to return.
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
* @param id // Filter by the id.
* @param type // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn // Filter by a comma-separated list of userIds.
* @param groupIdIn // Filter by a comma-separated list of groupIds.
* @param resourceType // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId // Filter by resource id.
* @param sortBy // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult // Pagination of results. Specifies the index of the first result to return.
* @param maxResults // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Copilot uses AI. Check for mistakes.
Comment on lines +767 to +776
* @param id, // Filter by the id.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId, // Filter by resource id. * @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder, // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult, // Pagination of results. Specifies the index of the first result to return.
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

@param tag "userIdIn," does not match any actual parameter of method "findAuthorization()".

Suggested change
* @param id, // Filter by the id.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId, // Filter by resource id. * @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortBy, // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder, // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult, // Pagination of results. Specifies the index of the first result to return.
* @param maxResults, // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
* @param id // Filter by the id.
* @param type // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn // Filter by a comma-separated list of userIds.
* @param groupIdIn // Filter by a comma-separated list of groupIds.
* @param resourceType // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceId // Filter by resource id.
* @param sortBy // Sort the results lexicographically by a given criterion. Valid values are id, name and type. Must be used in conjunction with the sortOrder parameter.
* @param sortOrder // Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
* @param firstResult // Pagination of results. Specifies the index of the first result to return.
* @param maxResults // Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Copilot uses AI. Check for mistakes.
* @param id, // Filter by the id.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

@param tag "groupIdIn," does not match any actual parameter of method "findAuthorization()".

Suggested change
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param groupIdIn // Filter by a comma-separated list of groupIds.

Copilot uses AI. Check for mistakes.
* @param type, // Filter by authorization type. (0=global, 1=grant, 2=revoke). See the User Guide for more information about authorization types.
* @param userIdIn, // Filter by a comma-separated list of userIds.
* @param groupIdIn, // Filter by a comma-separated list of groupIds.
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

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

@param tag "resourceType," does not match any actual parameter of method "findAuthorization()".

Suggested change
* @param resourceType, // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.
* @param resourceType // Filter by an integer representation of the resource type. See the User Guide for a list of integer representations of resource types.

Copilot uses AI. Check for mistakes.
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