The procedure describes how to create a rule set for the agenda group FooAgendaGroup
- create a copy of SourceCosts.drl with name
FooAgendaGroup.drl
within theorg.jboss.xavier.analytics.rules
package - in the
FooAgendaGroup.drl
file:- change the
agenda-group
value to becomeFooAgendaGroup
- change the
rule
ID value to something likeFooAgendaGroupRules
(i.e.rule "FooAgendaGroupRules"
)
- change the
- create a copy of SourceCostsTest.java with name
FooAgendaGroupTest.java
within theorg.jboss.xavier.analytics.test
package- change the constructor to reference the
FooAgendaGroup.drl
file instead ofSourceCosts.drl
(i.e.super("/org/jboss/xavier/analytics/rules/FooAgendaGroup.drl", ResourceType.DRL);
) - change the
agendaGroup
to reference theFooAgendaGroup
agenda group (i.e.facts.put("agendaGroup", "FooAgendaGroup");
)
- change the constructor to reference the
- run the
mvn -gs ./configuration/settings.xml test -Dtest=FooAgendaGroupTest
to 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.git
in the Decision Manager section - go to
Settings
page in Business Central project - copy the
ssh
URL (e.g.ssh://analytics-rhdmcentr-2-9ws6w:8001/MySpace/xavier-analytics
) - from your local terminal, login to the local OKD instance as
developer
and switch to use the migration analytics project oc port-forward
oc get pod | grep "^analytics-rhdmcentr" | awk '{print $1}'`` 8001:8001
- from your
xavier-analytics
project root folder, executegit remote add remote-dm ssh://adminUser@localhost:8001/MySpace/xavier-analytics
replacing 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
Settings
tab in Business Central main project page - select
Dependencies
from 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-Analytics
inGeneral Settings
)
Now it will be safe the Build & Install
and Deploy
the project.