-
Notifications
You must be signed in to change notification settings - Fork 3
chore(): prepare for alternative BpmProvider implementation #673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
sevenProviderfield (lines 87, 259), which will cause NullPointerException at runtime - Multiple service classes declare unused
sevenProviderfields that should be removed for code cleanliness
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cibseven-webclient-core/src/main/java/org/cibseven/webapp/rest/VariableInstanceService.java
Outdated
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/rest/TenantService.java
Outdated
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/rest/TaskService.java
Outdated
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/BpmProvider.java
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/BpmProvider.java
Outdated
Show resolved
Hide resolved
|
|
||
| /** | ||
| * Fetch process diagram, a xml that contains the specification to render the diagram. | ||
| * @param processDefinitionId filter by process definition id. |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
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()".
| * @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. |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
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()".
| * @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. |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
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()".
| * | ||
| * @param groupId the ID of the group. | ||
| * @param userId the ID of the user to be added. | ||
| * @param flowUser the user performing the operation. |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
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()".
| * | ||
| * @param groupId the ID of the group. | ||
| * @param userId the ID of the user to be removed. | ||
| * @param flowUser the user performing the operation. |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
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()".
be8ca27 to
03f5e21
Compare
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/BpmProvider.java
Outdated
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java
Show resolved
Hide resolved
cibseven-webclient-core/src/main/java/org/cibseven/webapp/rest/JobService.java
Outdated
Show resolved
Hide resolved
03f5e21 to
e1ee094
Compare
There was a problem hiding this 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
- This method overrides BpmProvider.getSystemProvider; it is advisable to add an Override annotation.
@Autowired private ISystemProvider systemProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:39
- This method overrides BpmProvider.getBatchProvider; it is advisable to add an Override annotation.
@Autowired private IBatchProvider batchProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:38
- This method overrides BpmProvider.getJobProvider; it is advisable to add an Override annotation.
@Autowired private IJobProvider jobProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:37
- This method overrides BpmProvider.getDecisionProvider; it is advisable to add an Override annotation.
@Autowired private IDecisionProvider decisionProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:36
- This method overrides BpmProvider.getUserProvider; it is advisable to add an Override annotation.
@Autowired private IUserProvider userProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:35
- This method overrides BpmProvider.getJobDefinitionProvider; it is advisable to add an Override annotation.
@Autowired private IJobDefinitionProvider jobDefinitionProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:34
- This method overrides BpmProvider.getIncidentProvider; it is advisable to add an Override annotation.
@Autowired private IIncidentProvider incidentProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:33
- This method overrides BpmProvider.getUtilsProvider; it is advisable to add an Override annotation.
@Autowired private IUtilsProvider utilsProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:32
- This method overrides BpmProvider.getFilterProvider; it is advisable to add an Override annotation.
@Autowired private IFilterProvider filterProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:31
- This method overrides BpmProvider.getActivityProvider; it is advisable to add an Override annotation.
@Autowired private IActivityProvider activityProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:30
- This method overrides BpmProvider.getProcessProvider; it is advisable to add an Override annotation.
@Autowired private IProcessProvider processProvider;
cibseven-webclient-core/src/main/java/org/cibseven/webapp/providers/SevenProvider.java:29
- This method overrides BpmProvider.getTaskProvider; it is advisable to add an Override annotation.
@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. | |||
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
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()".
| * @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. |
| * @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. |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
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()".
| * @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. |
| * @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. |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
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()".
| * @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. |
| * @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. |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
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()".
| * @param groupIdIn, // Filter by a comma-separated list of groupIds. | |
| * @param groupIdIn // Filter by a comma-separated list of groupIds. |
| * @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. |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
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()".
| * @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. |
No description provided.