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

RHPAM-4822 find EventNode by unique id #2347

Closed
wants to merge 3 commits into from
Closed

Conversation

albfan
Copy link
Contributor

@albfan albfan commented Oct 16, 2023

JIRA: RHPAM-4822

Avoid classcastexception finding event nodes by unique id

@mareknovotny
Copy link
Member

ok to test

@sonarcloud
Copy link

sonarcloud bot commented Oct 17, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

9.1% 9.1% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-services-api</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

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

this is not correct at all. the engine cannot depend on the services api at all.

private Node getNodeByNodeInstanceId(long id, long nodeInstanceId) {
Node node = null;
RuntimeDataService service = (RuntimeDataService) ServiceRegistry.get().service(ServiceRegistry.RUNTIME_DATA_SERVICE);
Collection<NodeInstanceDesc> nodes = service.getProcessInstanceNodeInstanceHistory(id, nodeInstanceId, new QueryContext(0, 1));
Copy link
Member

Choose a reason for hiding this comment

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

incorrect either. the engine should not access the runtime data service. this goes against the design.

Copy link
Member

@elguardian elguardian left a comment

Choose a reason for hiding this comment

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

Rejected. this entangles the design of the system. The are ways to access the node by uniqueId already

@fjtirado fjtirado closed this Sep 30, 2024
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.

4 participants