Skip to content
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

chore(clients): Add useCreateTime to Java Client #3919

Merged
merged 30 commits into from
Dec 15, 2023

Conversation

psavidis
Copy link
Contributor

@psavidis psavidis commented Nov 7, 2023

Related-to: #3896

@psavidis psavidis added the ci:all-as Runs the builds for all application servers. label Nov 7, 2023
@psavidis psavidis requested a review from mboskamp November 7, 2023 22:39
@psavidis psavidis changed the title 3896 java client chore(clients): Add useCreateTime to Java Client Nov 7, 2023
@psavidis psavidis self-assigned this Nov 8, 2023
- MyBatis Adjustments
- ExternalTask is saved & Creation Date is persisted
- orderByCreationDate works with ASC & DESC Order
- HistoryExternalTaskLog uses creation date
- Add parameter useCreationDate to ExternalTaskService
- The parameter passes-through until FetchExternalTasksCmd where it is not currently utilized
Adjust test usage of externalTaskService#fetchAndLock to use `useCreationDate` with false value
- Configuring creationDate fro ExternalTaskService#fetchAndLock is performed using `CreationDateConfig` enum
- ExternalTaskRestService uses `CreationDateConfig` DTO to pass direction and enablement /disablement of `useCreationDate` param
- Unit Tests for creationDate DESC, ASC order using ExternalTaskService

- Pending are the multi-level sorting tests for both priority and creationDate
- Remove Tests and rewrite them:

testFetchWithCreationDateASC
testFetchWithCreationDateDESC

Replaced by:

shouldFetchWithCreationDateDESCWithoutPriority
shouldFetchWithCreationDateASCWithoutPriority

- Externalise CreationDate to `LockedExternalTaskImpl`
@psavidis psavidis force-pushed the 3896-fetch-and-lock branch from 5d7a359 to 05e9de6 Compare November 9, 2023 16:11
- Apply Code Review points
- Use Sortings for fetch And Lock API
Refactor FetchAndLockBuilder not to extend ExternalTaskQueryTopicBuilder but rather return it
- Fix constructors to initialize internally dependencies that do not belong outside their scope
- ExternalTaskQueryTopicBuilderImpl copy constructor copies currentInstruction
@psavidis psavidis force-pushed the 3896-java-client branch 3 times, most recently from 3e8106f to 63c129b Compare November 30, 2023 14:47
@psavidis psavidis force-pushed the 3896-fetch-and-lock branch from db5d9e3 to 3818ff3 Compare November 30, 2023 15:23
- Remove execute method from FetchAndLockBuilder
- Refactor FetchAndLockBuilderImpl to use a List instead of a Map and make it similar to the QueryAPI for the sake of consistency
- Add tests for covering invalid usages of fetchAndLock API
- Infer useCreateTime
- Correct JavaDoc
- Generify Sorting of FetchAndLock Impl
- Remove var
@psavidis psavidis force-pushed the 3896-fetch-and-lock branch from 3818ff3 to cea05c6 Compare December 1, 2023 14:23
- Generify Fetch and Lock Sorting
- Apply Suggestions
- Make ExternalTaskClientBuilder API similar to the engine's using Fluent API, asc & desc methods
- useCreateTime as a method with sensible default for the user
- Remove execute method from FetchAndLockBuilder
- Refactor FetchAndLockBuilderImpl to use a List instead of a Map and make it similar to the QueryAPI for the sake of consistency
- Add tests for covering invalid usages of fetchAndLock API
- Infer useCreateTime
- Correct JavaDoc
- Generify Sorting of FetchAndLock Impl
- Remove var
@psavidis psavidis force-pushed the 3896-fetch-and-lock branch from cea05c6 to c50657a Compare December 1, 2023 14:57
- Add tests for invalid usages of ExternalTaskClient
- Remove override annotations
- Refactor OrderConfig to Use a List instead of a Map
# Conflicts:
#	engine/src/main/java/org/camunda/bpm/engine/externaltask/FetchAndLockBuilder.java
- Validate against misusing orderByCreateTime and useCreateTime configurations together
- Validate against wrong orderByCreateTime values
Copy link
Member

@mboskamp mboskamp left a comment

Choose a reason for hiding this comment

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

👍 Only found minor things. Well done!

baseUrl had to configured so that the method tests the right message & exception
Base automatically changed from 3896-fetch-and-lock to 3896-feature December 13, 2023 16:36
psavidis and others added 4 commits December 13, 2023 18:50
- Avoid Null Check
- Improve JavaDoc
- Move orderingConfig validation up
- Group ExternalTaskClientException creation in ExternalTaskClientLogger
- Simplify validateOrderingProperties
@psavidis psavidis merged commit 8c1000e into 3896-feature Dec 15, 2023
1 of 2 checks passed
@psavidis psavidis deleted the 3896-java-client branch December 15, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:all-as Runs the builds for all application servers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants