Skip to content

Release/7.0.2 - #470

Merged
machacjozef merged 41 commits into
release/7.0.0from
release/7.0.2
Aug 4, 2026
Merged

Release/7.0.2#470
machacjozef merged 41 commits into
release/7.0.0from
release/7.0.2

Conversation

@machacjozef

@machacjozef machacjozef commented Aug 3, 2026

Copy link
Copy Markdown
Member

Release

Summary by CodeRabbit

  • New Features

    • Improved full-text case search with multi-term matching, boosts, case-insensitive queries, and safer wildcard handling.
    • Added expanded monitoring visibility, including startup, node, Elasticsearch, and tracing information.
    • Improved asynchronous workflow actions and lifecycle handling.
  • Bug Fixes

    • Improved migration and identifier handling for cases, tasks, roles, and processes.
    • Ensured newly created tasks retain their process association.
  • Security

    • Restricted unauthenticated management access to health checks and disabled shutdown access.

renczesstefan and others added 30 commits July 10, 2026 10:15
Update Jackson dependencies to version 3.1.5 in `pom.xml`
…elpers to use a dedicated MongoTemplate bean (`migrationMongoTemplate`) with fallback logic in multi-database setups.
…rocessResourceId` and update related classes.
…om queries and setting it to null during migration.
…igrate role-related fields in `Case` documents
…and centralize ID translation logic with `getNewIdFromOldId`.
…and centralize ID translation logic with `getNewIdFromOldId`.
…for task and Petri net migration logic, adding `@ConditionalOnProperty` for configurability, and improving clarity in variable naming.
…Id` and deprecate `findByNetworkIdAndObjectId`.
…te management and enhanced executor configuration.

- Added methods to `ActionDelegate` to manage asynchronous execution lifecycle (`retainForAsyncExecution`, `releaseAfterAsyncExecution`, `clearAfterExecution`).
- Enhanced `AsyncRunner` with delegate state tracking and custom `actionsExecutor`.
- Added `async_run.xml` test Petri net and corresponding test cases to validate asynchronous action handling.
…te management and enhanced executor configuration.

- Added methods to `ActionDelegate` to manage asynchronous execution lifecycle (`retainForAsyncExecution`, `releaseAfterAsyncExecution`, `clearAfterExecution`).
- Enhanced `AsyncRunner` with delegate state tracking and custom `actionsExecutor`.
- Added `async_run.xml` test Petri net and corresponding test cases to validate asynchronous action handling.
- Update `server-patterns` to replace `/manage/**` with `/manage/health`
- Configure `management.endpoint.shutdown.enabled` as `false` across properties
- Expand `management.endpoints.web.exposure.include` for additional actuator endpoints
…logic; consolidate MongoTemplate usage to default bean.
# Conflicts:
#	application-engine/src/test/groovy/com/netgrif/application/engine/TestHelper.groovy
#	application-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovy
… and `TestHelper` for consistency and clarity.
…d` and deprecate `findByNetworkIdAndObjectId`; update tests and enums accordingly.
…tringQuery` with `BoolQuery`, introduce `FullTextField` model, and enhance wildcard handling.
…ce static imports with dynamic discovery, introduce `ACTION_IMPORT_PACKAGES`, and optimize class loading.
[NAE-2464] Release 1.0.1 Bugfixes
…ce static imports with dynamic discovery, introduce `ACTION_IMPORT_PACKAGES`, and optimize class loading.
renczesstefan and others added 9 commits July 30, 2026 12:02
- Update version to 7.0.2 in all affected `pom.xml` files
- Modify `Dockerfile` and `Dockerfile.multi-stage` to use version 7.0.2
- Adjust `docker-compose.yml` to reflect the new image version
Remove the dedicated actions executor bean
Log ambiguous automatic Groovy action imports instead of silently skipping them
Prevent dev profile from dropping MongoDB and Elasticsearch data by default
Update deprecated case repository methods to version 7.0.2
Remove obsolete migration MongoTemplate bean configuration
Validate Elasticsearch full-text field boost values before applying them
…r regex handling consistency in full-text search normalization methods.
…r string normalization in full-text search
…e string replacement in full-text search normalization
[NAE-2464] Post release fixes
@machacjozef machacjozef self-assigned this Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@renczesstefan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b523652a-d348-441b-bbf6-25dfd2f5e6c8

📥 Commits

Reviewing files that changed from the base of the PR and between 25689ee and a5d69f7.

📒 Files selected for processing (1)
  • application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java

Walkthrough

The release updates workflow resource identifiers, asynchronous action execution, Elasticsearch full-text search, Groovy action imports, actuator exposure, migration configuration, tests, and project versions.

Changes

Workflow platform updates

Layer / File(s) Summary
Resource identifier model and propagation
nae-object-library/..., application-engine/src/main/.../repositories/*, application-engine/src/main/.../migration/helpers/*
Process resources now use process identifiers with generated object IDs. Repository, task, migration, role import, and deletion paths use the renamed identifier field.
Asynchronous action lifecycle
application-engine/src/main/groovy/.../AsyncRunner.groovy, .../ActionDelegate.groovy, application-engine/src/test/.../ActionDelegateTest.groovy, application-engine/src/test/resources/...
Async actions use an injected TaskExecutor. Delegate retention and release are guarded across submission and execution.
Full-text search parsing and validation
application-engine/src/main/java/.../ElasticCaseService.java, .../FullTextField.java, application-engine/src/test/java/.../elastic/service/*
Search now normalizes terms and builds required, case-insensitive wildcard queries with field boosts. Unit and integration tests cover parsing, escaping, matching, counts, and queue behavior.
Groovy action import discovery
application-engine/src/main/java/.../GroovyShellFactory.java, .../GroovyShellConfiguration.java
Action classes are discovered from configured recursive packages. Duplicate names, explicit imports, test classes, and scan failures receive defined handling.
Runtime configuration and release alignment
Dockerfile*, docker-compose.yml, application-engine/src/main/resources/*, pom.xml, */pom.xml
Management endpoints use narrower or explicit exposure rules. Migration configuration, test configuration, Docker versions, Maven versions, and Jackson properties are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GroovyAction
  participant AsyncRunner
  participant ActionDelegate
  participant TaskExecutor
  GroovyAction->>AsyncRunner: submit closure
  AsyncRunner->>ActionDelegate: retainForAsyncExecution
  AsyncRunner->>TaskExecutor: execute Runnable
  TaskExecutor->>ActionDelegate: releaseAfterAsyncExecution
  ActionDelegate->>ActionDelegate: clear after execution completes
Loading

Possibly related PRs

Suggested labels: Large, improvement, breaking change

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.94% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies this pull request as the 7.0.2 release, which matches the version updates across the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added breaking change Fix or feature that would cause existing functionality doesn't work as expected improvement A change that improves on an existing feature Large labels Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java (1)

62-68: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the field mismatch between the guard and the constructed ProcessResourceId.

The guard checks this.getProcessId() == null, but the else branch constructs _id from processIdentifier, not processId. Since fields cannot be set before a no-arg constructor runs, getProcessId() is always null here, so the else branch is unreachable in practice. This mismatch indicates the guard was not updated when the identifier field changed from processId to processIdentifier.

Check processIdentifier instead of processId, to align the guard with the value actually used to build _id.

🐛 Proposed fix
     public ProcessRole() {
-        if (this.getProcessId() == null) {
+        if (this.getProcessIdentifier() == null) {
             _id = new ProcessResourceId();
         } else {
             _id = new ProcessResourceId(processIdentifier, new ObjectId());
         }
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java`
around lines 62 - 68, Update the no-argument ProcessRole constructor’s guard to
check processIdentifier instead of getProcessId(), keeping the ProcessResourceId
construction aligned with the identifier used in the else branch.
nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java (1)

95-129: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fix the short process ID round-trip for non-ASCII identifiers.

generateShortProcessIdentifier() encodes processIdentifier.getBytes() via new BigInteger(1, ...), and decodeShortProcessIdentifier() uses number.toByteArray() to decode. BigInteger.toByteArray() returns a minimal two's-complement result including a sign byte, so any encoded process identifier whose encoding produces a leading byte with bit 7 set is decoded with a spurious leading NUL byte. Use a fixed positive sentinel byte before encoding so the magnitude has an explicit zero sign, then strip that byte on decode; reuse one decoded BigInteger for both decode methods.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java`
around lines 95 - 129, Update generateShortProcessIdentifier to prepend a fixed
zero sentinel byte before constructing the positive BigInteger, ensuring the
encoded magnitude preserves the original byte sequence. In
decodeShortProcessIdentifier, convert the decoded BigInteger to bytes once and
remove that sentinel before creating the identifier, reusing the same decoded
value across the decode paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovy`:
- Around line 42-44: Update AsyncRunner.execute and its actionsExecutor
configuration to use a dedicated, bounded executor for action-triggered
asynchronous work instead of the shared qualified taskExecutor bean. Keep the
executor isolated from unrelated `@Async` workloads while preserving execute’s
Runnable submission behavior.
- Around line 52-72: Add a focused unit test for AsyncRunner.findActionDelegate
using an outer wrapper closure delegated to an ActionDelegate and a nested
closure passed to async.run, verifying the delegate is found through the nested
closure traversal. Ensure the test reflects real action-closure wiring and fails
if the delegate/owner traversal no longer reaches the ActionDelegate.
- Around line 21-40: Update the Runnable in AsyncRunner.run so exceptions from
closure() are caught, logged with log.error(...) including the throwable, and
then rethrown or otherwise handled consistently with the existing async failure
behavior; preserve the finally block’s release(actionDelegate, released)
cleanup.

In
`@application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy`:
- Around line 465-467: Update CaseMigrationHelper.migratePetriNet at
application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy:465-467
to preserve the case’s old resource ID and migrate linked task references when
setting the new _id. In TaskMigrationHelper at
application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/TaskMigrationHelper.groovy:271-276,
set oldTask.caseId to the migrated case string ID before saving.

In
`@application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java`:
- Around line 433-446: Update the full-text query construction around the
fullTextTerms/fullTextFields loop to avoid generating leading-wildcard wildcard
clauses for every term and field. Preserve substring matching by querying an
appropriately configured n-gram subfield with match queries, or otherwise retain
prefix-searchable behavior without prepending “*”; ensure the resulting per-term
field matching and boost semantics remain intact.
- Around line 559-573: The normalizeFullTextSearch method should not call
Matcher.quoteReplacement, since it escapes dollar signs and corrupts terms such
as $100 before wildcard escaping. Replace that normalization step with direct
backslash handling, preserve the existing whitespace and dangling-escape
cleanup, and remove the now-unused Matcher import.

In
`@application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java`:
- Around line 27-31: Update GroovyShellFactory’s ACTION_IMPORT_PACKAGES
initialization to source scanned packages from the existing ActionsProperties
configuration instead of a hardcoded list. Reuse the configured imports,
starImports, or staticStarImports values as appropriate, preserving the current
defaults when no values are configured and allowing consumers to add packages
without code changes.
- Around line 63-81: Update findAllActionImportClasses and the class-discovery
flow so an individual class load or scan failure is logged and skipped rather
than propagated. Ensure loadClass handles both ClassNotFoundException and
linkage-related failures, while findAllClassesUsingClassLoader tolerates
per-class discovery failures; preserve discovery of all remaining valid classes
so getGroovyShell can initialize successfully.
- Around line 144-147: Update the resource filtering loop in GroovyShellFactory
to identify and exclude test classes using build-agnostic classpath or source
metadata rather than matching resource.getDescription() against “test-classes”.
Preserve inclusion of production resources and use an explicit configuration,
marker type, or equivalent reliable test-class distinction.

In
`@application-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.java`:
- Around line 41-65: Add legacy-field fallback handling for composite ID
lookups: in CaseRepository, make findById() try the deprecated
_id.shortProcessId query when findByNetworkIdentifierAndObjectId() finds
nothing; apply the equivalent migration/fallback in ProcessRoleRepository; and
update CaseEventHandler delete-ID construction to support legacy shortProcessId
values. Affected sites:
application-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.java:41-65,
application-engine/src/main/java/com/netgrif/application/engine/petrinet/domain/roles/ProcessRoleRepository.java:129-156,
and
application-engine/src/main/java/com/netgrif/application/engine/workflow/service/CaseEventHandler.java:60.

In `@application-engine/src/main/resources/application.yaml`:
- Around line 124-129: Remove heapdump from the
management.endpoints.web.exposure.include allowlist and delete the
management.endpoint.heapdump access: unrestricted configuration. Keep the
remaining actuator endpoint exposure and shutdown settings unchanged.

In
`@application-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovy`:
- Around line 183-197: Strengthen testAsyncRunAction by asserting the
asynchronous action’s observable result, not only successful net import and case
creation. Exercise the retain/release lifecycle through the async action in
async_run.xml—preferably by writing to a case field and polling until the
expected value appears with a bounded timeout, or by directly testing
AsyncRunner/ActionDelegate with a controllable TaskExecutor—so delegate lookup
or cleared fields cause the test to fail.
- Around line 191-195: Update the CreateCaseParams construction in
ActionDelegateTest to use the processIdentifier builder with the net’s process
identifier instead of processId with net.getNet().getStringId(), ensuring
createCase resolves the intended process identity.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java`:
- Line 4: Remove the class-level `@Setter` from ProcessResourceId and eliminate
setters for the identity fields objectId, shortProcessIdentifier, and
shortProcessId; preserve constructor initialization and retain or scope setters
only for fields that genuinely require external mutation.
- Around line 28-59: Backfill the non-deprecated shortProcessIdentifier from
legacy shortProcessId when ProcessResourceId data is loaded, including persisted
process resources and Cases, before getFullId() is used. Update
CaseEventHandler.onAfterDelete and TaskEventHandler to use the normalized
shortProcessIdentifier value while retaining compatibility with legacy
documents.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java`:
- Around line 177-181: Update the lazy initialization guard in get_id() to check
processIdentifier, matching the field passed to ProcessResourceId and preventing
null-based identifiers. Apply the same field alignment to the Task() constructor
guard if retained, without changing the existing setter-based initialization
behavior.

---

Outside diff comments:
In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java`:
- Around line 62-68: Update the no-argument ProcessRole constructor’s guard to
check processIdentifier instead of getProcessId(), keeping the ProcessResourceId
construction aligned with the identifier used in the else branch.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java`:
- Around line 95-129: Update generateShortProcessIdentifier to prepend a fixed
zero sentinel byte before constructing the positive BigInteger, ensuring the
encoded magnitude preserves the original byte sequence. In
decodeShortProcessIdentifier, convert the decoded BigInteger to bytes once and
remove that sentinel before creating the identifier, reusing the same decoded
value across the decode paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2bfd2081-7281-461d-8634-52f525b81fca

📥 Commits

Reviewing files that changed from the base of the PR and between 3d8cccd and 619465d.

📒 Files selected for processing (40)
  • Dockerfile
  • Dockerfile.multi-stage
  • application-engine/pom.xml
  • application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovy
  • application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy
  • application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/PetriNetMigrationHelper.groovy
  • application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/TaskMigrationHelper.groovy
  • application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/MongoClientConfiguration.java
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/groovy/GroovyShellConfiguration.java
  • application-engine/src/main/java/com/netgrif/application/engine/configuration/properties/MigrationProperties.java
  • application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java
  • application-engine/src/main/java/com/netgrif/application/engine/elastic/service/model/FullTextField.java
  • application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java
  • application-engine/src/main/java/com/netgrif/application/engine/importer/service/Importer.java
  • application-engine/src/main/java/com/netgrif/application/engine/petrinet/domain/roles/ProcessRoleRepository.java
  • application-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.java
  • application-engine/src/main/java/com/netgrif/application/engine/workflow/service/CaseEventHandler.java
  • application-engine/src/main/java/com/netgrif/application/engine/workflow/service/TaskService.java
  • application-engine/src/main/resources/application-old-dev.properties
  • application-engine/src/main/resources/application-old.properties
  • application-engine/src/main/resources/application.yaml
  • application-engine/src/test/groovy/com/netgrif/application/engine/TestHelper.groovy
  • application-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovy
  • application-engine/src/test/groovy/com/netgrif/application/engine/action/AssignRemoveTest.groovy
  • application-engine/src/test/java/com/netgrif/application/engine/elastic/service/ElasticCaseServiceIntegrationTest.java
  • application-engine/src/test/java/com/netgrif/application/engine/elastic/service/ElasticCaseServiceTest.java
  • application-engine/src/test/resources/application-test.yaml
  • application-engine/src/test/resources/petriNets/async_run.xml
  • docker-compose.yml
  • nae-object-library/pom.xml
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Case.java
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java
  • nae-spring-core-adapter/pom.xml
  • nae-spring-core-adapter/src/main/java/com/netgrif/application/engine/adapter/spring/workflow/domain/Task.java
  • nae-user-ce/pom.xml
  • nae-user-common/pom.xml
  • pom.xml

renczesstefan
renczesstefan previously approved these changes Aug 4, 2026
…s filtering, improve action import handling, and remove unused `ProcessResourceId` logic.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java (2)

188-192: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve _id after identifier initialization.

setProcessIdentifier creates a new ObjectId on every non-empty call. A second call changes the task's resource identity. A null or empty call can also leave the old _id paired with a cleared identifier. Initialize _id once and reject identifier changes after identity creation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java`
around lines 188 - 192, Update Task.setProcessIdentifier so _id is initialized
only once for the first valid non-empty processIdentifier, and reject subsequent
attempts to change the identifier after identity creation. Ensure null or empty
inputs cannot clear or leave _id inconsistent with the established process
identifier.

37-47: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Add legacy processId support for generated task IDs.

get_id() only uses processIdentifier, and processIdentifier is never populated unless setProcessIdentifier() is called, while legacy writers and existing task storage still use processId. Keep processId compatible and initialize _id from processId when processIdentifier is absent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java`
around lines 37 - 47, Update Task.get_id() to fall back to the legacy processId
when processIdentifier is absent, and ensure the generated _id is initialized
from that fallback. Preserve processIdentifier as the preferred source while
keeping existing processId-backed task storage and writers compatible.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java`:
- Around line 69-73: The isProductionClass filter in GroovyShellFactory
currently admits only classes sharing GroovyShellFactory’s code-source URL;
update it to recognize production classes from every configured production
module, including nae-object-library and nae-spring-core-adapter, while still
excluding test classes. Add coverage verifying automatic imports for one type
from each of those modules.

---

Outside diff comments:
In
`@nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java`:
- Around line 188-192: Update Task.setProcessIdentifier so _id is initialized
only once for the first valid non-empty processIdentifier, and reject subsequent
attempts to change the identifier after identity creation. Ensure null or empty
inputs cannot clear or leave _id inconsistent with the established process
identifier.
- Around line 37-47: Update Task.get_id() to fall back to the legacy processId
when processIdentifier is absent, and ensure the generated _id is initialized
from that fallback. Preserve processIdentifier as the preferred source while
keeping existing processId-backed task storage and writers compatible.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 86350b82-6eed-4c1b-8b62-6308a3ec9d67

📥 Commits

Reviewing files that changed from the base of the PR and between 619465d and 25689ee.

📒 Files selected for processing (3)
  • application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy
  • application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java
💤 Files with no reviewable changes (1)
  • application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy

…cement` usage in full-text search normalization
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@renczesstefan

Copy link
Copy Markdown
Member

@coderabbitai please review and approve if its ok.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== Changed files ==='
git diff --name-only HEAD^ HEAD

echo '=== Diff summary ==='
git diff --stat HEAD^ HEAD

echo '=== Full diff for production source and configuration ==='
git diff --find-renames --unified=50 HEAD^ HEAD -- \
  application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovy \
  application-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovy \
  application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java \
  application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java \
  nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java \
  nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Task.java \
  nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/Case.java \
  application-engine/src/main/java/com/netgrif/application/engine/workflow/service/TaskService.java \
  application-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.java \
  application-engine/src/main/java/com/netgrif/application/engine/petrinet/domain/roles/ProcessRoleRepository.java \
  application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovy \
  application-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/TaskMigrationHelper.groovy \
  application-engine/src/main/resources/application.yaml \
  application-engine/src/main/resources/application-old.properties \
  docker-compose.yml

echo '=== Relevant constructor/call-site search ==='
rg -n -C 3 \
  'new ProcessResourceId|setProcessIdentifier\s*\(|setProcessId\s*\(|getShortProcessId(?:entifier)?\s*\(|findByNetworkId(?:entifier)?AndObjectId\s*\(|AsyncRunner\s*\(|\.run\s*\(|\.execute\s*\(' \
  --glob '*.{java,groovy}' .

echo '=== Async executor bean definitions and usage ==='
rg -n -C 4 'actionsExecutor|TaskExecutor|EnableAsync|`@Async`' \
  --glob '*.{java,groovy}' application-engine nae-*

Length of output: 114944


🏁 Script executed:

#!/bin/bash
set -euo pipefail

target='application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java'

echo '=== ElasticCaseService structure ==='
ast-grep outline "$target" --items all --view expanded

echo '=== Current full-text implementation ==='
rg -n -C 12 \
  'normalizeFullTextSearch\s*\(|buildFullText|fullText|escapeWildcardValue|removeDanglingEscapeCharacters' \
  "$target"

echo '=== Baseline version of the changed method ==='
git show HEAD^:"$target" | rg -n -C 12 \
  'normalizeFullTextSearch\s*\(|buildFullText|fullText|escapeWildcardValue|removeDanglingEscapeCharacters'

echo '=== Full-text test definitions and assertions ==='
rg -n -C 10 \
  'full[Tt]ext|wildcard|backslash|\\\\|\\$|normalizeFullTextSearch|escapeWildcardValue' \
  --glob '*.{java,groovy}' application-engine/src/test

echo '=== Configuration for full-text fields ==='
rg -n -C 5 'full.?text|fullText' \
  --glob '*.{yaml,yml,properties,java,groovy}' application-engine/src/main application-engine/src/test

Length of output: 201570


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== Sanitizer definition and uses ==='
sanitizer=$(fd -t f 'ElasticsearchQuerySanitizer\.java$' . | head -n 1)
if [ -z "$sanitizer" ]; then
  echo 'ElasticsearchQuerySanitizer.java not found'
  exit 1
fi
ast-grep outline "$sanitizer" --items all --view expanded
cat -n "$sanitizer"

echo '=== Current PR diff and whitespace validation ==='
git diff --check HEAD^ HEAD
git diff --word-diff=plain HEAD^ HEAD -- application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java

echo '=== Test changes in this PR, if any ==='
git diff --find-renames --unified=15 HEAD^ HEAD -- application-engine/src/test/java/com/netgrif/application/engine/elastic/service/ElasticCaseServiceTest.java application-engine/src/test/java/com/netgrif/application/engine/elastic/service/ElasticCaseServiceIntegrationTest.java

echo '=== Current repository state ==='
git status --short

Length of output: 8181


@renczesstefan I reviewed the current PR diff.

The full-text normalization change is consistent with ElasticsearchQuerySanitizer and the wildcard query construction. Existing tests cover backslash normalization and literal wildcard characters. The diff has no whitespace errors.

Approved.
[approve]

You are interacting with an AI system.

@machacjozef
machacjozef merged commit 4f17386 into release/7.0.0 Aug 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Fix or feature that would cause existing functionality doesn't work as expected improvement A change that improves on an existing feature Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants