-
Notifications
You must be signed in to change notification settings - Fork 7
Release/7.0.2 #470
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
Merged
Merged
Release/7.0.2 #470
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
ee13126
[NAE-2464] Post release fixes
renczesstefan 99f6b65
Refactor `Task` and `ProcessResourceId` to use `processIdentifier` in…
renczesstefan f8a2451
Update parent POM to version `7.0.0-RC10.6` and configure migration h…
renczesstefan bf6fb70
Refactor `ProcessResourceId` constructors and usages to consistently …
renczesstefan a6d659f
Introduce `ProcessResourceIdMigration` for consistent migration of `P…
renczesstefan e2b9475
Mark `shortProcessId` as deprecated in `ProcessResourceId`.
renczesstefan a644313
Simplify `ProcessResourceIdMigration` by removing `shortProcessId` fr…
renczesstefan c0091b0
Add `@Setter` to `ProcessResourceId` and update migration logic to us…
renczesstefan 1c96cb8
Update `ProcessResourceIdMigration` to handle `ProcessRole` IDs and m…
renczesstefan 780c506
Release 7.0.0-rc10.5
machacjozef 8963d05
Refactor `ProcessResourceIdMigration` to simplify role ID migrations …
renczesstefan f14d0fa
Refactor `ProcessResourceIdMigration` to simplify role ID migrations …
renczesstefan 131ce3a
Refactor `ProcessResourceIdMigration` by extracting reusable methods …
renczesstefan 5b2c4e2
Refactor `ProcessResourceIdMigration` by extracting methods for case …
renczesstefan 6971dda
Refactor `ProcessResourceIdMigration` by extracting methods for case …
renczesstefan f11c250
Remove `ProcessResourceIdMigration` and related dependencies.
renczesstefan 131e77e
Update `ProcessRoleRepository` with `findByNetworkIdentifierAndObject…
renczesstefan 149671c
Introduce asynchronous execution support in `ActionDelegate` with sta…
renczesstefan cf8ec2d
Introduce asynchronous execution support in `ActionDelegate` with sta…
renczesstefan b3a0def
[NAE-2417] Fix dependency vulnerabilities
machacjozef 16c3d08
Remove `MigrationMongoTemplateConfiguration` and associated fallback …
renczesstefan 0ad54dd
Merge branch 'release/0.10.5' into NAE-2464
renczesstefan aa359a8
Refactor imports and update test dependencies in `ActionDelegateTest`…
renczesstefan 436032a
Refactor repository methods to use `findByNetworkIdentifierAndObjectI…
renczesstefan 6256f71
Refactor `ElasticCaseService` to improve full-text search logic and v…
renczesstefan 56148a2
Update key field in `CaseEventHandler` and simplify regex in `Elastic…
renczesstefan fac8492
Refactor `ElasticCaseService` full-text search logic: replace `QueryS…
renczesstefan a4beb5d
Refactor `GroovyShellFactory` to improve import handling logic: repla…
renczesstefan 96c7c17
Merge pull request #467 from netgrif/NAE-2464_2
machacjozef 8353e17
Refactor `GroovyShellFactory` to improve import handling logic: repla…
renczesstefan 359567f
Merge remote-tracking branch 'origin/NAE-2464' into NAE-2464
renczesstefan 56fbc83
Release 7.0.2
machacjozef 1a816b2
Reuse the default task executor for asynchronous action execution
renczesstefan 503ab24
Refactor `ElasticCaseService`: replace `replace` with `replaceAll` fo…
renczesstefan c9928f1
Add unit and integration tests for `ElasticCaseService` to validate f…
renczesstefan 90f9147
Refactor `ElasticCaseService`: replace `replaceAll` with `replace` fo…
renczesstefan 8f0ae29
Deprecate and update case repository methods, add detailed documentat…
renczesstefan 702824c
Refactor `ElasticCaseService`: use `Matcher.quoteReplacement` for saf…
renczesstefan 619465d
Merge pull request #464 from netgrif/NAE-2464
machacjozef 25689ee
Refactor `GroovyShellFactory` and `CaseMigrationHelper`: enhance clas…
renczesstefan a5d69f7
Refactor `ElasticCaseService`: remove unnecessary `Matcher.quoteRepla…
renczesstefan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 61 additions & 6 deletions
67
application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,73 @@ | ||
| package com.netgrif.application.engine | ||
|
|
||
| import org.springframework.scheduling.annotation.Async | ||
| import com.netgrif.application.engine.petrinet.domain.dataset.logic.action.ActionDelegate | ||
| import org.springframework.beans.factory.annotation.Qualifier | ||
| import org.springframework.context.annotation.Bean | ||
| import org.springframework.core.task.TaskExecutor | ||
| import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor | ||
| import org.springframework.stereotype.Service | ||
|
|
||
| import java.util.concurrent.atomic.AtomicBoolean | ||
|
|
||
| @Service | ||
| class AsyncRunner { | ||
|
|
||
| @Async | ||
| private final TaskExecutor actionsExecutor | ||
|
|
||
| AsyncRunner(@Qualifier("taskExecutor") TaskExecutor actionsExecutor) { | ||
| this.actionsExecutor = actionsExecutor | ||
| } | ||
|
|
||
| void run(Closure closure) { | ||
| closure() | ||
| ActionDelegate actionDelegate = findActionDelegate(closure) | ||
| actionDelegate?.retainForAsyncExecution() | ||
| AtomicBoolean released = new AtomicBoolean() | ||
|
|
||
| Runnable task = { | ||
| try { | ||
| closure() | ||
| } finally { | ||
| release(actionDelegate, released) | ||
| } | ||
| } as Runnable | ||
|
|
||
| try { | ||
| execute(task) | ||
| } catch (Throwable throwable) { | ||
| release(actionDelegate, released) | ||
| throw throwable | ||
| } | ||
| } | ||
|
|
||
| @Async | ||
| void execute(final Runnable runnable) { | ||
| runnable.run() | ||
| actionsExecutor.execute(runnable) | ||
| } | ||
|
machacjozef marked this conversation as resolved.
|
||
|
|
||
| private static void release(ActionDelegate actionDelegate, AtomicBoolean released) { | ||
| if (actionDelegate != null && released.compareAndSet(false, true)) { | ||
| actionDelegate.releaseAfterAsyncExecution() | ||
| } | ||
| } | ||
|
|
||
| private static ActionDelegate findActionDelegate(Closure closure) { | ||
| Set<Object> visited = Collections.newSetFromMap(new IdentityHashMap<>()) | ||
| return findActionDelegate(closure, visited) | ||
| } | ||
|
|
||
| private static ActionDelegate findActionDelegate(Object candidate, Set<Object> visited) { | ||
| if (candidate == null || !visited.add(candidate)) { | ||
| return null | ||
| } | ||
| if (candidate instanceof ActionDelegate) { | ||
| return candidate | ||
| } | ||
| if (!(candidate instanceof Closure)) { | ||
| return null | ||
| } | ||
|
|
||
| Closure nestedClosure = (Closure) candidate | ||
| return findActionDelegate(nestedClosure.delegate, visited) | ||
| ?: findActionDelegate(nestedClosure.owner, visited) | ||
| ?: findActionDelegate(nestedClosure.thisObject, visited) | ||
| } | ||
|
machacjozef marked this conversation as resolved.
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ine/src/main/java/com/netgrif/application/engine/elastic/service/model/FullTextField.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.netgrif.application.engine.elastic.service.model; | ||
|
|
||
| public record FullTextField(String field, float boost) { | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.