Set version to 0.12.0
45 files changed
tree: 2687e163197a389e82a3be434a95022019dbc6cc
  1. .github/
  2. .husky/
  3. config/
  4. docs/
  5. packages/
  6. patches/
  7. scripts/
  8. .eslintrc.js
  9. .gitattributes
  10. .gitignore
  11. Jenkinsfile.nightly
  12. lerna.json
  13. LICENSE
  14. package.json
  15. prettier.config.js
  16. README.md
  17. RELEASE_PROCESS.md
  18. tsconfig.dev.json
  19. tsconfig.json
  20. tsconfig.prod.json
  21. yarn.lock
README.md

Kogito Tooling

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.

GitHub Stars GitHub Forks GitHub Issues Pull Requests Contributors License Twitter Follow

Contribute

  • Work in progress 🔨

Build from source

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, run npm install -g yarn@1.22.10)
  • Lerna 4.0.0 (To install, run npm install -g lerna@4.0.0)
  • Maven 3.8.1
  • Java 11

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.

Using custom Editor builds from kogito-editors-java

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.

Examples:

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

Applications

The Kogito Tooling project contains several applications. To develop each one of them individually, refer to the instructions below.

VS Code Extension

  1. 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 the packages/vscode-extension-pack-kogito-kie-editors folder shows up as root in the VS Code explorer.
  2. 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).
  3. NOTE: To run the VS Code extension in development mode, you need webpack and webpack-cli to be globally installed on NPM. Normally you can do that with npm install -g webpack@4.41.2 webpack-cli@3.3.10, but sudo may be required depending on your installation.
  4. 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.

Chrome Extension

  1. 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.
  2. Run yarn build:dev on packages/chrome-extension-pack-kogito-kie-editors. This will create a version of the Chrome Extension that fetches the envelope locally.
  3. Open a terminal and run yarn run serve-envelope on packages/chrome-extension-pack-kogito-kie-editors. This will start a webpack 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.
  4. 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 to https://localhost:9001 and add an exception.
  5. Open Chrome and go to chrome://extensions. Enable “Developer mode” in the top-right corner and click on “Load unpacked”. Choose the packages/chrome-extension-pack-kogito-kie-editors/dist folder.
  6. 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.

Online Editor

  1. After you've successfully built the project following the instructions above, go to packages/online-editor.
  2. Open a terminal and run yarn start. This will start a webpack serve instance with the Online Editor resources.
  3. From now on you can use the development version of the Online Editor by accessing https://localhost:9001.

Desktop and Hub

  1. After you've successfully built the project following the instructions above, go to packages/desktop or packages/hub. They work exactly the same.
  2. To start the application in development mode, you can run yarn start. If you make changes and want to reload the app, run yarn 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!
  3. 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, run yarn run pack:linux, for example. See package.json for more details.

Standalone Editors

  1. After you've successfully built the project following the instructions above, go to packages/kie-editors-standalone.
  2. Open a terminal and run yarn start. This will start a webpack serve instance with the Standalone Editors test page.
  3. 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 accessing https://localhost:9001/resources/bpmn.