The procedure describes how to create a rule set for the agenda group FooAgendaGroup
- create a copy of SourceCosts.drl with name
FooAgendaGroup.drlwithin theorg.jboss.xavier.analytics.rulespackage - in the
FooAgendaGroup.drlfile:- change the
agenda-groupvalue to becomeFooAgendaGroup - change the
ruleID value to something likeFooAgendaGroupRules(i.e.rule "FooAgendaGroupRules")
- change the
- create a copy of SourceCostsTest.java with name
FooAgendaGroupTest.javawithin theorg.jboss.xavier.analytics.testpackage- change the constructor to reference the
FooAgendaGroup.drlfile instead ofSourceCosts.drl(i.e.super("/org/jboss/xavier/analytics/rules/FooAgendaGroup.drl", ResourceType.DRL);) - change the
agendaGroupto reference theFooAgendaGroupagenda group (i.e.facts.put("agendaGroup", "FooAgendaGroup");)
- change the constructor to reference the
- run the
mvn -gs ./configuration/settings.xml test -Dtest=FooAgendaGroupTestto check that everything works fine
Now you have a working rule set with a test and you can start developing the rules keeping updated the test.
- Follow the "Installation" procedure from xavier-integration project with one difference, use your own fork URL (e.g.
https://github.com/mrizzi/xavier-analytics.git) instead of usinghttps://github.com/project-xavier/xavier-analytics.gitin the Decision Manager section - go to
Settingspage in Business Central project - copy the
sshURL (e.g.ssh://analytics-rhdmcentr-2-9ws6w:8001/MySpace/xavier-analytics) - from your local terminal, login to the local OKD instance as
developerand switch to use the migration analytics project oc port-forwardoc get pod | grep "^analytics-rhdmcentr" | awk '{print $1}'`` 8001:8001- from your
xavier-analyticsproject root folder, executegit remote add remote-dm ssh://adminUser@localhost:8001/MySpace/xavier-analyticsreplacing the remote host's name (e.g.analytics-rhdmcentr-2-9ws6w) withlocalhost - retrieve the code from Decision Manager Business Central using
git pull remote-dm MIGENG-45
When deploying the latest master in Business Central, it could fail due to a missing dependency. To solve the issue:
- go to the
Settingstab in Business Central main project page - select
Dependenciesfrom left menu - add the dependency:
- Group ID
org.mockito - Artifact ID
mockito-core - Version
2.28.2
- Group ID
- save it (if it complains for the project name, change it to
Xavier-AnalyticsinGeneral Settings)
Now it will be safe the Build & Install and Deploy the project.