OptaPlanner service for task a
An example of assigning tasks on KIE Server using OptaPlanner.
Requirements JDK 1.8 or above Maven 3.0+ node.js 8.12+ npm 6.4.1+ WildFly KIE Server war file from OptaPlanner website (Execution server -> Any application server, unzip to find the war file) Running the demo First start a WildFly instance and deploy KIE artifacts: Download and unzip the WildFly distribution. Let’s call the root of the distribution WILDFLY_HOME. This directory is named after the WildFly version, so for examplewildfly-15.0.1.Final
is the one we're using for this demo.
Download kie-server-...-ee7.war and place it into WILDFLY_HOME/standalone/deployments
as kie-server.war
.
Configure user(s) and role(s). Execute the following command WILDFLY_HOME/bin/add-user.sh -a -u 'kieserver' -p 'kieserver1!' -ro 'kie-server'
. You can of course choose different username and password, just make sure that the user has role kie-server
Start the server by running WILDFLY_HOME/bin/standalone.sh -c standalone-full.xml
. The default URI for KIE Server is http://localhost:8080/kie-server/services/rest/server. Check this location in a web browser to verify the server is running. You will be prompted to type in username and password, use the ones you chose when adding a new user.
Now that the KIE Server is running, let's deploy an OptaPlanner service to solve a task assignment problem.
Copy the OptaPlanner service kjar to your local mvn repository, this can be done by typing the command mvn install
in kie-server-optaplanner-task-assignment/task-assignment-kjar
.
Run the UI:
Go to kie-server-optaplanner-task-assignment/task-assignment-ui
npm install
to install the dependencies.
npm start
this will start the frontend application. If it doesn't open in a default browser, open your favorite browser and go to localhost:3000
tl;dr
build the kjar:
cd task-assignment-kjar mvn install Run the kie server:
cp kie-server-...-ee7.war WILDFLY_HOME/standalone/deployments/kie-server.war WILDFLY_HOME/bin/add-user.sh -a -u 'kieserver' -p 'kieserver1!' -ro 'kie-server' WILDFLY_HOME/bin/standalone.sh -c standalone-full.xml Run the UI:
cd task-assignment-ui npm install npm start Developing Drools and jBPM
If you want to build or contribute to a kiegroup project, read this document.
It will save you and us a lot of time by setting up your development environment correctly. It solves all known pitfalls that can disrupt your development. It also describes all guidelines, tips and tricks. If you want your pull requests (or patches) to be merged into master, please respect those guidelines.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。