Kogito is the next generation of business automation platform focused on cloud-native development, deployment and execution.
This repository contains all the tooling artifacts of the Kogito project.
- Work in progress 🔨
To start building the KIE Tooling Core project, you're going to need:
- Node
>= 16.2.0
(To install, follow these instructions: https://nodejs.org/en/download/package-manager/) - Yarn
1.22.10
(To install, runnpm install -g [email protected]
) - Lerna
4.0.0
(To install, runnpm install -g [email protected]
) - Maven
3.8.1
- Java
11
- Go
1.16
*nix users will also need:
lib-gtk-3-dev
appindicator3-0.1
(libappindicator3-dev
andgir1.2-appindicator3-0.1
)
Users of Fedora or RHEL will also need to add an additional repository:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
After installing the tools above, you'll need to download the dependencies and link the packages locally. Simply run:
yarn bootstrap
To build it, you'll have two choices:
yarn build:dev
- This is fast, but not as strict. It skips tests, linters, and some type checks. Be prepared for the CI to fail on your PRs.yarn build:prod
- The default command to build production-ready packages. Use that to make sure your changes are correct.
NOTE: The Kogito Tooling build is parameterized by several Environment Variables. For an extensive list of these variables, please see packages/build-env/README.md
(link).
Final artifacts will be on packages/*/dist
directories.
While kogito-editors-java
is not integrated in this monorepo, we have dedicated environment variables to configure where to copy the Editors from. If those environment variables are empty, the Editors are copied from the installed NPM package on node_modules
.
export EXTERNAL_RESOURCE_PATH__bpmnEditor=/Users/tiago/redhat/kogito-editors-java/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/target/kie-wb-common-stunner-bpmn-kogito-runtime/
export EXTERNAL_RESOURCE_PATH__dmnEditor=/Users/tiago/redhat/kogito-editors-java/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/target/kie-wb-common-dmn-webapp-kogito-runtime/
export EXTERNAL_RESOURCE_PATH__scesimEditor=/Users/tiago/redhat/kogito-editors-java/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/target/drools-wb-scenario-simulation-editor-kogito-runtime
The Kogito Tooling project contains several applications. To develop each one of them individually, refer to the instructions below.
- After you've successfully built the project following the instructions above, open the
packages/vscode-extension-pack-kogito-kie-editors
folder on VS Code. Use a new VS Code window so that thepackages/vscode-extension-pack-kogito-kie-editors
folder shows up as root in the VS Code explorer. - From there, you can Run the extension or the integration tests by using the
Debug
menu/section. You can also use the respective shortcuts (F5 to start debugging, for instance). - NOTE: To run the VS Code extension in development mode, you need
webpack
andwebpack-cli
to be globally installed on NPM. Normally you can do that withnpm install -g [email protected] [email protected]
, butsudo
may be required depending on your installation. - Remember! If you make changes to packages other than
packages/vscode-extension-pack-kogito-kie-editors
, you have to manually rebuild them before relaunching the extension on VS Code.
- After you've successfully built the project following the instructions above, open the
packages/chrome-extension-pack-kogito-kie-editors
folder on your favourite IDE. You can import the entire repo as well if you want to make changes to other packages. - Run
yarn build:dev
onpackages/chrome-extension-pack-kogito-kie-editors
. This will create a version of the Chrome Extension that fetches the envelope locally. - Open a terminal and run
yarn start
onpackages/chrome-extension-pack-kogito-kie-editors
. This will start awebpack serve
instance with the editors and their envelope. We use that because we don't pack the Chrome Extension bundle with the editors inside. Instead, we fetch them from GitHub pages. - You also have to enable invalid certificates for resources loaded from localhost in your browser. To do that, go to
chrome://flags/#allow-insecure-localhost
in your Chrome browser and enable this flag. Alternativelly, you can go tohttps://localhost:9001
and add an exception. - Open Chrome and go to
chrome://extensions
. Enable "Developer mode" in the top-right corner and click on "Load unpacked". Choose thepackages/chrome-extension-pack-kogito-kie-editors/dist
folder. - From now on you can use the development version of the extension. Remember! After each change, you have to rebuild the changed modules and hit the "Refresh" button of the extension card.
- After you've successfully built the project following the instructions above, go to
packages/online-editor
. - Open a terminal and run
yarn start
. This will start awebpack serve
instance with the Online Editor resources. - From now on you can use the development version of the Online Editor by accessing
https://localhost:9001
.
- After you've successfully built the project following the instructions above, go to
packages/desktop
orpackages/hub
. They work exactly the same. - To start the application in development mode, you can run
yarn start
. If you make changes and want to reload the app, runyarn run build:dev && yarn start
. This will recompile the module and restart the Electron app. Remember: if you make changes to other modules, you have to build them too! - To build and package the application for production (i.e. generating an executable), you can run
yarn run build:prod
. This will pack the application for the current OS. If you want to pack the application for a different OS, runyarn run pack:linux
, for example. Seepackage.json
for more details.
- After you've successfully built the project following the instructions above, go to
packages/kie-editors-standalone
. - Open a terminal and run
yarn start
. This will start awebpack serve
instance with the Standalone Editors test page. - From now on you can use the development version of the Standalone DMN Editor by accessing
https://localhost:9001/resources/dmn
and the Standalone BPMN Editor by accessinghttps://localhost:9001/resources/bpmn
.