Skip to content

Conversation

@Kovy95
Copy link
Contributor

@Kovy95 Kovy95 commented Jul 10, 2025

Description

  • rename constant from null to NONE
  • add processIdentifier and processTitle to process role

Implements NAE-2126

Dependencies

none

Third party dependencies

-No new dependencies were introduced

Blocking Pull requests

There are no dependencies on other PR

How Has Been This Tested?

manually

Test Configuration

<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc.>

Name Tested on
OS Linux Mint 21
Runtime Java 21.0.7
Dependency Manager maven 3.9.9
Framework version Spring Boot 3.4.4
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Summary by CodeRabbit

  • New Features

    • Added additional metadata (process title and identifier) to process roles for improved process information display.
  • Refactor

    • Updated terminology for process resource identifiers to use "NONE" instead of "NULL" for improved clarity.

Kovy95 added 2 commits July 10, 2025 19:38
- rename constant from null to NONE
- add processIdentifier and processTitle to process role
@Kovy95 Kovy95 self-assigned this Jul 10, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 10, 2025

Walkthrough

The changes introduce two new metadata fields—process title and process identifier—to the ProcessRole class, updating its copy constructor accordingly. The Importer service now sets these fields when initializing roles. Additionally, a constant in ProcessResourceId was renamed and its value updated, with the default constructor reflecting this change.

Changes

File(s) Change Summary
.../importer/service/Importer.java Updated initRole to set process title and identifier on ProcessRole when role is not global.
.../domain/roles/ProcessRole.java Added processIdentifier (String) and processTitle (I18nString) fields with setters; updated copy constructor to copy these fields.
.../domain/ProcessResourceId.java Renamed constant NULL_SHORT_ID_VALUE to NONE_SHORT_ID_VALUE, changed value to "NONE", and updated default constructor to use new constant.

Sequence Diagram(s)

sequenceDiagram
    participant Importer
    participant ProcessRole
    participant PetriNet

    Importer->PetriNet: Get processId, title, identifier
    Importer->ProcessRole: Set processId
    Importer->ProcessRole: Set processTitle
    Importer->ProcessRole: Set processIdentifier
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 109329d and 2c8e77f.

📒 Files selected for processing (3)
  • application-engine/src/main/java/com/netgrif/application/engine/importer/service/Importer.java (1 hunks)
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java (2 hunks)
  • nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: renczesstefan
PR: netgrif/application-engine#318
File: nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/menu/MenuItemConstants.java:60-62
Timestamp: 2025-06-23T13:30:13.096Z
Learning: In MenuItemConstants enum in nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/menu/MenuItemConstants.java, the field `attributeId` will be renamed to `value` to make it more generic and appropriate for both dataset attribute identifiers and technical constants like PATH_SEPARATOR.
nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java (1)
Learnt from: renczesstefan
PR: netgrif/application-engine#318
File: nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/menu/MenuItemConstants.java:60-62
Timestamp: 2025-06-23T13:30:13.096Z
Learning: In MenuItemConstants enum in nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/menu/MenuItemConstants.java, the field `attributeId` will be renamed to `value` to make it more generic and appropriate for both dataset attribute identifiers and technical constants like PATH_SEPARATOR.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: Build
  • GitHub Check: task-list-completed
🔇 Additional comments (5)
application-engine/src/main/java/com/netgrif/application/engine/importer/service/Importer.java (1)

1091-1092: LGTM! Proper initialization of new process metadata fields.

The addition of setProcessTitle and setProcessIdentifier correctly populates the new metadata fields on non-global roles. The placement within the else clause ensures that only process-specific roles receive this metadata, which is the appropriate behavior.

nae-object-library/src/main/java/com/netgrif/application/engine/objects/workflow/domain/ProcessResourceId.java (2)

20-20: Good semantic improvement from "NULL" to "NONE".

The renaming of the constant from NULL_SHORT_ID_VALUE to NONE_SHORT_ID_VALUE with value "NONE" is clearer and less confusing than using "NULL" as a string literal.


27-27: LGTM! Constructor updated consistently.

The default constructor correctly uses the renamed constant to maintain consistency.

nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/roles/ProcessRole.java (2)

44-48: Well-implemented addition of process metadata fields.

The new processIdentifier and processTitle fields appropriately extend the role with process context information. The use of I18nString for the title supports internationalization, and the @Setter annotations follow the established pattern in the class.


69-70: Copy constructor properly updated.

The copy constructor correctly includes the new fields, ensuring that all process metadata is preserved when creating role copies. This maintains object integrity and prevents data loss during role duplication.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Retoocs Retoocs self-requested a review July 14, 2025 10:27
@machacjozef machacjozef merged commit 0d905e3 into release/7.0.0-rev4 Jul 20, 2025
6 of 7 checks passed
@machacjozef machacjozef deleted the NAE-2126 branch July 20, 2025 18:20
@coderabbitai coderabbitai bot mentioned this pull request Sep 22, 2025
18 tasks
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.

6 participants