Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main branch with Apache main branch #79

Merged
merged 12 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ BoolField.test.tsx.snap
CheckBoxGroupField.test.tsx.snap
# packages/form-code-generator-patternfly-theme/tests/__snapshots__/DateField.test.tsx.snap
DateField.test.tsx.snap
# packages/form-code-generator-patternfly-theme/tests/__snapshots__/ListField.test.tsx.snap
ListField.test.tsx.snap
# packages/form-code-generator-patternfly-theme/tests/__snapshots__/NestField.test.tsx.snap
NestField.test.tsx.snap
# packages/form-code-generator-patternfly-theme/tests/__snapshots__/NumField.test.tsx.snap
Expand Down Expand Up @@ -1013,6 +1015,8 @@ common.py
# packages/sonataflow-management-console-webapp/resources/monitoring-webapp/MonitoringReport.dash.yml
MonitoringReport.dash.yml
# packages/sonataflow-management-console-webapp/resources/monitoring-webapp/WorkflowDetails.dash.yml
sonataflow-management-console.feature
# packages/sonataflow-management-console-image/test-resources/tests/features/sonataflow-management-console.feature
WorkflowDetails.dash.yml
# packages/sonataflow-operator/PROJECT
PROJECT
Expand Down
75 changes: 44 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

---

The **[KIE Community](http://kie.org)** is a home for leading Open Source projects that play a role in delivering solutions around Business Automation and Artificial Intelligence in the Cloud.
**[Apache KIE](http://kie.apache.org)** is a home for leading Open Source projects that play a role in delivering solutions around Business Automation and Artificial Intelligence in the Cloud.

[![GitHub Stars](https://img.shields.io/github/stars/apache/incubator-kie-tools.svg)](https://github.com/apache/incubator-kie-tools/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/apache/incubator-kie-tools.svg)](https://github.com/apache/incubator-kie-tools/network/members)
Expand All @@ -29,7 +29,7 @@ The **[KIE Community](http://kie.org)** is a home for leading Open Source projec
[![License](https://img.shields.io/github/license/apache/incubator-kie-tools.svg)](https://github.com/apache/incubator-kie-tools/blob/main/LICENSE)
[![Twitter Follow](https://img.shields.io/twitter/follow/KieCommunity.svg?label=Follow&style=social)](https://twitter.com/KieCommunity?lang=en)

This repository contains tooling applications and libraries for KIE projects.
This repository contains tooling applications and libraries for Apache KIE projects.

## Contribute

Expand All @@ -43,9 +43,9 @@ This repository contains tooling applications and libraries for KIE projects.
>
> **Nix development environment**: A _devbox_ configuration is provided to automatically setup all the tools below. Read more in [here](./repo/NIX_DEV_ENV.md).

To build and test all packages of the Apache KIE Tools project, you're going to need:
To build and test all packages on this repository, you're going to need:

- Node `20` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_
- Node.js `22` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_
- pnpm `9.3.0` _(To install, follow these instructions: https://pnpm.io/installation#using-npm)_
- Maven `3.9.6`
- Java `17`
Expand All @@ -62,30 +62,22 @@ To build and test all packages of the Apache KIE Tools project, you're going to

#### Step 1: Bootstrap

Bootstrapping installs the necessary dependencies for each package.
Installs the necessary 3rd party dependencies and links packages of this repository together.

- `pnpm bootstrap` --> Will bootstrap all packages
- `pnpm bootstrap [pnpm-filter]` --> Will bootstrap packages filtered by [`pnpm` filter](https://pnpm.io/filtering)
- `pnpm bootstrap [pnpm-filter]` --> Will bootstrap packages filtered by [`pnpm`-filter](https://pnpm.io/filtering)
- > E.g.,
>
> `pnpm bootstrap -F dmn-editor...` bootstraps the `dmn-editor` package and its dependencies.

> **ℹ️ NOTE**
>
> If you plan on running Playwright tests, set the `PLAYWRIGHT_BASE__installDeps` environment variable to `true` before running the command above.
>
> `PLAYWRIGHT_BASE__installDeps=true pnpm bootstrap`.
>
> This will install all Playwright dependencies (such as browsers engines and OS-specific libraries).

#### Step 2: Build

- Dev

- `pnpm -r build:dev`
- Will build all packages for development. Skipping linters, tests, minifiers etc.
- `pnpm [pnpm-filter] build:dev`
- Will build packages filtered by [`pnpm` filter](https://pnpm.io/filtering)
- Will build packages filtered by [`pnpm`-filter](https://pnpm.io/filtering)
- > E.g.,
>
> `pnpm -F dmn-editor... build:dev` builds the `dmn-editor` package and its dependencies.
Expand All @@ -95,36 +87,57 @@ Bootstrapping installs the necessary dependencies for each package.
- `pnpm -r build:prod`
- Will build all packages for production. Optimizers will run, binaries will be produced for multiple architectures etc.
- `pnpm [pnpm-filter] build:prod`
- Will build packages filtered by [`pnpm` filter](https://pnpm.io/filtering)
- Will build packages filtered by [`pnpm`-filter](https://pnpm.io/filtering)
- > E.g.,
>
> `pnpm -F dmn-editor... build:prod` builds the `dmn-editor` package and its dependencies.

- Changed
- `pnpm -F '...[HEAD]' build:dev`; or
- `pnpm -F '...[HEAD]' build:prod`
- Will build changed and affected packages based on your local changes. Useful for verifying that you didn't break anything.
- Local changes
- `pnpm run on-affected [cmd]` (_alias for `pnpm -F '...[HEAD]'`_); or
- `pnpm run on-affected-only [cmd]` (_alias for `pnpm -F '...^[HEAD]'`_); or
- `pnpm run on-changed [cmd]` (_alias for `pnpm -F '[HEAD]'`_); or
- `pnpm run on-changed-deps-only [cmd]` (_alias for `pnpm -F '[HEAD]^...'`_);
- > E.g.,
>
> If you have local changes (staged or unstaged) done to the `dmn-editor` package:
>
> - `pnpm run on-affected build:dev`
> - builds the `dmn-editor` package and all packages that depend on it.
> - `pnpm run on-affected-only build:dev`
> - doesn't build the `dmn-editor` package, but builds all packages that depend on it.
> - `pnpm run on-changed build:dev`
> - builds the `dmn-editor` package and nothing else.
> - `pnpm run on-changed-deps-only build:dev`
> - doesn't build the `dmn-editor` package, but builds all packages that it depends on.

> **ℹ️ NOTE**
>
> The Apache KIE Tools build is parameterized by several Environment Variables. For an extensive list of these variables, please see the list printed by the `bootstrap` step.
> This repository's build is parameterized by several Environment Variables. For an extensive list of these variables, please see the list printed by the `bootstrap` step.
>
> - To enable the examples build: `export KIE_TOOLS_BUILD__buildExamples=true`
> - To enable container images build: `export KIE_TOOLS_BUILD__buildContainerImages=true`
> - To enable Examples build: `export KIE_TOOLS_BUILD__buildExamples=true`
> - To enable Container images build: `export KIE_TOOLS_BUILD__buildContainerImages=true`
> - To enable E2E tests: `export KIE_TOOLS_BUILD__runEndToEndTests=true`

> **ℹ️ NOTE**
>
> Ubuntu 22.04 is the only OS that nativelly supports running E2E tests and by default the E2E tests will run using a Docker container. To run the tests natively in your OS please install the Playwright dependencies during the Bootstrap phase by adding the `PLAYWRIGHT_BASE__installDeps=true` environment variable. Additionally, tweak the containerized tests variable to `false` (`KIE_TOOLS_BUILD__containerizedEndToEndTests=false`). Please refer to @kie-tools/playwright-base [README](./packages/playwright-base/README.md).

> **ℹ️ NOTE**
>
> Final artifacts will be in `{packages,examples}/*/dist` directories.

> **ℹ️ NOTE**
>
> For more information about how this repository works, please refer to [the `kie-tools` Manual](./repo/MANUAL.md)

---

## Reproducible Builds for _maven-based_ packages

It is mandatory that any _maven-based_ package that releases artifacts runs [Reproducible Builds](https://reproducible-builds.org/)
It is mandatory that any _Maven-based_ package that releases artifacts runs [Reproducible Builds](https://reproducible-builds.org/)
to build it's artifacts, in this case, in our `build:prod` scripts.

`@kie-tools/maven-base` provides the `reproducible-build` `maven` profile to enable _Reproducible Builds_ in our builds.
`@kie-tools/maven-base` provides the `reproducible-build` profile to enable _Reproducible Builds_ in our builds.
To use it follow the steps:

- Make sure the `package.json` depends on `@kie-tools/maven-base`:
Expand All @@ -137,7 +150,7 @@ To use it follow the steps:
}
```

- Make the package `pom.xml` has `kie-tools-maven-base` as a parent and declares the `project.build.outputTimestamp` property like:
- Make sure the package `pom.xml` has `kie-tools-maven-base` as a parent and declares the `project.build.outputTimestamp` property like:

```xml
<project>
Expand Down Expand Up @@ -171,23 +184,23 @@ To use it follow the steps:
> we use to generate deployable artifacts using the dynamic `${revision}` variable. You can check the full list of banned
> plugins [here](https://maven.apache.org/plugins-archives/maven-artifact-plugin-3.4.1/plugin-issues.html).
> The issue that caused the ban [flatten-maven-plugin/issues/256](https://github.com/mojohaus/flatten-maven-plugin/issues/256) was a result
> of change in `maven` behaviour between `v3.8.1` and `v3.8.2`, and isn't a problem on the `maven-flatten-plugin`.
> of change in Maven behaviour between `v3.8.1` and `v3.8.2`, and isn't a problem on the `maven-flatten-plugin`.
> Actually, in later versions of the `maven-artifact-plugin` the ban got revoked.
> Having this in mind, and due to the fact that `kie-tools` requires newer `maven` versions, our _Reproducible Builds_ require
> Having this in mind, and due to the fact that `kie-tools` requires newer Maven versions, our _Reproducible Builds_ require
> temporarily overriding the list of banned plugins, until we upgrade to a newer `maven-artifact-plugin` version.
> This will be addressed by https://github.com/apache/incubator-kie-issues/issues/1371

---

## Applications

The Apache KIE Tools project contains several applications. To develop each one of them individually, refer to the instructions below.
This repository contains several applications. To develop each one of them individually, refer to the instructions below.

#### VS Code Extension (DMN, BPMN, SceSim, and PMML Editors)

1. After you've successfully built the project following the instructions above, open the `packages/kie-editors-dev-vscode-extension` folder on VS Code. Use a new VS Code window so that the `packages/kie-editors-dev-vscode-extension` folder shows up as root in the VS Code explorer.
2. From there, you can Run the extension or the end-to-end 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@^5.92.1 webpack-cli@^4.10.0`, but `sudo` may be required depending on your installation.
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@^5.94.0 webpack-cli@^4.10.0`, but `sudo` may be required depending on your installation.
4. **Remember!** If you make changes to any package other than `packages/kie-editors-dev-vscode-extension`, you have to manually rebuild them before relaunching the extension on VS Code.

#### VS Code Extension (Serverless Workflow Editor)
Expand Down Expand Up @@ -243,7 +256,7 @@ The Apache KIE Tools project contains several applications. To develop each one

#### Stunner Editors

The `stunner-editors` package contains the BPMN, DMN, and SceSim Editors that are used in many applications of Apache KIE Tools.
The `stunner-editors` package contains the BPMN, DMN, and SceSim Editors that are used in many applications of this repository.
After cloning the repo, start with a fresh build.

- `pnpm bootstrap -F @kie-tools/stunner-editors...`
Expand Down
2 changes: 1 addition & 1 deletion _intellij-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Once prompted by IntelliJ IDEA, select "Open" and choose this folder.

After you're done importing the project, please also configure the code formatter (or Code Style, in IntelliJ IDEA terminology.)

Apache KIE Tools uses an Eclipse Formatter XML, so please install https://plugins.jetbrains.com/plugin/6546-adapter-for-eclipse-code-formatter and configure it like in the screenshot below:
Apache KIE uses an Eclipse Formatter XML, so please install https://plugins.jetbrains.com/plugin/6546-adapter-for-eclipse-code-formatter and configure it like in the screenshot below:

<img src="docs/intellij-eclipse-formatter-config.png" alt="Configure Eclipse formatter" style="width:600px" />

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"bootstrap:root": "pnpm install --workspace-root --strict-peer-dependencies=false -F kie-tools-root...",
"format": "prettier --write .",
"format:check": "prettier --check .",
"on-affected": "pnpm -F '...[HEAD]'",
"on-affected-only": "pnpm -F '...^[HEAD]'",
"on-changed": "pnpm -F '[HEAD]'",
"on-changed-deps-only": "pnpm -F '[HEAD]^...'",
"prepare": "husky install",
"update-kogito-version-to": "kie-tools--update-kogito-version-to",
"update-stream-name-to": "kie-tools--update-stream-name-to",
Expand Down
10 changes: 9 additions & 1 deletion packages/boxed-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
"start:linux:darwin": "cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm kie-tools--storybook --storybookArgs=\"dev --no-open\"",
"start:win32": "pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env boxedExpressionComponent.storybook.port) pnpm kie-tools--storybook --storybookArgs='dev --no-open'",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm test-e2e:condition\"",
"test-e2e:condition": "run-script-if --bool \"$(build-env endToEndTests.containerized)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:container:start\" --else \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"",
"test-e2e:container:bash": "docker exec -it kie-tools-playwright-containerization-boxed-expression-component /bin/bash -c \"cd incubator-kie-tools/packages/boxed-expression-component && exec /bin/bash\"",
"test-e2e:container:down": "docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml down",
"test-e2e:container:run": "docker exec -i kie-tools-playwright-containerization-boxed-expression-component /bin/bash -c \"cd incubator-kie-tools/packages/boxed-expression-component && pnpm test-e2e:run\"",
"test-e2e:container:shell": "start-server-and-test 'pnpm start' http://localhost:$(build-env boxedExpressionComponent.storybook.port)/iframe.html 'pnpm test-e2e:container:up && pnpm test-e2e:container:bash'",
"test-e2e:container:start": "start-server-and-test 'pnpm start' http://localhost:$(build-env boxedExpressionComponent.storybook.port)/iframe.html 'pnpm test-e2e:container:up && pnpm test-e2e:container:run'",
"test-e2e:container:up": "cross-env STREAM_NAME=$(build-env root.streamName) KIE_TOOLS_PLAYWRIGHT_CONTAINER__PORT=$(build-env boxedExpressionComponent.storybook.port) run-script-if --bool \"${CI}\" --then \"docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml -f ./tests-e2e/__containerization__/playwright-docker-compose.ci.yml up -d\" --else \"docker compose -f ./tests-e2e/__containerization__/playwright-docker-compose.yml up -d\"",
"test-e2e:open": "pnpm exec playwright show-report dist-tests-e2e/reports",
"test-e2e:run": "pnpm exec playwright test"
},
Expand Down Expand Up @@ -75,6 +82,7 @@
"jest-when": "^3.6.0",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"start-server-and-test": "^2.0.3",
"storybook": "^7.3.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/boxed-expression-component/src/@types/react-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ declare module "react-table" {
label: string;
/** Custom Element to be rendered in place of the column label */
headerCellElement?: JSX.Element;
/** Additional Element to be rendered in the Header Cell top right corner */
headerCellElementExtension?: JSX.Element;
/** It makes this column header inline editable (with double-click) */
isInlineEditable?: boolean;
/** Column data type */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import {
boxedExpressionEditorI18nDefaults,
} from "./i18n";
import { ExpressionDefinitionRoot } from "./expressions/ExpressionDefinitionRoot/ExpressionDefinitionRoot";
import { BoxedExpressionEditorContextProvider } from "./BoxedExpressionEditorContext";
import { FeelVariables } from "@kie-tools/dmn-feel-antlr4-parser";
import { BoxedExpressionEditorContextProvider, OnExpressionChange } from "./BoxedExpressionEditorContext";
import { FeelIdentifiers } from "@kie-tools/dmn-feel-antlr4-parser";
import "./base-no-reset-wrapped.css";
import "./@types/react-table";

export type OnRequestFeelVariables = () => FeelVariables;
export type OnRequestFeelIdentifiers = () => FeelIdentifiers;

export interface BoxedExpressionEditorProps {
/** The API methods which BoxedExpressionEditor component can use to dialog with GWT layer. Although the GWT layer is deprecated, and the new DMN Editor does not have GWT, some methods here are still necessary. */
Expand All @@ -46,7 +46,7 @@ export interface BoxedExpressionEditorProps {
/** The boxed expression itself */
expression: Normalized<BoxedExpression> | undefined;
/** Called every time something changes on the expression */
onExpressionChange: React.Dispatch<React.SetStateAction<Normalized<BoxedExpression> | undefined>>;
onExpressionChange: OnExpressionChange;
/** KIE Extension to represent IDs of individual columns or expressions */
widthsById: Map<string, number[]>;
/** Called every time a width changes on the expression */
Expand All @@ -62,8 +62,8 @@ export interface BoxedExpressionEditorProps {
evaluationHitsCountById?: Map<string, number>;
/** The containing HTMLElement which is scrollable */
scrollableParentRef: React.RefObject<HTMLElement>;
/** Parsed variables used for syntax coloring and auto-complete */
onRequestFeelVariables?: OnRequestFeelVariables;
/** Parsed identifiers used for syntax coloring and auto-complete */
onRequestFeelIdentifiers?: OnRequestFeelIdentifiers;
/** Hide DMN 1.4 boxed expressions */
hideDmn14BoxedExpressions?: boolean;
}
Expand All @@ -80,8 +80,8 @@ export function BoxedExpressionEditor({
isResetSupportedOnRootExpression,
scrollableParentRef,
pmmlDocuments,
onRequestFeelIdentifiers,
evaluationHitsCountById,
onRequestFeelVariables,
widthsById,
onWidthsChange,
hideDmn14BoxedExpressions,
Expand All @@ -105,8 +105,8 @@ export function BoxedExpressionEditor({
isReadOnly={isReadOnly}
dataTypes={dataTypes}
pmmlDocuments={pmmlDocuments}
onRequestFeelIdentifiers={onRequestFeelIdentifiers}
evaluationHitsCountById={evaluationHitsCountById}
onRequestFeelVariables={onRequestFeelVariables}
widthsById={widthsById}
hideDmn14BoxedExpressions={hideDmn14BoxedExpressions}
>
Expand Down
Loading
Loading