Generating an Application

DecisionBrain
Decision Optimization Center
3 min readApr 9, 2020

Now that DOC 4.0.0 is installed, let us generate an application as described on the Quick Start page of the documentation. For this, we need a JDL description of the application data model. We will use the CP-model.jdl file.

7-Create Application.mp4

Building the Application

Building the application consists in:

  • Generating the Java code for the data model from the JDL description;
  • Compiling the Java and Typescript code that was generated either with the application structure (previous section) or from the JDL description;
  • Retrieving the DOC 4.0 dependencies (JVM libraries and NPM packages) from the dedicated repository, the credentials to which we have stored in our ~/.gradle/gradle.properties in a previous step.

The first build takes way longer than the subsequent ones, because some tools have to set themselves up and because the retrieval of the dependencies. The video below performs the steps described on the Quick Start page of the documentation.

8-Build Application.mp4

Building Docker Images for the Application

The video below performs the steps described on the Quick Start page of the documentation.

9-Build Docker images.mp4

Launching Application from Docker Images

Now that we have packaged our application as Docker images, we will use the Docker Compose deployment scripts to launch the application. The video below performs the steps described at the end of the Quick Start page of the documentation.

10-Launch Application from Docker.mp4

Configuring the Application

The application can be configured using the dedicated commands in the interface. In the following video, we are going instead to install some pre-configured settings from the app-config.json file. Then we will create a scenario from the scenario-data.xlsx file.

https://decisionbrain.com/ibm-doc/

11-Load UI cfg and data.mp4

Adding Optimization Workers

In the previous step, we have loaded some data in a scenario. This data can be visualized in the dashboards, and tasks can be run against it. However, since we did not have any optimization tasks yet, we have to perform additional installation steps. The video below performs the steps described on the Worker Tasks page of the documentation.

12-Build Workers.mp4

Stopping the Application

To stop the application, bring the Docker containers down in the reverse order of the one in which you started them. The Docker container that runs the Postgres database server stores its data in a Docker volume. If you do not want to keep that data for the next run, clean this volume, too.

13-Stop Application.mp4

--

--

DecisionBrain
Decision Optimization Center

We combine Optimization, ML and AI techniques to create innovative and customizable AI-based decision-support solutions that drive operational efficiency