Implementation of a Java Low-Code Solution

At this point it is assumed that the initial setup and the mandatory commands of the Solution CLI have been performed and executed as described.

Prerequisites

Be sure you have set up and installed all prerequisites

Create a new Solution Workspace

After you have created a solution in Solution Designer and modeled it according to DDD specifications, create a folder for your workspace.

Open a terminal and navigate to your development workspace folder

Example:

cd /my/workspace/

Clone Solution to Local Workspace

Inside Solution Designer, open the solution and click on Solution CLI in the task bar located at the bottom of the page.

There you will find instructions on how to setup the CLI and connect it with your k5-project. The section "Implementation" provides the necessary information for the fss clone command to clone the solution to your local workspace.

Note: You will be prompted for your username and password for this k5-project.

A folder in your workspace will be created for the cloned solution, where the folder name will be the solution acronym.

Example:

/my/workspace/SOL

Open Project

Open your solution project folder using Eclipse, IntelliJ or preferred IDE.

Project Structure

The project is structured into several source folders and some configuration files inside the SolutionAcronym-application folder:

  • src/main/java Holds the solution spring boot entry point and also stub files where solution engineer needs to implement logic for api, services, commands, agents and external entities services.
  • src/main/generated Holds the generated sdk files for api and domain layers.
  • src/test/java Holds the test files (Currently only one test file for database service).
  • src/main/resources Holds the resources files such as application.yaml and application-local-template.yaml.
  • src/test/resources Holds the resources files for running tests.
  • target The maven default output folder. When a project is build or packaged, all the content of the sources, resources and web files will be put inside of it.
  • pom.xml XML file that contains information about the project and configuration details used by Maven to build the project.

Solution Stubs Package Structure

Contains java stub classes where solution engineer can implement logic for modeled operations, services, commands, agents and external entities

Base package for stubs is named according to package name that is set in solution information and the solution acronym, for example: de.knowis.cnr

It consists of two main sub-packages Api and Domain, Where each package groups several namespaces

Api and Domain sub-packages correspond to the namespace types that are described in Modeling Low-Code Solutions

Each namespace will get its own sub-package with its own prefix for example:

  • de.knowis.cnr.api.apins1 corresponds to an Api namespace with prefix apins1
  • de.knowis.cnr.domain.dns1 corresponds to a domain namespace with prefix dns1

Solution SDK Package Structure

Contains SDK classes that provides base classes for modeled operations, services, commands, agents and external entities as well as necessary configuration and services needed to run application.

Base package for sdk is named according to package name that is set in solution information and the solution acronym with addition of "sdk/api" to distinguish it from solution stubs, for example: de.knowis.cnr.sdk

It consists of two main sub-packages Api and Domain, Where each package groups its several namespaces

Api and Domain sub-packages correspond to the namespace types that are described in Modeling Low-Code Solutions

Each namespace will get its own sub-package with its own prefix for example:

  • de.knowis.cnr.api.apins1.api corresponds to an Api namespace with prefix apins1
  • de.knowis.cnr.sdk.domain.dns1 corresponds to a domain namespace with prefix dns1