This repository is used by DXC (CSC Scandihealth) to modify Drools Workbench for use with LPR.
This branch contains modifications to 6.5.0.Final made by DXC (CSC Scandihealth).
Running the gwt-maven-plugin to compile the gwt code in the drools-wb-webapp
project under Windows 7 gives an error (see gwt-maven-plugin/gwt-maven-plugin#113).
To fix this we have backported the 2.8.0 fix to our own fork of gwt-maven-plugin
2.7.0 found here: https://github.com/scandihealth/gwt-maven-plugin/tree/csc-2.7.0
We have packaged that fork using maven and uploaded the jar to our own internal Artifactory maven repository so that it can be resolved when building this drools-wb
fork internally at DXC.
- Install Git for windows, IntelliJ IDEA & Java JDK 8 64bit
- Configure Maven to use our internal Scandihealth Artifactory maven repository
- Copy \\sh\shares\scvcomn\LPR3\udviklersetup\settings.xml to your %USERPROFILE%\.m2 folder (create folder if necessary)
- Configure Git to use long paths
- Open a command prompt with administrator rights and run:
git config --system core.longpaths true
- Open a command prompt with administrator rights and run:
- Open IDEA (64 bit) by opening idea64.exe -> Default Settings -> Maven
- Change Maven -> Runner -> VM Options to
-Xms256m -Xmx3G
- Change Maven -> Runner -> VM Options to
- Using IDEA (64 bit): Checkout the repository from Git https://github.com/scandihealth/drools-wb.git
- Open the root pom.xml as a project
- Make sure to "Enable Auto Import" in Maven and add GWT facets (IDEA should ask you these questions in popup balloons)
- Change File -> Project Structure -> Project -> Project SDK to
1.8
(64bit)
- (Optional) Click the "Toggle 'Skip Tests' Mode" button in the Maven Projects sidebar window
- You are now ready to run Maven commands and develop
- Run Drools Workbench (root) -> install (takes 10-15 minutes)
- Note: The build output of drools-wb-webapp is copied to ${env.JBOSS_HOME}/standalone/deployments
- Download and unzip WildFly 10.1.0.Final
- Copy kie.maven.settings.custom.xml to your WildFly installation (e.g. \standalone\drools\configuration)
- Insert this into wildfly-10.1.0.Final\standalone\configuration\standalone.xml after the
<extensions>
element (modify to your liking)
<system-properties> <property name="org.uberfire.nio.git.dir" value="C:\dev\drools-wb-devdb"/> <property name="org.uberfire.nio.git.ssh.cert.dir" value="C:\dev\drools-wb-devdb"/> <property name="org.uberfire.metadata.index.dir" value="C:\dev\drools-wb-devdb"/> <property name="org.guvnor.m2repo.dir" value="C:\dev\drools-wb-devdb"/> <property name="kie.maven.settings.m2repo.dir.local" value="${env.JBOSS_HOME}\standalone\drools\m2localrepo"/> <property name="kie.maven.settings.custom" value="${env.JBOSS_HOME}\standalone\drools\configuration\kie.maven.settings.custom.xml"/> </system-properties>
- Setup a new Run configuration in IDEA
- First make sure you have enabled JBoss integration
- Run -> Edit confiugrations -> Add New Configuration (+ button) -> JBoss -> Local
- Application server: JBoss 10.1.0.Final (if not present then click Configure... and choose the folder where you unzipped Wildfly 10.1.0.Final)
- Deployment tab -> Add (+ button) -> pick drools-wb-webapp:war exploded
- Now you should be able to run this configuration and the Drools Workbench login page should open automatically
- Remember on Drools Workbench - WebApp to run Maven 'clean' and then 'install' if you have made changes to GWT code you want to include
- Remember on Drools Workbench - WebApp to run Maven 'clean' and then 'install' if switching from debugging GWT to running normally
- Login with admin/admin
- Download the official droolsjbpm IDEA Code Style and save it in %USERPROFILE%\.<YOUR IDEA VERSION>\config\codestyles
- Change the Code Style used by IDEA for this project
- Select Settings -> Editor -> Code Style -> Scheme:
Drools and jBPM: Java Conventions
- Select Settings -> Editor -> Code Style -> Scheme:
- Change .properties file encoding to UTF-8
- Settings -> Editor -> File Encodings -> Set Default encoding for properties files to UTF-8
- Note: normal i18n properties files must be in ISO-8859-1 as specified by the java ResourceBundle contract.
- Note on note: GWT i18n properties files override that and must be in UTF-8 as specified by the GWT contract.
- Follow some of the other (TBD) code style recommendations described here (e.g. XML tab spaces)
- On Drools Workbench - WebApp run Maven 'clean' then 'csc-gwt:debug'
- This can be setup as a 1-click job by using the "Execute Maven Goal" button in IDEA and set Working directory to the drools-wb-webapp folder and enter 'clean csc-gwt:debug -e' in Command line
- Attach a IDEA Remote debugger on port 8000 (Now the GWT Development Mode window should pop up)
- Click the "Launch Default Browser" button when it is available
- If deployment to WildFly fails with a file system or persistence related error it most likely means that a previous Drools-WB Java process was not terminated and has taken a file lock or JVM address binding
- Make sure drools-wb-webapp is not already deployed (check standalone.xml <deployment> tags and check \wildfly-10.1.0.Final\standalone\deployments folder)
- Close the server and kill all instances of java.exe in your Windows task manager
- If this doesn't fix the problem, then stop the server and delete the .index and .niogit folders in the dir specified by "org.uberfire.nio.git.dir" and "org.uberfire.metadata.index.dir" and try again
- Note: This will reset all your application data (Data Model, rules, etc)
- To open standalone mode use the following URL: http://localhost:8080/drools-wb-webapp/drools-wb.html?standalone=true&perspective=AuthoringPerspective
- perspective can be replaced by path parameter which will open the file (in it's appropriate editor) directly, e.g.
- If using the path parameter, an optional editor parameter can be appended to open any "Place" (e.g. the "Search Asset" screen). A "Place" is a WorkbenchPerspective, a WorkbenchScreen, a WorkbenchPopup, a WorkbenchEditor, or a WorkbenchPart