Giter Site home page Giter Site logo

kie-server-optaplanner-task-assignment's Introduction

KIE Server OptaPlanner Task Assignment

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 example wildfly-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

  1. build the kjar:
cd task-assignment-kjar
mvn install
  1. 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
  1. 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.

kie-server-optaplanner-task-assignment's People

Contributors

musatalluzi avatar yurloc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.