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

Git Issue - 2749: Add decisionInstanceId to evaluate DMN decision api response #4197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmannuru
Copy link

@kmannuru kmannuru commented Mar 21, 2024

GIT Issue: #2749

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2024

CLA assistant check
All committers have signed the CLA.

@kmannuru kmannuru changed the title ENTDAPCOE-94: Add decisionInstanceId to evaluate DMN decision api response Git Issue - 2749: Add decisionInstanceId to evaluate DMN decision api response Mar 21, 2024
@yanavasileva
Copy link
Member

Hi @kmannuru,

Thank you for raising this.
I will have a look at it and get back to you.
Please note before merge, you need to sign one time only Contributor License Agreement (CLA).

Best,
Yana

@kmannuru
Copy link
Author

kmannuru commented Apr 4, 2024

@yanavasileva Did you get a chance to review my code changes. Thanks

@yanavasileva
Copy link
Member

Hi @kmannuru, I will need more time to review the PR as the change is not trivial.
Please stay tuned and thank you for your patience in advance.

@yanavasileva
Copy link
Member

Hi, just checking in.
I am not sure about the proposed approach, I will discuss the topic with the team and get back to you.
Some points that I can already raise after checking the engine implementation:

  • What will happen if a user has a variable that's called decisionInstanceId? I don't we should mess with the variables that are passed for evaluating a decision.
  • The test coverage (in the dmn-engine and engine) doesn't seem sufficient at first glance.
  • Would it be possible to avoid changing the scope of commons-lang3?

Best,
Yana

@kmannuru
Copy link
Author

@yanavasileva thanks for your feedback. I'll update the PR with additional unit test coverage and change scope of commons-lang3.
Regarding user variable map, I'm planning to keep it more dynamic building variable map key prefix with decisionDefinitionKey.
variables.put(decisionDefinition.getKey()+"decisionInstanceId", decisionInstanceId);
Please let me know if I can proceed with this approach. Thank you.

@yanavasileva
Copy link
Member

@kmannuru,
We don't want to pass the decisionInstanceId via the variables, as I mentioned earlier, I confirmed it with the team as well. You can try to explore other options to pass the id to the evaluated result. My initial proposal that I didn't weighted thoroughly is to pass it via the DecisionInvocation. Maybe you can check the options there.
Nevertheless, we won't proceed with the variables approach.

Copy link
Member

@yanavasileva yanavasileva left a comment

Choose a reason for hiding this comment

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

I will wait for adjusting the handling of decisionInstanceId before continuing with the review.

@yanavasileva
Copy link
Member

Closing due to inactivity. The PR can be reopened again when you get back to the topic.

@kmannuru
Copy link
Author

@yanavasileva I'm currently working on the changes to create decisionInstanceId part of the invocation logic in DecisionInvocation.java and not pass part of variable map. The decisionInstanceId will be passed as method parameter to DefaultDmnDecisionContext.java. Can you please help reopen the PR as i'm planning to push my changes shortly. Thank you.

@yanavasileva yanavasileva reopened this May 22, 2024
@brianwarner brianwarner force-pushed the feature/evaluate_dmn_with_dec_instant_id branch 2 times, most recently from 7de6638 to 03d06ee Compare May 24, 2024 19:45
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.

None yet

3 participants