-
Notifications
You must be signed in to change notification settings - Fork 342
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
fix: Create program rule model [DHIS2-17243] #17807
Conversation
…7134] (#17169) * fix: Just call sideeffect threads without sending to a queue [DHIS2-17134] * Code review fixes * Code review fixes
import org.hisp.dhis.tracker.imports.TrackerImportStrategy; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* @author Zubair Asghar | ||
*/ | ||
class TrackerSideEffectDataBundleTest { | ||
class TrackerSideValidationEffectDataBundleTest { |
Check notice
Code scanning / CodeQL
Unused classes and interfaces Note
5fe80dc
to
3ee8b96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is anyone other than tracker going to use the program-rule/api? If not should this code not live in tracker? It could still sit as a layer in between any tracker code interacting with program rules/rule engine.
...service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationActionType.java
Outdated
Show resolved
Hide resolved
...dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/RuleEngineEffects.java
Outdated
Show resolved
Hide resolved
.../dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/ValidationEffect.java
Outdated
Show resolved
Hide resolved
...service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationActionType.java
Outdated
Show resolved
Hide resolved
...his-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationEffect.java
Outdated
Show resolved
Hide resolved
...dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/RuleEngineEffects.java
Outdated
Show resolved
Hide resolved
...-service-program-rule/src/main/java/org/hisp/dhis/programrule/engine/NotificationHelper.java
Outdated
Show resolved
Hide resolved
...s/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/imports/bundle/TrackerBundle.java
Outdated
Show resolved
Hide resolved
|
||
// These are needed for rule engine validation | ||
RuleEngineEffects ruleEffects = | ||
RuleEngineEffects.merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to merge them if we pull them apart again right after in
bundle.setEventNotificationEffects(ruleEffects.getEventNotificationEffects());
Maybe you can walk us through how the RuleEffects/RuleEngineEffects enter into tracker. I wonder if we can reduce some of the mapping/merging.
...ker/src/main/java/org/hisp/dhis/tracker/imports/programrule/executor/ValidationExecutor.java
Outdated
Show resolved
Hide resolved
...in/java/org/hisp/dhis/tracker/imports/programrule/executor/enrollment/ShowErrorExecutor.java
Outdated
Show resolved
Hide resolved
...his-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationAction.java
Outdated
Show resolved
Hide resolved
...his-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationAction.java
Outdated
Show resolved
Hide resolved
...his-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationEffect.java
Outdated
Show resolved
Hide resolved
...his-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/NotificationEffect.java
Outdated
Show resolved
Hide resolved
.../dhis-service-program-rule/src/main/java/org/hisp/dhis/programrule/api/ValidationEffect.java
Outdated
Show resolved
Hide resolved
|
The goal of this PR is to remove the dependency of rule-engine library from
dhis-service-tracker
module.To achieve that, we are creating an API layer in
dhis-program-rule
module and making tracker use that model instead of rule-engine one.This approach has 2 advantages: