diff --git a/.gitignore b/.gitignore index 1b292a0ed77..60f77bc76d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,21 @@ +### +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + ## ci !/.ci @@ -187,18 +205,18 @@ packages/kie-sandbox-fs/coverage packages/kie-sandbox-fs/junit packages/kie-sandbox-fs/*-0.0.0-development.tgz -# kogito-serverless-operator +# sonataflow-operator # These files are generated by Cekit, we can ignore the operator-sdk ones. -packages/kogito-serverless-operator/bundle.Dockerfile -packages/kogito-serverless-operator/Dockerfile +packages/sonataflow-operator/bundle.Dockerfile +packages/sonataflow-operator/Dockerfile # Test binary, built with `go test -c` -packages/kogito-serverless-operator/**/*.test +packages/sonataflow-operator/**/*.test # Output of the go coverage tool, specifically when used with LiteIDE -packages/kogito-serverless-operator/**/*.out +packages/sonataflow-operator/**/*.out # Build -packages/kogito-serverless-operator/bin/ -packages/kogito-serverless-operator/target/ -packages/kogito-serverless-operator/e2e-test-report.xml +packages/sonataflow-operator/bin/ +packages/sonataflow-operator/target/ +packages/sonataflow-operator/e2e-test-report.xml #angular **/.angular @@ -293,12 +311,12 @@ packages/dmn-marshaller/**/ts-gen packages/scesim-marshaller/**/ts-gen # kogito-sf-{builder|devmode}-image: excluding module build folders -!packages/kogito-swf-common/resources/**/build -!packages/kogito-swf-builder/resources/**/build -!packages/kogito-swf-devmode/resources/**/build -!packages/kogito-swf-common/test-resources/ -!packages/kogito-swf-builder/test-resources/ -!packages/kogito-swf-devmode/test-resources/ +!packages/sonataflow-image-common/resources/**/build +!packages/sonataflow-builder-image/resources/**/build +!packages/sonataflow-devmode-image/resources/**/build +!packages/sonataflow-image-common/test-resources/ +!packages/sonataflow-builder-image/test-resources/ +!packages/sonataflow-devmode-image/test-resources/ __pycache__ packages/python-venv/venv diff --git a/.idea/jsLinters/eslint.xml b/.idea/jsLinters/eslint.xml index 2319055c20a..bc2bd7823c2 100644 --- a/.idea/jsLinters/eslint.xml +++ b/.idea/jsLinters/eslint.xml @@ -1,4 +1,22 @@ + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 67f800dded4..565e3e5413b 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,4 +1,22 @@ + diff --git a/DISCLAIMER b/DISCLAIMER index 1d3c541c552..08aef0bfcf4 100644 --- a/DISCLAIMER +++ b/DISCLAIMER @@ -15,6 +15,11 @@ aware of (note that this list, by definition, is likely to be incomplete): * Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header * +* Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +* Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + If you are planning to incorporate this work into your product/project, please be aware that you will need to conduct a thorough licensing review to determine the overall implications of including this work. For the current status of this diff --git a/KOGITO_UPGRADE_PROCESS.md b/KOGITO_UPGRADE_PROCESS.md index f7052822622..4b74a31d4ef 100644 --- a/KOGITO_UPGRADE_PROCESS.md +++ b/KOGITO_UPGRADE_PROCESS.md @@ -1,3 +1,20 @@ + + This guide aims to assist you in the process of upgrading all Kogito dependencies versions present in the kie-tools repository. Typically, these dependencies point to backend-side modules or images @@ -56,7 +73,6 @@ You can find an example of the Java / Maven versions upgrade in [this PR](https: The Quarkus version is present in the following file categories: -- `install.js` files - `root-env/env/index.js` file - go test files @@ -70,16 +86,7 @@ You can find an example of the Quarkus upgrade in [this PR](https://github.com/a # Upgrading Kogito -The Kogito version is present in the following file categories: - -- `install.js` files -- `root-env/env/index.js` file -- `package.json` files (eg. jit-executor reference in `extended-service`) - -The best (and fastest) way to catch all the Kogito versions is to perform a search a grep (or the IDE integrated search) and replace it with the new version. So, as a key, you can use: - -- The version number: `X.Y.Z` or `X.Y.Z-YYYYMMDD-SNAPSHOT` format (eg. `10.0.0` or `10.1.0-20240424-SNAPSHOT`); -- Images references: `main-YYYY-MM-DD` (Daily builds) or `X.Y.Z-YYYYMMDD` (Weekly builds) format (eg. `main-2024-04-24` or `10.1.0-20240424` in case of snapshot version) +In the root directory, run `pnpm update-kogito-version-to --maven [version] --images-tag [tag]`. Of course, a new Kogito version may lead to incompatibilities in the code and with other dependencies. In such a case, an investigation and evetually a fix is required to complete the process. @@ -98,3 +105,14 @@ To test the `kie-sandbox-quarkus-accelerator` module with the updated version, p - Run `pnpm -F @kie-tools/online-editor... build:dev` and `pnpm -F @kie-tools/online-editor start` to test it. You can find an example of the Kogito version upgrade in [this PR](https://github.com/apache/incubator-kie-sandbox-quarkus-accelerator/pull/8) + +# Upgrading GraphQL schemas in `@kie-tools/runtime-tools-process-gateway-api`& `@kie-tools/runtime-tools-swf-gateway-api` + +The following commands will help to sync up the gateway apis the GraphQL schema with the new Kogito Data Index GraphQL schema: + +- Start a blank Data Index Container, for example `docker run -p8180:8080 docker.io/apache/incubator-kie-kogito-data-index-ephemeral:{$KOGITO_VERSION}` +- Run `pnpm -F @kie-tools/runtime-tools-process-gateway-api graphql:codegen` +- Run `pnpm -F @kie-tools/runtime-tools-swf-gateway-api graphql:codegen` + +After upgrading the GraphQL schemas it is recommended to verify that the incoming changes aren't breaking the consoles or +devui's and fix any possible conflict if needed. diff --git a/NIX_DEV_ENV.md b/NIX_DEV_ENV.md index ea3180e2d04..c18f8d30458 100644 --- a/NIX_DEV_ENV.md +++ b/NIX_DEV_ENV.md @@ -1,3 +1,20 @@ + + ## Nix-based development environment shell ### Installing diff --git a/README.md b/README.md index e7d54c75da8..181832ed529 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ + +

--- diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index d5da053ab8e..1ce6bffb4b3 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -1,3 +1,20 @@ + + Release workflow (post 0.13.0) Make sure an associated tag to the release is created on: diff --git a/docs/kie.svg b/docs/kie.svg index dba5a247bd4..4259d92dc97 100644 --- a/docs/kie.svg +++ b/docs/kie.svg @@ -1 +1,38 @@ -kie_horizontal_rgb_fullcolor_default \ No newline at end of file + + + + + + + kie_horizontal_rgb_fullcolor_default + + + + + + + + + + + + diff --git a/examples/base64png-editor-chrome-extension/README.md b/examples/base64png-editor-chrome-extension/README.md index 343f808c9b5..c9662c6b32e 100644 --- a/examples/base64png-editor-chrome-extension/README.md +++ b/examples/base64png-editor-chrome-extension/README.md @@ -1,3 +1,20 @@ + + ## Base64 PNG Editor - Chrome Extension You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8a-%e2%80%8ahow-to-create-a-chrome-extension-for-a-custom-editor.html) a step-by-step tutorial of how this Chrome Extension was built. @@ -23,3 +40,33 @@ pnpm serve-envelope It will run a server exposing your `dist/` folder on the `localhost:9000`. It's necessary to access your `localhost:9000`, and enable access to it. This step is required, so the extension can access the envelope located on `dist/envelope/index.html`. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/base64png-editor-chrome-extension/static/resources/kie_icon_rgb_fullcolor_default.svg b/examples/base64png-editor-chrome-extension/static/resources/kie_icon_rgb_fullcolor_default.svg index 4cef559984a..e0c8c45f283 100644 --- a/examples/base64png-editor-chrome-extension/static/resources/kie_icon_rgb_fullcolor_default.svg +++ b/examples/base64png-editor-chrome-extension/static/resources/kie_icon_rgb_fullcolor_default.svg @@ -1 +1,35 @@ -kie_icon_rgb_fullcolor_default \ No newline at end of file + + + + + + + kie_icon_rgb_fullcolor_default + + + + + + + + + diff --git a/examples/base64png-editor-vscode-extension/README.md b/examples/base64png-editor-vscode-extension/README.md index 31c9a41d849..ef8dd0ce8ab 100644 --- a/examples/base64png-editor-vscode-extension/README.md +++ b/examples/base64png-editor-vscode-extension/README.md @@ -1,3 +1,20 @@ + + ## Base64 PNG Editor - Visual Studio Code Extension You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8a-%e2%80%8ahow-to-create-a-vs-code-extension-for-the-custom-editor.html) a step-by-step tutorial of how this VS Code Extension was built. @@ -28,3 +45,33 @@ code . - Installing VSIX The `pnpm build:prod` generate a vsix file on the `/dist` folder. Open your VS Code, and install it. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/base64png-editor/README.md b/examples/base64png-editor/README.md index f8be5b71f90..62b44924c7c 100644 --- a/examples/base64png-editor/README.md +++ b/examples/base64png-editor/README.md @@ -1,3 +1,20 @@ + + # Base64 PNG Editor You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8a-%e2%80%8ahow-to-create-a-custom-editor-in-a-react-application.html) a step-by-step tutorial of how this custom Editor was built. @@ -5,3 +22,33 @@ You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8 This package is a Custom Editor made with React, which enables you to edit a `.base64png` file. A `.base64png` file is a PNG image converted to base64 without its headers (e.g. data:image/png;base64). + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/commit-message-validation-service/README.md b/examples/commit-message-validation-service/README.md index fc2aba4d341..8f074021ab4 100644 --- a/examples/commit-message-validation-service/README.md +++ b/examples/commit-message-validation-service/README.md @@ -1,3 +1,20 @@ + + ## Commit message validation service Provides a simple service to check for patterns in a commit message. @@ -29,3 +46,33 @@ Provides a simple service to check for patterns in a commit message. "reasons": []string | undefined } ``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/dashbuilder/kitchensink/Kitchensink.dash.yml b/examples/dashbuilder/kitchensink/Kitchensink.dash.yml index 12981cdd169..23f64a8a26a 100644 --- a/examples/dashbuilder/kitchensink/Kitchensink.dash.yml +++ b/examples/dashbuilder/kitchensink/Kitchensink.dash.yml @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + pages: - name: index properties: diff --git a/examples/drools-process-usertasks-quarkus-example/README.md b/examples/drools-process-usertasks-quarkus-example/README.md index 493e71e7191..f7e844ad2ba 100644 --- a/examples/drools-process-usertasks-quarkus-example/README.md +++ b/examples/drools-process-usertasks-quarkus-example/README.md @@ -1,3 +1,20 @@ + + # Process user task orchestration ## Description @@ -213,3 +230,33 @@ You should see a similar message after performing the second line approval after } } ``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/drools-process-usertasks-quarkus-example/pom.xml b/examples/drools-process-usertasks-quarkus-example/pom.xml index 2e4e30a09b3..3ab00e2fc76 100644 --- a/examples/drools-process-usertasks-quarkus-example/pom.xml +++ b/examples/drools-process-usertasks-quarkus-example/pom.xml @@ -1,23 +1,21 @@ drools-process-usertasks-quarkus-example Kie-Tools Example :: Process with Usertasks Quarkus Kogito user tasks orchestration - Quarkus + + + + + org.jbpm + jbpm-quarkus-devui-bom + ${project.version} + pom + import + + + + io.quarkus @@ -50,7 +61,6 @@ org.jbpm jbpm-quarkus-devui - ${project.version} io.quarkus diff --git a/examples/drools-process-usertasks-quarkus-example/src/main/resources/META-INF/processSVG/approvals.svg b/examples/drools-process-usertasks-quarkus-example/src/main/resources/META-INF/processSVG/approvals.svg index b5ce19ebbca..9284cb85b2d 100644 --- a/examples/drools-process-usertasks-quarkus-example/src/main/resources/META-INF/processSVG/approvals.svg +++ b/examples/drools-process-usertasks-quarkus-example/src/main/resources/META-INF/processSVG/approvals.svg @@ -1 +1,183 @@ -EndStartProcessSecond Line Approval First Line Approval \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + End + + + + + + + + + + + + + + + + + + + + + + + StartProcess + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Second Line + + + Approval + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + First Line + + + Approval + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/drools-process-usertasks-quarkus-example/src/main/resources/org/acme/travels/approval.bpmn b/examples/drools-process-usertasks-quarkus-example/src/main/resources/org/acme/travels/approval.bpmn index 275d148f7ac..5ec0a0d0ae9 100644 --- a/examples/drools-process-usertasks-quarkus-example/src/main/resources/org/acme/travels/approval.bpmn +++ b/examples/drools-process-usertasks-quarkus-example/src/main/resources/org/acme/travels/approval.bpmn @@ -1,4 +1,22 @@ + diff --git a/examples/jbpm-compact-architecture-example/README.md b/examples/jbpm-compact-architecture-example/README.md new file mode 100644 index 00000000000..c754d55ceb6 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/README.md @@ -0,0 +1,555 @@ +# jBPM Compact Architecture Quarkus Example + +## Description + +This example showcases a basic implementation of the **Hiring** process that drives a _Candidate_ through different +interviews until he gets hired. + +This quickstart project shows a simple example user task orchestration including the use of DMN decisions to +generate the candidate offer and tºimers to skip User Tasks. + +This example also demonstrates how to configure the whole _Kogito_ environment using the new _Compact Architecture_ that +enable simplifying the communication among _Kogito_ services removing the need of events (Kafka/HTTP) between them. This can +be achieved using the following _Quarkus_ addons: + +- `kogito-addons-quarkus-data-index-persistence-postgresql`: enables the _Kogito Runtime_ persisting directly into the + _Data-Index_ database. +- `kogito-addons-quarkus-jobs`: enables collocating the _Jobs Service_ inside the _Kogito Runtime_. + +## The Java models + +The **Hiring** process uses two POJOs to handle the process data, both of them can be found in the _org.kie.kogito.hr_ package. + +The `CandidateData` POJO is the input of the process. It represents the person that wants to get the job. + +```java +public class CandidateData { + + private String name; // Name of the candidate + private String lastName; // Last name of the candidate + private String email; // Email of the candidate + private Integer experience; // Years of experience + private List skills; // List of technical skills + + // Constructors, setters, getters... +} +``` + +The `Offer` POJO is the output of the process and represents the job offer that will be sent to the candidate. +It will be automatically calculated during the process execution depending on the candidate years of experience & skills. + +```java +public class Offer { + + private String category; // Job category based on the candidate experience + private Integer salary; // Salary based on the candidate experience and skills + + // Constructors, setters, getters... +} +``` + +## The _New Hiring Offer_ DMN + +This example makes use of the _New Hiring Offer_ DMN to generate a base offer for the `Candidate`. The DMN looks like this: + +In this simple DMN we have an `Offer` _Decision_, that will generate the candidate offer, which +has a requirement of a `CandidateData` _Input Data_. + +
+
+ DMN Diagram +
New Hiring Offer DMN diagram
+
+
+ +The DMN defines the following data types (`tCandidateData` & `tOffer` ) matching the POJOs defined in the project +(`CandidateData.java` & `Offer.java`): + +
+
+ DMN Type Definitions +
New Hiring Offer DMN types
+
+
+ +As expected, `CandidateData` _Input Data_ & `Offer` _Decision_ have a `tCandidateData` data + +The `Offer` decision uses the following _Boxed Expression_ to generate the `tOffer`: + +
+
+ DMN Decision +
New Hiring Offer DMN decision
+
+
+ +## The Hiring Process + +### Process variables + +The process handles the following _Variables_: + +| Variable | Type | Tags | Description | +| ----------------- | --------------------------------- | ------------ | ------------------------------------------------- | +| **candidateData** | `org.kie.kogito.hr.CandidateData` | **input** | The candidate data | +| **offer** | `org.kie.kogito.hr.Offer` | **output** | The generated candidate offer | +| **hr_approval** | `Boolean` | **internal** | Determines that HR department approves the hiring | +| **it_approval** | `Boolean` | **internal** | Determines that IT department approves the hiring | + +### The BPMN Process + +
+
+ Hiring Process Diagram +
Hiring Process Diagram
+
+
+ +The process starts receiving the `CandidateData` as an input and storing it into the `candidateData` variable, and if the +candidate meets two minimal requirements, the process will continue and reach the **Generate base offer**, otherwise the +candidate application will be denied and the process will complete without sending the `offer` to the candidate. + +The **Generate base offer** is a _Business Rule Task_ that will use the _New Hiring Offer_ decision defined in the +`NewHiringOffer.dmn` to generate the an `Offer` based on the candidate experience and skills. The task takes the `candidateData` +as an input and will produce an instance of `org.kie.kogito.hr.Offer` that will be stored in the `offer` variable. + +
+
+ Offer assignments +
Generate base Offer data assignments
+
+
+ +After the `offer` has been generated, the process will jump into the **HR Interview** _User Task_, where the candidate we'll +be interviewed by the _HR_ department. The task takes the `candidateData` and `offer` as inputs and as an output will produce +the `hr_approve` boolean and an updated `offer`. + +
+
+ HR Interview assignments +
HR Interviewr task data assignments
+
+
+ +The **HR Interview** _User Task_ also has a _Boundary Timer Event_ that will prevent the task to delay and will cancel the +task after certain time (for example purpose just 3 minutes). This _Boundary Timer Event_ will schedule a Job in the Jobs Service +that when trigger will notify the _Kogito Runtime_ to cancel the task and deny the application. + +If **HR Interview** successfully completed, the process will jump into the **IT Interview** _User Task_. Again the candidate +we'll have a second interview with the _IT_ department. Again, this task will take the `candidateData` and `offer` as inputs +but as an output will produce the `it_approve` boolean. + +
+
+ IT Interview assignments +
IT Interviewr task data assignments
+
+
+ +Once both tasks are completed, if the candidate got the approvals from _HR_ & _IT_ (both `hr_interview` & `hr_interview` being true) +the process will jump into the **Send Offer to Candidate** _Script Task_ that will notify the candidate about the offer +and the process will end. + +> **NOTE:** for simplicity, all the _User Tasks_ in this example are assigned to the _jdoe_ user present in the keycloak configuration + +## Running the example + +### Prerequisites + +- Java 17+ installed +- Environment variable JAVA_HOME set accordingly +- Maven 3.9.3+ installed +- Docker and Docker Compose to run the required example infrastructure. + +And when using native image compilation, you will also need: + +- GraalVM 20.3+ installed +- Environment variable GRAALVM_HOME set accordingly +- GraalVM native image needs as well native-image extension: https://www.graalvm.org/reference-manual/native-image/ +- Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too, please refer to GraalVM installation documentation for more details. + +### Infrastructure Services + +This quickstart provides a docker compose template that starts all the required services. This setup ensures that all services are connected with a default configuration. + +- PostgreSQL: 5432 +- Management Console: 8280 +- Task Console: 8380 +- Keycloak: 8480 +- PgAdmin: 8055 +- Kogito Example Service: 8080 + +To help bootstraping the Infrastructure Services, the example provides the `startServices.sh` script inside the _docker-compose_ +folder. + +> **_NOTE_**: the docker compose template requires using _extra_hosts_ to allow the services use the host network, this may +> carry some issues if you are using a **podman** version older than **4.7**. + +### Building & Running the example + +To build the example, on a Terminal, run the following command: + +```shell +mvn clean package -Pcontainer +``` + +This will build the example quarkus application and create a Docker image that will be started in the `docker-compose` template. + +To execute the full example (including consoles), open a Terminal and run the following command inside the `docker-compose` folder: + +```shell +sh startServices.sh +``` + +> **_IMPORTANT:_** if you are running this example on MacOs and you are not using **Docker Desktop**, please append +> the following entry in your `/etc/hosts` file to enable a good communication between al components. +> +> ``` +> 127.0.0.1 kubernetes.docker.internal +> ``` + +Additionally, if you want to start only the example and the minimal Infrastructure Services (PostgreSQL, Data-Index and Jobs Service), +you can run the same `startServices.sh` script but passing the `example` argument + +```shell +sh startServices.sh example +``` + +> **_NOTE:_** starting the Infrastructure Services, please consider running a `mvn clean package -Pcontainer` +> command on the project root before running the `startServices.sh` script for the first time or any time you modify the project. + +### Running the example in Development mode + +To run the example in Development mode, just run the following command in a Terminal: + +```shell +mvn clean package quarkus:dev -Pdevelopment +``` + +The Development Mode will embed all the needed Infrastructure Services (PostgreSQL, Data-Index & Jobs Service) and won't +require any extra step. + +The `development` profile includes the **Runtime Tools Quarkus Extension** that exposes a new section in the **Quarkus Dev-UI** +unifying the **Management Console** & **Task Console** functionalities. **Quarkus Dev-UI** is available at http://localhost:8080/q/dev + +> **_NOTE:_** For more information about how to work with Kogito Runtime Tools Quarkus Extension, please refer to the [Kogito Documentation](https://docs.kogito.kie.org/latest/html_single/#con-runtime-tools-dev-ui_kogito-developing-process-services) page. + +### Starting an instance of the Hiring Process + +Once the service is up and running you can make use of the **Hiring** application by a sending request to `http://localhost:8080/hiring`. + +Sending the following valid `CandidateData` will start a process instance that will land into the _HR Interview_ task: + +```json +{ + "candidateData": { + "name": "Jon", + "lastName": "Snow", + "email": "jon@snow.org", + "experience": 5, + "skills": ["Java", "Kogito", "Fencing"] + } +} +``` + +In a Terminal you can execute this curl command to start a **Hiring** process: + +```bash +curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d '{"candidateData": { "name": "Jon", "lastName": "Snow", "email": "jon@snow.org", "experience": 5, "skills": ["Java", "Kogito", "Fencing"]}}' +``` + +If everything went well you may get a response like: + +```json +{ + "id": "628e679f-4deb-4abc-9f28-668914c64ef9", + "offer": { + "category": "Senior Software Engineer", + "salary": 40450 + } +} +``` + +In the server log You may find a trace like: + +``` +New Hiring has been created for candidate: Jon Snow +################################### +Generated offer for candidate: Jon Snow +Job Category: Senior Software Engineer +Base salary: 40450 +################################### +``` + +Use the following `CandidateData` that don't match the minimal candidate requirements, to start a process that will automatically end: + +```json +{ + "candidateData": { + "name": "Jon", + "lastName": "Snow", + "email": "jon@snow.org", + "experience": 0, + "skills": [] + } +} +``` + +In a Terminal you can execute this curl command to start a **Hiring** process: + +```bash +curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d '{"candidateData": { "name": "Jon", "lastName": "Snow", "email": "jon@snow.org", "experience": 0, "skills": []}}' +``` + +If everything went well you may get a response like: + +```json +{ + "id": "3659601a-bb59-458d-859e-7892621ad5b7", + "offer": null +} +``` + +In the server log You may find a trace like: + +``` +New Hiring has been created for candidate: Jon Snow +################################### +Candidate Jon Snow don't meet the requirements for the position but we'll keep it on records for the future! +################################### +``` + +### Using Keycloak as Authentication Server + +In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as _Authentication Server_. It will be started as a part of the project _Infrastructure Services_, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. + +It will install the _Kogito Realm_ that comes with a predefined set of users: + +| Login | Password | Roles | +| ----- | -------- | ------------------- | +| admin | admin | _admin_, _managers_ | +| alice | alice | _user_ | +| jdoe | jdoe | _managers_ | + +Once Keycloak is started, you should be able to access your _Keycloak Server_ at [localhost:8480/auth](http://localhost:8480/auth) with _admin_ user. + +> **_NOTE:_** This example uses keycloak authentication to enable security only in the consoles not in runtime. + +### Using the Kogito Runtime Consoles to interact with the Hiring Process + +The following _step-by-step_ guides will show how to take advantage of both _Kogito Management Console_ and _Kogito Task Console_ +to operate with the instances of _Hiring_ process. + +To be able to follow the guides, please make sure that the example has been built using the `container` and all the _Infractructure Services_ +are started as explained in the [Building & Running the example](#building--running-the-example) section. + +> **_NOTE_**: For more information about how to operate with the _Kogito Runtime Consoles_, please refer to the +> [Management Console](https://docs.kogito.kie.org/latest/html_single/#con-management-console_kogito-developing-process-services) & [Task Console](https://docs.kogito.kie.org/latest/html_single/#con-task-console_kogito-developing-process-services) documentation. + +#### Show active Hiring process instance at Kogito Management Console + +_Kogito Management Console_ is the tool that enables the user to view and administrate process instances in our _Kogito application_. + +In this guide we'll see how to use the _Kogito Management Console_ to view the state of the Hiring process instances. + +1. With the example built and all the _Infrastructure Services_ running, let's start an instance of the _Hiring_ process. To do so, in a Terminal just run: + + ```bash + curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d '{"candidateData": { "name": "Jon", "lastName": "Snow", "email": "jon@snow.org", "experience": 5, "skills": ["Java", "Kogito", "Fencing"]}}' + ``` + + If everything went well, you should get a response like: + + ```json + { + "id": "064a6372-b5bb-4eff-a059-d7b24d4ac64a", + "offer": { "category": "Senior Software Engineer", "salary": 40450 } + } + ``` + + Which indicates that a new process instance with id **064a6372-b5bb-4eff-a059-d7b24d4ac64a** has been started. + +2. Now let's check the process instance state with the _Kogito Management Console_. To do so, in your browser navigate + to http://localhost:8280 and log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server). + + Once you are logged in, you should be redirected to the **Process Instances** page where you should be able to see + the started process instance in active state. + +
+
+ Process List +
Process List in Kogito Management Console
+
+
+ +3. Click on the instance **id** to navigate into the _Process Details_ page. In there you'll be able to see different panels displaying relevant information about the instance state, such as the _Diagram_, _Timeline_, _Details_, _Variables_, _Jobs_... + +
+
+ Process Details +
Process Instance Details page
+
+
+ + Now check the **Diagram** panel, in there you'll se the instance execution path. Notice that it's stopped _HR Interview_ _User Task_ waiting for some input from the user. + The task has _Timer_ that will skip the task if it's not completed in a given time (3 minutes in this example). You should be able to see the + associated _Job_ in the **Jobs** panel. Now, let's wait 3 minutes to see the timer in action. + +4. After 3 minutes, the scheduled _Job_ should have been executed, making the process instance skip the _HR Interview_ task. + In the **Process Details** page, click the _Refresh_ button to see the process instance state. + +
+
+ Process Details after timer +
Process Instance completed after the timer execution.
+
+
+ + Again, check the _Diagram_ panel to see the process instance execution path and the _HR Interview_ task + should have been skipped and the process instance continued its execution by following the _Application denied_ path + reaching the _Completed_ state. + + Notice in the _Jobs_ panel that the associated _Job_ has the **Executed** status. + +#### Complete Hiring process instances using Kogito Task Console + +When a _Kogito_ process reaches a _User Task_, the process execution stops waiting for the user input +that will enable the _User Task_ to finish and allowing the process execution to continue. + +_Kogito Task Console_ is the tool that enables the user interacting with the process _User Tasks_ and provide the necesary data +for the process to continue (usually wiht forms). + +In this guide, we'll see how to complete the process _User Tasks_ using the _Kogito Task Console_ to interact with the process _User Tasks_ +using the engine autogenerated forms. + +> **_NOTE_**: For simplicity, all the _User Tasks_ are assigned to the user _jdoe_. Please make sure you use the _jdoe_/_jdoe_ credentials +> when logging in the _Task Console_ + +1. With the example built and all the _Infrastructure Services_ running, let's start an instance of the _Hiring_ process. To do so, in a Terminal just run: + + ```bash + curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d '{"candidateData": { "name": "Jon", "lastName": "Snow", "email": "jon@snow.org", "experience": 5, "skills": ["Java", "Kogito", "Fencing"]}}' + ``` + + If everything went well, you should get a response like: + + ```json + { + "id": "3cf0d58f-a824-4046-ba6c-c2e79edc1df7", + "offer": { "category": "Senior Software Engineer", "salary": 40450 } + } + ``` + + Which indicates that a new process instance with id **3cf0d58f-a824-4046-ba6c-c2e79edc1df7** has been started. + +2. Let's check the process instance state. Again browse to http://localhost:8280 to access the _Kogito Management Console_, + and in the **Process List** click the **Id** column to open the **Process Details** page. + +
+
+ Process List +
Process List in Kogito Management Console
+
+
+ +
+
+ Process Details +
Process instance Details page.
+
+
+ + As expected, the process instance is stopped in the _HR Interview_ task waiting for some input from the user. Let's try to + complete the task. + +3. Now open the _Kogito Task Console_ by browsing to http://localhost:8380 and login using the **jdoe/jdoe** credentials. + After logging in, you'll be redirected to the **Task Inbox** page, which contains the list of _Active_ tasks assigned to the + logged user. In this case you should be able to see only the new _HR Interview_ task. + +
+
+ Task Inbox +
Task Inbox in Kogito Task Console
+
+
+ + Click on the **HR Interview** task to open the form and complete it! + +4. The **Task Form** is the main component to interact with User Tasks, it allows the user to provide the data required by + the task and transition it to the next phase, allowing the Process to continue. The **Task Form** is autogenerated based + on the _User Task_ data assignments. + +
+
+ HR Interview Form +
HR Interview Task Form
+
+
+ + _HR Interview_ Form allows you to edit the actual **Offer** that will be sent to the _Candidate_ and also approve or deny + the job application with the **Approve** checkbox. + + Now, check the **Approve** checkbox click the **Complete** button in order to submit the form and complete the task. If the + task could be successfully completed, a notification should appear in the screen and the form will stay in Read-Only mode. + +
+
+ HR Interview Form Notification +
HR Interview Success notification!
+
+
+ + With the _HR Interview_ task successfully completed the process has moved forward and reached the _IT Interview_ task. + + Optionally, you can check the process instance state in the **Kogito Management Console** and verify the current + execution path. + +
+
+ Process Details +
Process Instance details stopped in IT Interview
+
+
+ +5. Now is time to complete the **IT Interview** task and complete this Hiring process instance. In **Task Console**, go + back to **Task Inbox** and as expected, there you'll see that **HR Interview** is no longer available and a new + **IT Interview** has appeared. + +
+
+ Task Inbox +
IT Interview in Task Inbox
+
+
+ + As done in Step #3, click in the **IT Interview** task to open the task form. _IT Interview_ task only needs the + candidate **Approval** to be submitted. Please, check the **Approval** field and click the **Complete** button to + submit the form. + +
+
+ IT Interview Form +
IT Interview Task Form
+
+
+ +6. After the form is submitted the _IT Task_ should be completed and the process should continue, notifying the _Candidate_ + that he has succesfully finished the Hiring process. Please go back to **Task Inbox** to verify there are no other active tasks + waiting for you. + +
+
+ Empty Task Inbox +
Empty **Task Inbox** after completing the *IT Interview* Task
+
+
+ + You can also open use _Kogito Management Console_ to check the state of the process instance and verify that the + instance has been successfully completed. + +
+
+ Hiring Process succesfully completed +
Hiring Process sucessfully completed
+
+
diff --git a/examples/jbpm-compact-architecture-example/docker-compose/.gitignore b/examples/jbpm-compact-architecture-example/docker-compose/.gitignore new file mode 100644 index 00000000000..b6632dbda58 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/.gitignore @@ -0,0 +1,3 @@ +.env +svg/ +persistence/ \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/docker-compose/README.md b/examples/jbpm-compact-architecture-example/docker-compose/README.md new file mode 100644 index 00000000000..26834f79196 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/README.md @@ -0,0 +1,61 @@ +# Kogito and Infrastructure services + +To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services: + +- Postgresql +- PgAdmin +- Kogito Example Service (Only available if the example has been compiled using the `container` mvn profile eg: `mvn cleanp package -Dcontainer`) +- Kogito Management Console +- Kogito Task Console +- Keycloak + +The docker compose template provides three profiles to enable starting only the set of services you want to use. The profiles are: + +- **infra**: Starts only the minimal infrastructure to run the example (Postgresql, pgadmin, Kogito Data Index) +- **example**: Starts the services in _infra_ profile and the Kogito Example Service. Requires the example to be compiled using the `container` mvn profile eg: `mvn cleanp package -Dcontainer`. +- **full** (default): includes all the above and also starts the **Management Console**, **Task Console** and a **Keycloak** to handle the consoles authentication. Requires the example to be compiled using the `container` mvn profile eg: `mvn cleanp package -Dcontainer`. + +> NOTE: In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available +> in [here](https://docs.docker.com/compose/install/). + +## Starting the services + +Use the `startServices.sh` passing the docker profile you want to use as an argument. If no profile is provided the script will default to **full**. + +Eg: + +```shell +sh startServices.sh example +``` + +Once the services are started (depending on the profile), the following ports will be assigned on your local machine: + +- Postgresql: 5432 +- PgAdmin: 8055 +- Kogito Example Service: 8080 +- Kogito Management Console: 8280 +- Kogito Task Console: 8380 +- Keycloak: 8480 + +## Stopping and removing volume data + +To stop all services, simply run: + +```shell +docker compose stop +``` + +or + +```shell +docker compose down +``` + +to stop the services and remove the containers +docker-compose -f docker-compose-postgresql.yml stop + +For more details please check the Docker Compose documentation. + +```shell +docker compose --help +``` diff --git a/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml new file mode 100644 index 00000000000..95032f77340 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml @@ -0,0 +1,129 @@ +version: "3" + +services: + postgres: + container_name: postgres + image: postgres:16.1-alpine3.19 + profiles: ["infra", "example", "full"] + ports: + - "5432:5432" + volumes: + - ./sql:/docker-entrypoint-initdb.d:Z + healthcheck: + test: ["CMD", "pg_isready", "-q", "-d", "kogito", "-U", "kogito-user"] + timeout: 45s + interval: 10s + retries: 50 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + + pgadmin: + container_name: pgadmin + image: dpage/pgadmin4:8.2 + profiles: ["infra", "example", "full"] + ports: + - 8055:80 + depends_on: + - postgres + volumes: + - ./pgadmin/servers.json:/pgadmin4/servers.json + - ./pgadmin/pgpass:/pgadmin4/pgpass + entrypoint: > + /bin/sh -c " + cp -f /pgadmin4/pgpass /var/lib/pgadmin/; + chmod 600 /var/lib/pgadmin/pgpass; + /entrypoint.sh + " + environment: + PGADMIN_DEFAULT_EMAIL: user@kogito.org + PGADMIN_DEFAULT_PASSWORD: pass + PGADMIN_CONFIG_SERVER_MODE: "False" + PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False" + GUNICORN_ACCESS_LOGFILE: "/dev/null" + + jbpm-compact-architecture-example-service: + container_name: jbpm-compact-architecture-example-service + image: dev.local/${USER}/jppm-compact-architecture-example-service:${PROJECT_VERSION} + profiles: ["example", "full"] + ports: + - "8080:8080" + environment: + QUARKUS_HTTP_CORS_ORIGINS: "/.*/" + QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" + QUARKUS_DATASOURCE_REACTIVE_URL: "postgresql://postgres:5432/kogito" + QUARKUS_DATASOURCE_USERNAME: kogito-user + QUARKUS_DATASOURCE_PASSWORD: kogito-pass + QUARKUS_DATASOURCE_DB_KIND: postgresql + KOGITO_JOBS_SERVICE_URL: http://${DOCKER_GATEWAY_HOST}:8080 + KOGITO_SERVICE_URL: http://${DOCKER_GATEWAY_HOST}:8080 + KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST}:8080 + extra_hosts: + - "${DOCKER_GATEWAY_HOST}:host-gateway" + + keycloak: + container_name: keycloak + image: quay.io/keycloak/keycloak:legacy + profiles: ["full"] + ports: + - "8480:8080" + depends_on: + postgres: + condition: service_healthy + volumes: + - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito"] + interval: 2s + timeout: 1s + retries: 50 + environment: + DB_VENDOR: POSTGRES + DB_ADDR: postgres + DB_DATABASE: keycloak + DB_USER: kogito-user + DB_SCHEMA: public + DB_PASSWORD: kogito-pass + KEYCLOAK_USER: admin + KEYCLOAK_PASSWORD: admin + KEYCLOAK_IMPORT: /tmp/kogito-realm.json + + management-console: + container_name: management-console + image: ${KOGITO_MANAGEMENT_CONSOLE_IMAGE} + profiles: ["full"] + ports: + - 8280:8080 + depends_on: + jbpm-compact-architecture-example-service: + condition: service_started + keycloak: + condition: service_healthy + volumes: + - ./svg/:/home/kogito/data/svg/ + environment: + RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE: "PROD" + RUNTIME_TOOLS_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql + KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration + KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth + KOGITO_CONSOLES_KEYCLOAK_REALM: kogito + KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus + + task-console: + container_name: task-console + image: ${KOGITO_TASK_CONSOLE_IMAGE} + profiles: ["full"] + ports: + - 8380:8080 + depends_on: + jbpm-compact-architecture-example-service: + condition: service_started + keycloak: + condition: service_healthy + environment: + RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: "PROD" + RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql + KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration + KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth + KOGITO_CONSOLES_KEYCLOAK_REALM: kogito + KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus diff --git a/examples/jbpm-compact-architecture-example/docker-compose/keycloak/kogito-realm.json b/examples/jbpm-compact-architecture-example/docker-compose/keycloak/kogito-realm.json new file mode 100644 index 00000000000..711887e17a2 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/keycloak/kogito-realm.json @@ -0,0 +1,2010 @@ +{ + "realm": "kogito", + "notBefore": 0, + "revokeRefreshToken": false, + "refreshTokenMaxReuse": 0, + "accessTokenLifespan": 300, + "accessTokenLifespanForImplicitFlow": 900, + "ssoSessionIdleTimeout": 1800, + "ssoSessionMaxLifespan": 36000, + "ssoSessionIdleTimeoutRememberMe": 0, + "ssoSessionMaxLifespanRememberMe": 0, + "offlineSessionIdleTimeout": 2592000, + "offlineSessionMaxLifespanEnabled": false, + "offlineSessionMaxLifespan": 5184000, + "accessCodeLifespan": 60, + "accessCodeLifespanUserAction": 300, + "accessCodeLifespanLogin": 1800, + "actionTokenGeneratedByAdminLifespan": 43200, + "actionTokenGeneratedByUserLifespan": 300, + "enabled": true, + "sslRequired": "external", + "registrationAllowed": false, + "registrationEmailAsUsername": false, + "rememberMe": false, + "verifyEmail": false, + "loginWithEmailAllowed": true, + "duplicateEmailsAllowed": false, + "resetPasswordAllowed": false, + "editUsernameAllowed": false, + "bruteForceProtected": false, + "permanentLockout": false, + "maxFailureWaitSeconds": 900, + "minimumQuickLoginWaitSeconds": 60, + "waitIncrementSeconds": 60, + "quickLoginCheckMilliSeconds": 1000, + "maxDeltaTimeSeconds": 43200, + "failureFactor": 30, + "roles": { + "realm": [ + { + "name": "managers", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "uma_authorization", + "description": "${role_uma_authorization}", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "admin", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "user", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "HR", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "IT", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + }, + { + "name": "offline_access", + "description": "${role_offline-access}", + "composite": false, + "clientRole": false, + "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", + "attributes": {} + } + ], + "client": { + "realm-management": [ + { + "name": "manage-identity-providers", + "description": "${role_manage-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "impersonation", + "description": "${role_impersonation}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-identity-providers", + "description": "${role_view-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-realm", + "description": "${role_view-realm}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "query-users", + "description": "${role_query-users}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "manage-clients", + "description": "${role_manage-clients}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "manage-events", + "description": "${role_manage-events}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "realm-admin", + "description": "${role_realm-admin}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "impersonation", + "manage-identity-providers", + "view-identity-providers", + "view-realm", + "query-users", + "manage-clients", + "manage-events", + "manage-realm", + "view-authorization", + "manage-authorization", + "view-users", + "create-client", + "query-clients", + "query-groups", + "manage-users", + "view-clients", + "view-events", + "query-realms" + ] + } + }, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "manage-realm", + "description": "${role_manage-realm}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-authorization", + "description": "${role_view-authorization}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "manage-authorization", + "description": "${role_manage-authorization}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "create-client", + "description": "${role_create-client}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-users", + "description": "${role_view-users}", + "composite": true, + "composites": { + "client": { + "realm-management": ["query-groups", "query-users"] + } + }, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "query-clients", + "description": "${role_query-clients}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "query-groups", + "description": "${role_query-groups}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "manage-users", + "description": "${role_manage-users}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-clients", + "description": "${role_view-clients}", + "composite": true, + "composites": { + "client": { + "realm-management": ["query-clients"] + } + }, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "view-events", + "description": "${role_view-events}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + }, + { + "name": "query-realms", + "description": "${role_query-realms}", + "composite": false, + "clientRole": true, + "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", + "attributes": {} + } + ], + "security-admin-console": [], + "admin-cli": [], + "kogito-service": [ + { + "name": "uma_protection", + "composite": false, + "clientRole": true, + "containerId": "0ac5df91-e044-4051-bd03-106a3a5fb9cc", + "attributes": {} + } + ], + "broker": [ + { + "name": "read-token", + "description": "${role_read-token}", + "composite": false, + "clientRole": true, + "containerId": "53d4fe53-a039-471e-886a-28eddc950e95", + "attributes": {} + } + ], + "account": [ + { + "name": "view-profile", + "description": "${role_view-profile}", + "composite": false, + "clientRole": true, + "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", + "attributes": {} + }, + { + "name": "manage-account", + "description": "${role_manage-account}", + "composite": true, + "composites": { + "client": { + "account": ["manage-account-links"] + } + }, + "clientRole": true, + "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", + "attributes": {} + }, + { + "name": "manage-account-links", + "description": "${role_manage-account-links}", + "composite": false, + "clientRole": true, + "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", + "attributes": {} + } + ] + } + }, + "groups": [], + "defaultRoles": ["uma_authorization", "offline_access"], + "requiredCredentials": ["password"], + "otpPolicyType": "totp", + "otpPolicyAlgorithm": "HmacSHA1", + "otpPolicyInitialCounter": 0, + "otpPolicyDigits": 6, + "otpPolicyLookAheadWindow": 1, + "otpPolicyPeriod": 30, + "otpSupportedApplications": ["FreeOTP", "Google Authenticator"], + "scopeMappings": [ + { + "clientScope": "offline_access", + "roles": ["offline_access"] + } + ], + "clients": [ + { + "clientId": "account", + "name": "${client_account}", + "baseUrl": "/auth/realms/kogito/account", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "0136c3ef-0dfd-4b13-a6d0-2c8b6358edec", + "defaultRoles": ["view-profile", "manage-account"], + "redirectUris": ["/auth/realms/kogito/account/*"], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "admin-cli", + "name": "${client_admin-cli}", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "a951803a-79c7-46a6-8197-e32835286971", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": false, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "broker", + "name": "${client_broker}", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "e1f7edd7-e15c-43b4-8736-ff8204d16836", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "kogito-frontend", + "rootUrl": "http://localhost:8082", + "adminUrl": "http://localhost:8082", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "secret", + "redirectUris": ["http://localhost:8082/*"], + "webOrigins": ["http://localhost:8082"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"], + "access": { + "view": true, + "configure": true, + "manage": true + } + }, + { + "clientId": "kogito-app", + "rootUrl": "http://localhost:8080", + "adminUrl": "http://localhost:8080", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "secret", + "redirectUris": ["http://localhost:8080/*"], + "webOrigins": ["*"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"], + "access": { + "view": true, + "configure": true, + "manage": true + } + }, + { + "clientId": "kogito-service", + "rootUrl": "", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "secret", + "redirectUris": ["*"], + "webOrigins": ["*"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": true, + "authorizationServicesEnabled": true, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "protocolMappers": [ + { + "name": "Client ID", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientId", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientId", + "jsonType.label": "String" + } + }, + { + "name": "Client IP Address", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientAddress", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientAddress", + "jsonType.label": "String" + } + }, + { + "name": "Client Host", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientHost", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientHost", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"], + "authorizationSettings": { + "allowRemoteResourceManagement": true, + "policyEnforcementMode": "ENFORCING", + "resources": [ + { + "name": "User Resource", + "ownerManagedAccess": false, + "attributes": {}, + "_id": "df1b74a9-3f10-499d-a581-368de48e512b", + "uris": ["/api/users/*"] + }, + { + "name": "Administration Resource", + "ownerManagedAccess": false, + "attributes": {}, + "_id": "7124e2f1-e6dc-44b4-87ab-24b010090b97", + "uris": ["/api/admin/*"] + } + ], + "policies": [ + { + "name": "Any User Policy", + "description": "Any user granted with the user role can access something", + "type": "role", + "logic": "POSITIVE", + "decisionStrategy": "UNANIMOUS", + "config": { + "roles": "[{\"id\":\"user\",\"required\":false}]" + } + }, + { + "name": "Only Administrators", + "description": "Only administrators can access", + "type": "role", + "logic": "POSITIVE", + "decisionStrategy": "UNANIMOUS", + "config": { + "roles": "[{\"id\":\"admin\",\"required\":false}]" + } + }, + { + "name": "User Resource Permission", + "type": "resource", + "logic": "POSITIVE", + "decisionStrategy": "UNANIMOUS", + "config": { + "resources": "[\"User Resource\"]", + "applyPolicies": "[\"Any User Policy\"]" + } + }, + { + "name": "Administration Resource Permission", + "type": "resource", + "logic": "POSITIVE", + "decisionStrategy": "UNANIMOUS", + "config": { + "resources": "[\"Administration Resource\"]", + "applyPolicies": "[\"Only Administrators\"]" + } + } + ], + "scopes": [], + "decisionStrategy": "UNANIMOUS" + } + }, + { + "clientId": "kogito-console-react", + "rootUrl": "http://localhost:9000", + "adminUrl": "http://localhost:9000/", + "baseUrl": "http://localhost:9000/", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": ["http://localhost:9000/*"], + "webOrigins": ["*"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "kogito-console-quarkus", + "rootUrl": "http://localhost:8380", + "adminUrl": "http://localhost:8380/", + "baseUrl": "http://localhost:8380/", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": ["http://localhost:8380/*", "http://localhost:8280/*"], + "webOrigins": ["*"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "protocolMappers": [ + { + "name": "groups", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "user.attribute": "foo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "groups", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "kogito-jobs-service", + "rootUrl": "http://localhost:8080", + "adminUrl": "http://localhost:8080", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "secret", + "redirectUris": ["http://localhost:8080/*"], + "webOrigins": ["http://localhost:8080"], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"], + "access": { + "view": true, + "configure": true, + "manage": true + } + }, + { + "clientId": "realm-management", + "name": "${client_realm-management}", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "c41b709a-a012-4c69-89d7-4f926dba0619", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": true, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + }, + { + "clientId": "security-admin-console", + "name": "${client_security-admin-console}", + "baseUrl": "/auth/admin/kogito/console/index.html", + "surrogateAuthRequired": false, + "enabled": true, + "clientAuthenticatorType": "client-secret", + "secret": "e571b211-2550-475d-b87f-116ff54091ee", + "redirectUris": ["/auth/admin/kogito/console/*"], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": {}, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": ["web-origins", "role_list", "profile", "roles", "email"], + "optionalClientScopes": ["address", "phone", "offline_access", "microprofile-jwt"] + } + ], + "clientScopes": [ + { + "name": "address", + "description": "OpenID Connect built-in scope: address", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${addressScopeConsentText}" + }, + "protocolMappers": [ + { + "name": "address", + "protocol": "openid-connect", + "protocolMapper": "oidc-address-mapper", + "consentRequired": false, + "config": { + "user.attribute.formatted": "formatted", + "user.attribute.country": "country", + "user.attribute.postal_code": "postal_code", + "userinfo.token.claim": "true", + "user.attribute.street": "street", + "id.token.claim": "true", + "user.attribute.region": "region", + "access.token.claim": "true", + "user.attribute.locality": "locality" + } + } + ] + }, + { + "name": "email", + "description": "OpenID Connect built-in scope: email", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${emailScopeConsentText}" + }, + "protocolMappers": [ + { + "name": "email", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "email", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email", + "jsonType.label": "String" + } + }, + { + "name": "email verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "emailVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email_verified", + "jsonType.label": "boolean" + } + } + ] + }, + { + "name": "microprofile-jwt", + "description": "Microprofile - JWT built-in scope", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "false" + }, + "protocolMappers": [ + { + "name": "upn", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "upn", + "jsonType.label": "String" + } + }, + { + "name": "groups", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "user.attribute": "foo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "groups", + "jsonType.label": "String" + } + } + ] + }, + { + "name": "offline_access", + "description": "OpenID Connect built-in scope: offline_access", + "protocol": "openid-connect", + "attributes": { + "consent.screen.text": "${offlineAccessScopeConsentText}", + "display.on.consent.screen": "true" + } + }, + { + "name": "phone", + "description": "OpenID Connect built-in scope: phone", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${phoneScopeConsentText}" + }, + "protocolMappers": [ + { + "name": "phone number verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumberVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number_verified", + "jsonType.label": "boolean" + } + }, + { + "name": "phone number", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumber", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number", + "jsonType.label": "String" + } + } + ] + }, + { + "name": "profile", + "description": "OpenID Connect built-in scope: profile", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "true", + "display.on.consent.screen": "true", + "consent.screen.text": "${profileScopeConsentText}" + }, + "protocolMappers": [ + { + "name": "nickname", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "nickname", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "nickname", + "jsonType.label": "String" + } + }, + { + "name": "zoneinfo", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "zoneinfo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "zoneinfo", + "jsonType.label": "String" + } + }, + { + "name": "updated at", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "updatedAt", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "updated_at", + "jsonType.label": "String" + } + }, + { + "name": "birthdate", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "birthdate", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "birthdate", + "jsonType.label": "String" + } + }, + { + "name": "given name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "firstName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "given_name", + "jsonType.label": "String" + } + }, + { + "name": "full name", + "protocol": "openid-connect", + "protocolMapper": "oidc-full-name-mapper", + "consentRequired": false, + "config": { + "id.token.claim": "true", + "access.token.claim": "true", + "userinfo.token.claim": "true" + } + }, + { + "name": "middle name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "middleName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "middle_name", + "jsonType.label": "String" + } + }, + { + "name": "username", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "preferred_username", + "jsonType.label": "String" + } + }, + { + "name": "family name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "lastName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "family_name", + "jsonType.label": "String" + } + }, + { + "name": "gender", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "gender", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "gender", + "jsonType.label": "String" + } + }, + { + "name": "picture", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "picture", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "picture", + "jsonType.label": "String" + } + }, + { + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + }, + { + "name": "profile", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "profile", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "profile", + "jsonType.label": "String" + } + }, + { + "name": "website", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "website", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "website", + "jsonType.label": "String" + } + } + ] + }, + { + "name": "role_list", + "description": "SAML role list", + "protocol": "saml", + "attributes": { + "consent.screen.text": "${samlRoleListScopeConsentText}", + "display.on.consent.screen": "true" + }, + "protocolMappers": [ + { + "name": "role list", + "protocol": "saml", + "protocolMapper": "saml-role-list-mapper", + "consentRequired": false, + "config": { + "single": "false", + "attribute.nameformat": "Basic", + "attribute.name": "Role" + } + } + ] + }, + { + "name": "roles", + "description": "OpenID Connect scope for add user roles to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "false", + "display.on.consent.screen": "true", + "consent.screen.text": "${rolesScopeConsentText}" + }, + "protocolMappers": [ + { + "name": "realm roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "realm_access.roles", + "jsonType.label": "String", + "multivalued": "true" + } + }, + { + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + }, + { + "name": "client roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-client-role-mapper", + "consentRequired": false, + "config": { + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "resource_access.${client_id}.roles", + "jsonType.label": "String", + "multivalued": "true" + } + } + ] + }, + { + "name": "web-origins", + "description": "OpenID Connect scope for add allowed web origins to the access token", + "protocol": "openid-connect", + "attributes": { + "include.in.token.scope": "false", + "display.on.consent.screen": "false", + "consent.screen.text": "" + }, + "protocolMappers": [ + { + "name": "allowed web origins", + "protocol": "openid-connect", + "protocolMapper": "oidc-allowed-origins-mapper", + "consentRequired": false, + "config": {} + } + ] + } + ], + "defaultDefaultClientScopes": ["role_list", "profile", "email", "roles", "web-origins"], + "defaultOptionalClientScopes": ["offline_access", "address", "phone", "microprofile-jwt"], + "browserSecurityHeaders": { + "contentSecurityPolicyReportOnly": "", + "xContentTypeOptions": "nosniff", + "xRobotsTag": "none", + "xFrameOptions": "SAMEORIGIN", + "xXSSProtection": "1; mode=block", + "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "strictTransportSecurity": "max-age=31536000; includeSubDomains" + }, + "smtpServer": {}, + "eventsEnabled": false, + "eventsListeners": ["jboss-logging"], + "enabledEventTypes": [], + "adminEventsEnabled": false, + "adminEventsDetailsEnabled": false, + "components": { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ + { + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-full-name-mapper", + "saml-user-attribute-mapper", + "saml-user-property-mapper", + "oidc-address-mapper", + "saml-role-list-mapper", + "oidc-sha256-pairwise-sub-mapper", + "oidc-usermodel-attribute-mapper", + "oidc-usermodel-property-mapper" + ] + } + }, + { + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allow-default-scopes": ["true"] + } + }, + { + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allow-default-scopes": ["true"] + } + }, + { + "name": "Trusted Hosts", + "providerId": "trusted-hosts", + "subType": "anonymous", + "subComponents": {}, + "config": { + "host-sending-registration-request-must-match": ["true"], + "client-uris-must-match": ["true"] + } + }, + { + "name": "Full Scope Disabled", + "providerId": "scope", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "name": "Max Clients Limit", + "providerId": "max-clients", + "subType": "anonymous", + "subComponents": {}, + "config": { + "max-clients": ["200"] + } + }, + { + "name": "Consent Required", + "providerId": "consent-required", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "saml-user-attribute-mapper", + "oidc-full-name-mapper", + "saml-role-list-mapper", + "saml-user-property-mapper", + "oidc-usermodel-attribute-mapper", + "oidc-address-mapper", + "oidc-usermodel-property-mapper", + "oidc-sha256-pairwise-sub-mapper" + ] + } + } + ], + "org.keycloak.keys.KeyProvider": [ + { + "name": "rsa-generated", + "providerId": "rsa-generated", + "subComponents": {}, + "config": { + "privateKey": [ + "MIIEowIBAAKCAQEAn5T13suF8mlS+pJXp0U1bto41nW55wpcs+Rps8ZVCRyJKWqzwSCYnI7lm0rB2wBpAAO4OPoj1zlmVoFmBPsDU9Xf7rjsJb5LIzIQDCZY44aSDZt6RR+gakPiQvlzHyW/RozYpngDJF7TsTD7rdRF1xQ4RprfBF8fwK/xsU7pxbeom5xDHZhz3fiw8s+7UdbmnazDHfAjU58aUrLGgVRfUsuoHjtsptYlOIXEifaeMetXZE+HhqLYRHQPDap5fbBJl773Trosn7N9nmzN4x1xxGj9So21WC5UboQs9sAIVgizc4omjZ5Y4RN9HLH7G4YwJctNntzmnJhDui9zAO+zSQIDAQABAoIBADi+F7rTtVoft0Cfnok8o6Y58/HVxHdxiMryUd95iy0FN4RBi48FTx6D9QKFz25Ws/8sU2n3D51srIXf1u24b1N0/f39RQKaqk7mcyxOylaEuBQcj5pah4ihgKd92UBfBKdKV5LBo6RgD3e2yhbiHr8+UlBQqzH7vOef6Bm6zIbfmi3N88swAJhP0YizRZFklsbmLsK6nkwyro00CHJvPVKSBbM+ad+/zIBsLw56MvNngB5TuFguUgoljd6M1T2z4utmZGlTUqrfE1onAVLJZoGnRohyIr7dJEg6YxWR70PxsgmkDKyeRvet9P1trO0n+OSprusfrC3cHJStabap1V0CgYEA1A/CtsqTnjdYYsB19eumZgdpzUgNc/YEAzZ/OWb8yTLoB2ncci+63A1rXHUXAqJFY7vtjn5mxv7SuASNbUrzq+6KfZvC1x9XEtnczqT/ypunNfxmIZuj8Nuu6vtURguZ8kPPwdkI8toTizRFeRE5ZDBvoQryiEVYugfHaHT5vzsCgYEAwKWODwquI0Lv9BuwdNVrBXQpkKh3ZfYOA7i9xvhxlM7xUu8OMCwwCPn3r7vrW5APjTqX4h330mJ44SLEs+7gbCUs4BbJBLA6g0ChlHa9PTkxp6tk2nDF/B34fxiZSRkE85L+d+at0Dc3hnlzLCJCzJawGpoPniPU9e4w0p4dN0sCgYAsGnMGjS8SUrRhJWHjGXVr9tK8TOXvXhULjgP7rj2Yoqu7Dvs4DFEyft/7RKbad2EzEtyfLA64CDtO5jN7rYDsGxpWcVSeZPg5BXJ0z8AbJTArfCjJiJMZ/rZsTIUEZFlKF2xYBolj6JLz+pUQTtK+0YwF1D8ItFN1rTR9twZSDQKBgQC6sPXNX+VH6LuPTjIf1x8CxwLs3EXxOpV0R9kp9GRl+HJnk6GlT30xhcThufQo5KAdllXQXIhoiuNoEoCbevhj9Vbax1oBQCNERSMRNEzKAx46xd9TzYwgeo7x5E3QR/3DaoVOfu+cY5ZcrF/PulgP2kxJS1mtQD5GIpGP2oinpwKBgGqiqTFPqRcelx76vBvTU+Jp1zM62T4AotbMrSQR/oUvqHe5Ytj/SbZx+wbbHAiyGgV700Mosyviik83YEAbR3kdOPjgYvAJJW2Y3jEMdQ7MwriXz8XLh5BGmYfVjkSOJXed9ua9WlYLKOJeXXv191BbDvrx5NXuJyVVU4vJx3YZ" + ], + "certificate": [ + "MIICnTCCAYUCBgFp4EYIrjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdwcm90ZWFuMB4XDTE5MDQwMjIyNTYxOVoXDTI5MDQwMjIyNTc1OVowEjEQMA4GA1UEAwwHcHJvdGVhbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+U9d7LhfJpUvqSV6dFNW7aONZ1uecKXLPkabPGVQkciSlqs8EgmJyO5ZtKwdsAaQADuDj6I9c5ZlaBZgT7A1PV3+647CW+SyMyEAwmWOOGkg2bekUfoGpD4kL5cx8lv0aM2KZ4AyRe07Ew+63URdcUOEaa3wRfH8Cv8bFO6cW3qJucQx2Yc934sPLPu1HW5p2swx3wI1OfGlKyxoFUX1LLqB47bKbWJTiFxIn2njHrV2RPh4ai2ER0Dw2qeX2wSZe+9066LJ+zfZ5szeMdccRo/UqNtVguVG6ELPbACFYIs3OKJo2eWOETfRyx+xuGMCXLTZ7c5pyYQ7ovcwDvs0kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVtmRKDb4OK5iSA46tagMBkp6L7WuPpCWuHGWwobEP+BecYsShW7zP3s12oA8SNSwbhvu0CRqgzxhuypgf3hKQFVU153Erv4hzkj+8S0s5LR/ZE7tDNY2lzJ3yQKXy3Md7EkuzzvOZ50MTrcSKAanWq/ZW1OTnrtGymj5zGJnTg7mMnJzEIGePxkvPu/QdchiPBLqxfZYm1jsFGY25djOC3N/KmVcRVmPRGuu6D8tBFHlKoPfZYPdbMvsvs24aupHKRcZ+ofTCpK+2Qo8c0pSSqeEYHGmuGqC6lC6ozxtxSABPO9Q1R1tZBU7Kg5HvXUwwmoVS3EGub46YbHqbmWMLg==" + ], + "priority": ["100"] + } + }, + { + "name": "hmac-generated", + "providerId": "hmac-generated", + "subComponents": {}, + "config": { + "kid": ["96afd00e-85cf-4d35-b18e-061d3813d8b2"], + "secret": ["qBFGKdUGf6xDgKphnRfoFzIzaFHJW4bYnZ9MinPFzN38X5_ctq-2u1q5RdZzeJukXvk2biHB8_s3DxWmmLZFsA"], + "priority": ["100"], + "algorithm": ["HS256"] + } + }, + { + "name": "aes-generated", + "providerId": "aes-generated", + "subComponents": {}, + "config": { + "kid": ["b04473d3-8395-4016-b455-19a9e951106b"], + "secret": ["x68mMOVdz3qKWzltzReV0g"], + "priority": ["100"] + } + } + ] + }, + "internationalizationEnabled": false, + "supportedLocales": [], + "authenticationFlows": [ + { + "alias": "Handle Existing Account", + "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-confirm-link", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "idp-email-verification", + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "Verify Existing Account by Re-authentication", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "alias": "Verify Existing Account by Re-authentication", + "description": "Reauthentication of existing account", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "idp-username-password-form", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "OPTIONAL", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "browser", + "description": "browser based authentication", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-cookie", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "identity-provider-redirector", + "requirement": "ALTERNATIVE", + "priority": 25, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "forms", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "alias": "clients", + "description": "Base authentication for clients", + "providerId": "client-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "client-secret", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-jwt", + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-secret-jwt", + "requirement": "ALTERNATIVE", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-x509", + "requirement": "ALTERNATIVE", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "direct grant", + "description": "OpenID Connect Resource Owner Grant", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "direct-grant-validate-username", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-password", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-otp", + "requirement": "OPTIONAL", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "docker auth", + "description": "Used by Docker clients to authenticate against the IDP", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "docker-http-basic-authenticator", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "first broker login", + "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticatorConfig": "review profile config", + "authenticator": "idp-review-profile", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticatorConfig": "create unique user config", + "authenticator": "idp-create-user-if-unique", + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "Handle Existing Account", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "alias": "forms", + "description": "Username, password, otp and other auth forms.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-username-password-form", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "OPTIONAL", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "http challenge", + "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "no-cookie-redirect", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "basic-auth", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "basic-auth-otp", + "requirement": "DISABLED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "registration", + "description": "registration flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-page-form", + "requirement": "REQUIRED", + "priority": 10, + "flowAlias": "registration form", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "alias": "registration form", + "description": "registration form", + "providerId": "form-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-user-creation", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-profile-action", + "requirement": "REQUIRED", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-password-action", + "requirement": "REQUIRED", + "priority": 50, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-recaptcha-action", + "requirement": "DISABLED", + "priority": 60, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "reset credentials", + "description": "Reset credentials for a user if they forgot their password or something", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "reset-credentials-choose-user", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-credential-email", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-password", + "requirement": "REQUIRED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-otp", + "requirement": "OPTIONAL", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "alias": "saml ecp", + "description": "SAML ECP Profile Authentication Flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "http-basic-authenticator", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + } + ], + "authenticatorConfig": [ + { + "alias": "create unique user config", + "config": { + "require.password.update.after.registration": "false" + } + }, + { + "alias": "review profile config", + "config": { + "update.profile.on.first.login": "missing" + } + } + ], + "requiredActions": [ + { + "alias": "CONFIGURE_TOTP", + "name": "Configure OTP", + "providerId": "CONFIGURE_TOTP", + "enabled": true, + "defaultAction": false, + "priority": 10, + "config": {} + }, + { + "alias": "terms_and_conditions", + "name": "Terms and Conditions", + "providerId": "terms_and_conditions", + "enabled": false, + "defaultAction": false, + "priority": 20, + "config": {} + }, + { + "alias": "UPDATE_PASSWORD", + "name": "Update Password", + "providerId": "UPDATE_PASSWORD", + "enabled": true, + "defaultAction": false, + "priority": 30, + "config": {} + }, + { + "alias": "UPDATE_PROFILE", + "name": "Update Profile", + "providerId": "UPDATE_PROFILE", + "enabled": true, + "defaultAction": false, + "priority": 40, + "config": {} + }, + { + "alias": "VERIFY_EMAIL", + "name": "Verify Email", + "providerId": "VERIFY_EMAIL", + "enabled": true, + "defaultAction": false, + "priority": 50, + "config": {} + } + ], + "browserFlow": "browser", + "registrationFlow": "registration", + "directGrantFlow": "direct grant", + "resetCredentialsFlow": "reset credentials", + "clientAuthenticationFlow": "clients", + "dockerAuthenticationFlow": "docker auth", + "attributes": { + "_browser_header.xXSSProtection": "1; mode=block", + "_browser_header.xFrameOptions": "SAMEORIGIN", + "_browser_header.strictTransportSecurity": "max-age=31536000; includeSubDomains", + "permanentLockout": "false", + "quickLoginCheckMilliSeconds": "1000", + "_browser_header.xRobotsTag": "none", + "maxFailureWaitSeconds": "900", + "minimumQuickLoginWaitSeconds": "60", + "failureFactor": "30", + "actionTokenGeneratedByUserLifespan": "300", + "maxDeltaTimeSeconds": "43200", + "_browser_header.xContentTypeOptions": "nosniff", + "offlineSessionMaxLifespan": "5184000", + "actionTokenGeneratedByAdminLifespan": "43200", + "_browser_header.contentSecurityPolicyReportOnly": "", + "bruteForceProtected": "false", + "_browser_header.contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "waitIncrementSeconds": "60", + "offlineSessionMaxLifespanEnabled": "false" + }, + "users": [ + { + "username": "admin", + "enabled": true, + "totp": false, + "emailVerified": false, + "credentials": [ + { + "type": "password", + "hashedSaltedValue": "NICTtwsvSxJ5hL8hLAuleDUv9jwZcuXgxviMXvR++cciyPtiIEStEaJUyfA9DOir59awjPrHOumsclPVjNBplA==", + "salt": "T/2P5o5oxFJUEk68BRURRg==", + "hashIterations": 27500, + "counter": 0, + "algorithm": "pbkdf2-sha256", + "digits": 0, + "period": 0, + "createdDate": 1554245879354, + "config": {} + } + ], + "disableableCredentialTypes": ["password"], + "requiredActions": [], + "realmRoles": ["admin", "managers", "user", "IT", "HR"], + "notBefore": 0, + "groups": [] + }, + { + "username": "alice", + "enabled": true, + "totp": false, + "emailVerified": false, + "credentials": [ + { + "type": "password", + "hashedSaltedValue": "A3okqV2T/ybXTVEgKfosoSjP8Yc9IZbFP/SY4cEd6hag7TABQrQ6nUSuwagGt96l8cw1DTijO75PqX6uiTXMzw==", + "salt": "sl4mXx6T9FypPH/s9TngfQ==", + "hashIterations": 27500, + "counter": 0, + "algorithm": "pbkdf2-sha256", + "digits": 0, + "period": 0, + "createdDate": 1554245879116, + "config": {} + } + ], + "disableableCredentialTypes": ["password"], + "requiredActions": [], + "realmRoles": ["user", "HR"], + "notBefore": 0, + "groups": [] + }, + { + "username": "jdoe", + "enabled": true, + "totp": false, + "emailVerified": false, + "credentials": [ + { + "type": "password", + "hashedSaltedValue": "JV3DUNLjqOadjbBOtC4rvacQI553CGaDGAzBS8MR5ReCr7SwF3E6CsW3T7/XO8ITZAsch8+A/6loeuCoVLLJrg==", + "salt": "uCbOH7HZtyDtMd0E9DG/nw==", + "hashIterations": 27500, + "counter": 0, + "algorithm": "pbkdf2-sha256", + "digits": 0, + "period": 0, + "createdDate": 1554245879227, + "config": {} + } + ], + "disableableCredentialTypes": ["password"], + "requiredActions": [], + "realmRoles": ["managers", "user", "IT"], + "notBefore": 0, + "groups": [] + } + ], + "keycloakVersion": "6.0.0", + "userManagedAccessAllowed": false +} diff --git a/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/pgpass b/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/pgpass new file mode 100644 index 00000000000..11a6f7c6019 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/pgpass @@ -0,0 +1,3 @@ +postgres:5432:kogito:kogito-user:kogito-pass +postgres:5432:keycloak:kogito-user:kogito-pass +postgres:5432:postgres:kogito-user:kogito-pass \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/servers.json b/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/servers.json new file mode 100644 index 00000000000..caafe268c0f --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/pgadmin/servers.json @@ -0,0 +1,14 @@ +{ + "Servers": { + "1": { + "Name": "kogito", + "Group": "Servers", + "Host": "postgres", + "Port": 5432, + "MaintenanceDB": "kogito", + "Username": "kogito-user", + "SSLMode": "disable", + "PassFile": "/var/lib/pgadmin/pgpass" + } + } +} diff --git a/examples/jbpm-compact-architecture-example/docker-compose/sql/init.sql b/examples/jbpm-compact-architecture-example/docker-compose/sql/init.sql new file mode 100644 index 00000000000..92ea9b4e5c6 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/sql/init.sql @@ -0,0 +1,33 @@ +CREATE ROLE "kogito-user" WITH + LOGIN + SUPERUSER + INHERIT + CREATEDB + CREATEROLE + NOREPLICATION + PASSWORD 'kogito-pass'; + +CREATE DATABASE kogito + WITH + OWNER = "kogito-user" + ENCODING = 'UTF8' + LC_COLLATE = 'en_US.utf8' + LC_CTYPE = 'en_US.utf8' + TABLESPACE = pg_default + CONNECTION LIMIT = -1; + +CREATE DATABASE keycloak + WITH + OWNER = "kogito-user" + ENCODING = 'UTF8' + LC_COLLATE = 'en_US.utf8' + LC_CTYPE = 'en_US.utf8' + TABLESPACE = pg_default + CONNECTION LIMIT = -1; + +GRANT ALL PRIVILEGES ON DATABASE postgres TO "kogito-user"; +GRANT ALL PRIVILEGES ON DATABASE kogito TO "kogito-user"; +GRANT ALL PRIVILEGES ON DATABASE kogito TO postgres; + +GRANT ALL PRIVILEGES ON DATABASE keycloak TO "kogito-user"; +GRANT ALL PRIVILEGES ON DATABASE keycloak TO postgres; \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh new file mode 100755 index 00000000000..e8a42f5b2ee --- /dev/null +++ b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +PROFILE="full" + +echo "Script requires your Kogito Example to be compiled" + +PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) +KOGITO_MANAGEMENT_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.management-console.image -q -DforceStdout) +KOGITO_TASK_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.task-console.image -q -DforceStdout) + + +if [ -n "$1" ]; then + if [[ ("$1" == "full") || ("$1" == "infra") || ("$1" == "example")]]; + then + PROFILE="$1" + else + echo "Unknown docker profile '$1'. The supported profiles are:" + echo "* 'infra': Use this profile to start only the minimum infrastructure to run the example (postgresql, data-index & jobs-service)." + echo "* 'example': Use this profile to start the example infrastructure and the kogito-example service. Requires the example to be compiled using the 'container' profile (-Pcontainer)" + echo "* 'full' (default): Starts full example setup, including infrastructure (database, data-index & jobs-service), the kogito-example-service container and the runtime consoles (management-console, task-console & keycloak). Requires the example to be compiled using the 'container' profile (-Pcontainer)" + exit 1; + fi +fi + +echo "PROJECT_VERSION=${PROJECT_VERSION}" > ".env" +echo "KOGITO_MANAGEMENT_CONSOLE_IMAGE=${KOGITO_MANAGEMENT_CONSOLE_IMAGE}" >> ".env" +echo "KOGITO_TASK_CONSOLE_IMAGE=${KOGITO_TASK_CONSOLE_IMAGE}" >> ".env" +echo "COMPOSE_PROFILES='${PROFILE}'" >> ".env" + +if [ "$(uname)" == "Darwin" ]; then + echo "DOCKER_GATEWAY_HOST=kubernetes.docker.internal" >> ".env" +elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + echo "DOCKER_GATEWAY_HOST=172.17.0.1" >> ".env" +fi + +if [ ! -d "./svg" ] +then + echo "SVG folder does not exist. Have you compiled the project? mvn clean install -DskipTests" + exit 1 +fi + +docker compose up \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/docs/images/g1_1_mc_list.png b/examples/jbpm-compact-architecture-example/docs/images/g1_1_mc_list.png new file mode 100644 index 00000000000..4e5aa6274df Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g1_1_mc_list.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g1_2_mc_details.png b/examples/jbpm-compact-architecture-example/docs/images/g1_2_mc_details.png new file mode 100644 index 00000000000..f2b228f20d0 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g1_2_mc_details.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g1_3_mc_details_executed_job.png b/examples/jbpm-compact-architecture-example/docs/images/g1_3_mc_details_executed_job.png new file mode 100644 index 00000000000..1ab358819c3 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g1_3_mc_details_executed_job.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_10_mc_details_completed.png b/examples/jbpm-compact-architecture-example/docs/images/g2_10_mc_details_completed.png new file mode 100644 index 00000000000..610849f19ee Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_10_mc_details_completed.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_1_mc_list.png b/examples/jbpm-compact-architecture-example/docs/images/g2_1_mc_list.png new file mode 100644 index 00000000000..6526e8e7f23 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_1_mc_list.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_2_mc_details.png b/examples/jbpm-compact-architecture-example/docs/images/g2_2_mc_details.png new file mode 100644 index 00000000000..ec18201f08a Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_2_mc_details.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_3_tc_inbox.png b/examples/jbpm-compact-architecture-example/docs/images/g2_3_tc_inbox.png new file mode 100644 index 00000000000..0d612f76c80 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_3_tc_inbox.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_4_tc_hr_form.png b/examples/jbpm-compact-architecture-example/docs/images/g2_4_tc_hr_form.png new file mode 100644 index 00000000000..d89b41302da Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_4_tc_hr_form.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_5_tc_hr_form_notification.png b/examples/jbpm-compact-architecture-example/docs/images/g2_5_tc_hr_form_notification.png new file mode 100644 index 00000000000..8dd81fc4a92 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_5_tc_hr_form_notification.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_6_mc_details.png b/examples/jbpm-compact-architecture-example/docs/images/g2_6_mc_details.png new file mode 100644 index 00000000000..4970b8f8374 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_6_mc_details.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_7_tc_inbox.png b/examples/jbpm-compact-architecture-example/docs/images/g2_7_tc_inbox.png new file mode 100644 index 00000000000..03f63ff7b45 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_7_tc_inbox.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_8_tc_it_form.png b/examples/jbpm-compact-architecture-example/docs/images/g2_8_tc_it_form.png new file mode 100644 index 00000000000..5e6872a09c8 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_8_tc_it_form.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/g2_9_tc_inbox_empty.png b/examples/jbpm-compact-architecture-example/docs/images/g2_9_tc_inbox_empty.png new file mode 100644 index 00000000000..696433e93d3 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/g2_9_tc_inbox_empty.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/generate_offer_assignments.png b/examples/jbpm-compact-architecture-example/docs/images/generate_offer_assignments.png new file mode 100644 index 00000000000..2e3f93529f3 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/generate_offer_assignments.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/hiring_diagram.png b/examples/jbpm-compact-architecture-example/docs/images/hiring_diagram.png new file mode 100644 index 00000000000..cb57a2dfb9d Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/hiring_diagram.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/hr_interview_assignments.png b/examples/jbpm-compact-architecture-example/docs/images/hr_interview_assignments.png new file mode 100644 index 00000000000..63de050eb5e Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/hr_interview_assignments.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/it_interview_assignments.png b/examples/jbpm-compact-architecture-example/docs/images/it_interview_assignments.png new file mode 100644 index 00000000000..077430569d6 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/it_interview_assignments.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/mc_details_1.png b/examples/jbpm-compact-architecture-example/docs/images/mc_details_1.png new file mode 100644 index 00000000000..2c1c3b26abb Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/mc_details_1.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/mc_list.png b/examples/jbpm-compact-architecture-example/docs/images/mc_list.png new file mode 100644 index 00000000000..4fc32b05cc3 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/mc_list.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn.png b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn.png new file mode 100644 index 00000000000..451313a264d Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_decision.png b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_decision.png new file mode 100644 index 00000000000..f58d869d36f Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_decision.png differ diff --git a/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_types.png b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_types.png new file mode 100644 index 00000000000..d028d331da9 Binary files /dev/null and b/examples/jbpm-compact-architecture-example/docs/images/new_hiring_offer_dmn_types.png differ diff --git a/examples/jbpm-compact-architecture-example/env/index.js b/examples/jbpm-compact-architecture-example/env/index.js new file mode 100644 index 00000000000..4b9f86d2fa6 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/env/index.js @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); + +const { + env: { kogitoManagementConsole: kogitoManagementConsoleEnv }, +} = require("@kie-tools/kogito-management-console/env"); + +const { + env: { kogitoTaskConsole: kogitoTaskConsoleEnv }, +} = require("@kie-tools/kogito-task-console/env"); + +module.exports = composeEnv([require("@kie-tools/root-env/env")], { + vars: varsWithName({ + JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage: { + default: `${kogitoManagementConsoleEnv.registry}/${kogitoManagementConsoleEnv.account}/${kogitoManagementConsoleEnv.name}:${kogitoManagementConsoleEnv.buildTag}`, + description: "The image for the Kogito Management Console Image.", + }, + JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage: { + default: `${kogitoTaskConsoleEnv.registry}/${kogitoTaskConsoleEnv.account}/${kogitoTaskConsoleEnv.name}:${kogitoTaskConsoleEnv.buildTag}`, + description: "The image for the Kogito Task Console Image.", + }, + }), + get env() { + return { + jbpmCompactArchitectureExample: { + kogitoManagementConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage), + kogitoTaskConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage), + version: require("../package.json").version, + }, + }; + }, +}); diff --git a/examples/jbpm-compact-architecture-example/install.js b/examples/jbpm-compact-architecture-example/install.js new file mode 100644 index 00000000000..47e591480b5 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/install.js @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const buildEnv = require("./env"); +const { setup, setPomProperty } = require("@kie-tools/maven-config-setup-helper"); + +setup(` + -Drevision=${buildEnv.env.jbpmCompactArchitectureExample.version} +`); + +setPomProperty({ + key: "kogito.management-console.image", + value: buildEnv.env.jbpmCompactArchitectureExample.kogitoManagementConsoleImage, +}); + +setPomProperty({ + key: "kogito.task-console.image", + value: buildEnv.env.jbpmCompactArchitectureExample.kogitoTaskConsoleImage, +}); diff --git a/examples/jbpm-compact-architecture-example/package.json b/examples/jbpm-compact-architecture-example/package.json new file mode 100644 index 00000000000..2ce94a9f7b6 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/package.json @@ -0,0 +1,55 @@ +{ + "private": true, + "name": "@kie-tools-examples/jbpm-compact-architecture-example", + "version": "0.0.0", + "description": "", + "license": "Apache-2.0", + "homepage": "https://github.com/apache/incubator-kie-tools", + "repository": { + "type": "git", + "url": "https://github.com/apache/incubator-kie-tools.git" + }, + "bugs": { + "url": "https://github.com/apache/incubator-kie-tools/issues" + }, + "scripts": { + "build": "run-script-os", + "build:darwin:linux": "mvn clean install -P container", + "build:dev": "run-script-if --bool \"$(build-env examples.build)\" --then run-script-os", + "build:dev:darwin:linux": "mvn clean compile -DskipTests", + "build:dev:win32": "pnpm powershell \"mvn clean compile `-DskipTests \"", + "build:prod": "pnpm lint && run-script-if --bool \"$(build-env examples.build)\" --then run-script-os", + "build:prod:darwin:linux": "mvn clean compile -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) -Pcontainer", + "build:prod:win32": "pnpm powershell \"mvn clean compile `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) `-Pcontainer \"", + "install": "node install.js", + "lint": "echo 'Linting'", + "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command", + "quarkus:dev": "run-script-os", + "quarkus:dev:darwin:linux": "mvn clean package quarkus:dev -DskipTests -Pdevelopment", + "quarkus:dev:win32": "mvn clean package quarkus:dev `-DskipTests `-Pdevelopment", + "run": "run-script-os", + "run:darwin:linux": "cd ./docker-compose && sh startServices.sh", + "start": "run-script-os", + "start:darwin:linux": "pnpm run build && pnpm run run", + "start:win32": "echo Running full example ot supported in windows", + "stop": "run-script-os", + "stop:darwin:linux": "cd ./docker-compose && docker compose down" + }, + "dependencies": { + "@kie-tools/jbpm-quarkus-devui": "workspace:*", + "@kie-tools/maven-base": "workspace:*" + }, + "devDependencies": { + "@kie-tools/kogito-management-console": "workspace:*", + "@kie-tools/kogito-task-console": "workspace:*", + "@kie-tools/maven-config-setup-helper": "workspace:*", + "@kie-tools/root-env": "workspace:*", + "run-script-os": "^1.1.6" + }, + "kieTools": { + "requiredPreinstalledCliCommands": [ + "java", + "mvn" + ] + } +} \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/pom.xml b/examples/jbpm-compact-architecture-example/pom.xml new file mode 100644 index 00000000000..56b4cef9276 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/pom.xml @@ -0,0 +1,202 @@ + + + + 4.0.0 + + org.kie + kie-tools-maven-base + ${revision} + ./node_modules/@kie-tools/maven-base/pom.xml + + + jbpm-compact-architecture-quarkus-example + Kie-Tools Example :: jBPM Compact Architecture Quarkus Example + + + docker.io/apache/incubator-kie-kogito-management-console:main + docker.io/apache/incubator-kie-kogito-task-console:main + + + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-smallrye-openapi + + + io.quarkus + quarkus-smallrye-health + + + + org.jbpm + jbpm-with-drools-quarkus + + + + org.kie + kie-addons-quarkus-process-management + + + org.kie + kogito-addons-quarkus-jobs-management + + + org.kie + kie-addons-quarkus-process-svg + + + org.kie + kie-addons-quarkus-source-files + + + + + io.quarkus + quarkus-jdbc-postgresql + + + io.quarkus + quarkus-agroal + + + org.kie + kie-addons-quarkus-persistence-jdbc + + + + + org.kie + kogito-addons-quarkus-data-index-postgresql + + + + + org.kie + kogito-addons-quarkus-data-index-persistence-postgresql + + + + + org.kie + kogito-addons-quarkus-jobs + + + org.kie.kogito + jobs-service-postgresql-common + + + + + org.kie + kogito-addons-quarkus-data-audit-jpa + + + org.kie + kogito-addons-quarkus-data-audit + + + + + + container + + container + + + + io.quarkus + quarkus-container-image-jib + + + + + development + + dev + + + + + org.jbpm + jbpm-quarkus-devui-bom + ${project.version} + pom + import + + + + + + org.jbpm + jbpm-quarkus-devui + + + + + + + ${project.artifactId} + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + maven-antrun-plugin + + + package + + run + + + + + + + + + + + + + + diff --git a/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/CandidateData.java b/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/CandidateData.java new file mode 100644 index 00000000000..eae14184da0 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/CandidateData.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.kie.kogito.hr; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +public class CandidateData { + + private String name; + + private String lastName; + + private String email; + + private Integer experience; + + private List skills; + + public CandidateData() { + } + + public CandidateData(String name, String lastName, String email, Integer experience, List skills) { + this.name = name; + this.lastName = lastName; + this.email = email; + this.experience = experience; + this.skills = skills; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getExperience() { + return experience; + } + + public void setExperience(Integer experience) { + this.experience = experience; + } + + public List getSkills() { + return skills; + } + + public void setSkills(List skills) { + this.skills = skills; + } + + @JsonIgnore + public String getFullName() { + return name + " " + lastName; + } +} diff --git a/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/Offer.java b/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/Offer.java new file mode 100644 index 00000000000..a377b480aa0 --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/java/org/kie/kogito/hr/Offer.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.kie.kogito.hr; + +public class Offer { + + private String category; + + private Integer salary; + + public Offer() { + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public Integer getSalary() { + return salary; + } + + public void setSalary(Integer salary) { + this.salary = salary; + } +} diff --git a/examples/jbpm-compact-architecture-example/src/main/resources/META-INF/processSVG/hiring.svg b/examples/jbpm-compact-architecture-example/src/main/resources/META-INF/processSVG/hiring.svg new file mode 100644 index 00000000000..fba0500706c --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/resources/META-INF/processSVG/hiring.svg @@ -0,0 +1 @@ +HR InterviewIT InterviewNew Hiring Send notification HR Interview avoided Application denied Generate base offer Log OfferSend Offer to Candidate \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/src/main/resources/NewHiringOffer.dmn b/examples/jbpm-compact-architecture-example/src/main/resources/NewHiringOffer.dmn new file mode 100644 index 00000000000..67b0eded68d --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/resources/NewHiringOffer.dmn @@ -0,0 +1,163 @@ + + + + + + string + + + string + + + string + + + number + + + string + + + + + number + + + string + + "Software Engineer", "Senior Software Engineer", "Software Architect" + + + + + + + + + + + + + + + + + + count(CandidateData.skills) * 150 + + + + + + + + CandidateData.experience + + + + + "Software Engineer", "Senior Software Engineer", "Software Architect" + + + + + + + [0..5) + + + "Software Engineer" + + + 30000 + SalaryBonus + + + + + + + + [5..10) + + + "Senior Software Engineer" + + + 40000 + SalaryBonus + + + + + + + + >=10 + + + "Software Architect" + + + 50000 + SalaryBonus + + + + + + + + + + Offer + + + + + + + + + + 50 + 120 + 926 + + + 926 + + + 50 + 175 + 104 + 437 + 140 + + + 926 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/src/main/resources/application.properties b/examples/jbpm-compact-architecture-example/src/main/resources/application.properties new file mode 100644 index 00000000000..b2a3bf6b7fe --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/resources/application.properties @@ -0,0 +1,46 @@ +# Packaging +#quarkus.package.type=fast-jar + +#https://quarkus.io/guides/openapi-swaggerui +quarkus.http.cors=true +quarkus.smallrye-openapi.path=/docs/openapi.json +quarkus.swagger-ui.always-include=true +quarkus.kogito.data-index.graphql.ui.always-include=true +quarkus.http.test-port=0 + +# Kogito-service +kogito.service.url=http://localhost:8080 + +#Job-service +kogito.jobs-service.url=http://localhost:8080 +kogito.dataindex.http.url=http://localhost:8080 + +# run create tables scripts +quarkus.flyway.migrate-at-start=true +quarkus.flyway.baseline-on-migrate=true +quarkus.flyway.baseline-version=0.0 +quarkus.flyway.locations=classpath:/db/migration,classpath:/db/jobs-service,classpath:/db/data-audit/postgresql +quarkus.flyway.table=FLYWAY_RUNTIME_SERVICE + +kogito.persistence.type=jdbc +quarkus.datasource.db-kind=postgresql +%prod.quarkus.datasource.username=kogito-user +%prod.quarkus.datasource.password=kogito-pass +%prod.quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:postgresql://localhost:5432/kogito} +%prod.quarkus.datasource.reactive.url=${QUARKUS_DATASOURCE_REACTIVE_URL:postgresql://localhost:5432/kogito} + +quarkus.native.native-image-xmx=8g + +# profile to pack this example into a container, to use it execute activate the maven container profile, -Pcontainer +%container.quarkus.container-image.build=true +%container.quarkus.container-image.push=false +%container.quarkus.container-image.group=${USER} +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.tag=${project.version} +%container.quarkus.container-image.name=jppm-compact-architecture-example-service + +%dev.quarkus.kogito.devservices.enabled=false +%dev.jbpm.devui.users.jdoe.groups=admin,HR,IT + +# Disabling OIDC +quarkus.oidc.enabled=false \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/src/main/resources/hiring.bpmn b/examples/jbpm-compact-architecture-example/src/main/resources/hiring.bpmn new file mode 100644 index 00000000000..3c043c24cfc --- /dev/null +++ b/examples/jbpm-compact-architecture-example/src/main/resources/hiring.bpmn @@ -0,0 +1,691 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _B11455DE-F77A-4251-A85B-4C66636E3CD9 + _7DDA574A-C220-4FEF-9784-22EF8052EDEC + System.out.println("###################################"); +System.out.println("To: " + candidateData.getEmail()); +System.out.println("Subject: Congratulations you made it!"); +System.out.println("Dear " + candidateData.getFullName() + ", we are happy to tell you that you've successfuly went trhough the hiring process. You'll find the fina Offer details in attached."); +System.out.println("Job Category: " + offer.getCategory()); +System.out.println("Base salary: " + offer.getSalary()); +System.out.println("###################################"); + + + + + + + + _9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5 + _ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383 + System.out.println("###################################"); +System.out.println("Generated offer for candidate: " + candidateData.getFullName()); +System.out.println("Job Category: " + offer.getCategory()); +System.out.println("Base salary: " + offer.getSalary()); +System.out.println("###################################"); + + + _7DDA574A-C220-4FEF-9784-22EF8052EDEC + + + + + + + + _59F9A0E6-7F9C-43A9-8920-5B40A91169E6 + _9C33F5EA-89C7-4ED1-B3C2-CF18DE439AF5 + + + + + + + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_decisionInputX + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX + + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_fileNameInputX + + + + + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_namespaceInputX + + + + + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_decisionInputX + + + + + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_modelInputX + + + + + + + candidateData + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_CandidateDataInputX + + + _F4D56F6C-4CFE-4D5C-BF5E-67261F68EF1A_OfferOutputX + offer + + + + _527D3164-4989-4D2C-B80B-9BA9D4C8FB89 + + + + + + + + _94172225-E124-4F14-98DA-C3D62C11254A + _527D3164-4989-4D2C-B80B-9BA9D4C8FB89 + System.out.println("###################################"); +System.out.println("Candidate " + candidateData.getFullName() + " don't meet the requirements for the position but we'll keep it on records for the future!"); +System.out.println("###################################"); + + + + _5334FFDC-1FCB-47E6-8085-36DC9A3D17B9 + _B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E + _C6E61C53-FD35-4347-B69E-30AA93AE4404 + _94172225-E124-4F14-98DA-C3D62C11254A + + + _5162ABF0-DD2E-4BDC-9A46-DDCFCB010287 + _59F9A0E6-7F9C-43A9-8920-5B40A91169E6 + _C6E61C53-FD35-4347-B69E-30AA93AE4404 + + + _C62F7EFB-A009-450A-81C7-57D36F0DF766 + _B11455DE-F77A-4251-A85B-4C66636E3CD9 + _B7FC63DD-C08F-4CB3-A51A-79C1B8B18E6E + + + + + + + + _7B41F971-C74D-4036-8A5E-EFF81C37986A + _5334FFDC-1FCB-47E6-8085-36DC9A3D17B9 + System.out.println("###################################"); +System.out.println("HR Interview have been avoided after reasonable time"); +System.out.println("###################################"); + + + + + + + + + _8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A + _5162ABF0-DD2E-4BDC-9A46-DDCFCB010287 + System.out.println("New Hiring has been created for candidate: " + candidateData.getFullName()); + +kcontext.setVariable("hr_approval", false); +kcontext.setVariable("it_approval", false); + + + + + + + + _A76C6603-0406-423C-940B-3403948DCA1F + _C62F7EFB-A009-450A-81C7-57D36F0DF766 + + + + + + + + + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputX + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputX + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_offerInputX + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveInputX + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputX + + + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputX + + + + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputX + + + + + + + candidateData + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputX + + + offer + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_offerInputX + + + it_approval + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveInputX + + + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputX + + + + + + + _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputX + it_approval + + + + jdoe + + + + + + + + + + _ACEE7578-B7D2-4EDF-B104-9ECF3DD8A383 + _A76C6603-0406-423C-940B-3403948DCA1F + + + + + + + + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputX + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputX + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerInputX + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveInputX + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputX + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputX + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerOutputX + + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputX + + + + + + + candidateData + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputX + + + offer + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerInputX + + + hr_approval + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveInputX + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputX + + + + + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputX + hr_approval + + + _B8C4F63C-81AD-4291-9C1B-84967277EEF6_offerOutputX + offer + + + + jdoe + + + + + _8863B46B-9B0F-40B9-AAB1-A7503CF9AA0A + + + _7B41F971-C74D-4036-8A5E-EFF81C37986A + + PT180S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + _0IqVEG0AEDySCYWhrcdpgA + _0IqVEG0AEDySCYWhrcdpgA + + \ No newline at end of file diff --git a/examples/ping-pong-view-angular/README.md b/examples/ping-pong-view-angular/README.md index c3ad3cedbb0..eaed70e262d 100644 --- a/examples/ping-pong-view-angular/README.md +++ b/examples/ping-pong-view-angular/README.md @@ -1,3 +1,20 @@ + + # Ping-Pong View :: Angular implementation The Ping-Pong View is an interface that components can implement to be used inside a Ping-Pong View Envelope. @@ -9,3 +26,33 @@ It's build into 3 projects: - An Angular application that can run in an iFrame; - A Web Component from the angular components that can be rendered into any page; - A lib used to help render the Web Component in a container. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/ping-pong-view-react/README.md b/examples/ping-pong-view-react/README.md index e16caf8ca98..8dee412811b 100644 --- a/examples/ping-pong-view-react/README.md +++ b/examples/ping-pong-view-react/README.md @@ -1,3 +1,20 @@ + + # Ping-Pong View :: React implementation You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples-how-to-create-a-more-complex-custom-view.html) a step-by-step tutorial of how this custom View was built. @@ -5,3 +22,33 @@ You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples-how-to- The Ping-Pong View is an interface that components can implement to be used inside a Ping-Pong View Envelope. Ths package provides a Ping-Pong View implementation as a React component. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/ping-pong-view/README.md b/examples/ping-pong-view/README.md index d8b9851502e..beaa755ff48 100644 --- a/examples/ping-pong-view/README.md +++ b/examples/ping-pong-view/README.md @@ -1,3 +1,20 @@ + + # Ping-Pong View You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples-how-to-create-a-more-complex-custom-view.html) a step-by-step tutorial of how this custom View was built. @@ -63,3 +80,33 @@ It's divided into the following submodules: } ``` - **pingPongViewFactory** should be an instance of the factory class created in step _1_; + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/sonataflow-greeting-quarkus-example/README.md b/examples/sonataflow-greeting-quarkus-example/README.md index 987ca4eab22..f6ad33cc050 100644 --- a/examples/sonataflow-greeting-quarkus-example/README.md +++ b/examples/sonataflow-greeting-quarkus-example/README.md @@ -1,3 +1,20 @@ + + # KIE-Tools SonataFlow - Greeting Example ## Description @@ -150,3 +167,33 @@ You can also change the language parameter value to "Spanish" to get the greetin ## Deploying with Kogito Operator In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/sonataflow-greeting-quarkus-example/pom.xml b/examples/sonataflow-greeting-quarkus-example/pom.xml index 0d083e6e395..8b500cfc5a3 100644 --- a/examples/sonataflow-greeting-quarkus-example/pom.xml +++ b/examples/sonataflow-greeting-quarkus-example/pom.xml @@ -1,23 +1,21 @@ KIE Tools Example :: SonataFlow Greeting :: Quarkus SonataFlow Example - Quarkus + + + + org.apache.kie.sonataflow + sonataflow-quarkus-devui-bom + ${project.version} + pom + import + + + + org.apache.kie.sonataflow @@ -60,7 +70,6 @@ org.apache.kie.sonataflow sonataflow-quarkus-devui - ${project.version} org.kie diff --git a/examples/sonataflow-greeting-quarkus-example/src/main/resources/yamlgreet.sw.yml b/examples/sonataflow-greeting-quarkus-example/src/main/resources/yamlgreet.sw.yml index 3eb1f715fed..108b4dc6a31 100644 --- a/examples/sonataflow-greeting-quarkus-example/src/main/resources/yamlgreet.sw.yml +++ b/examples/sonataflow-greeting-quarkus-example/src/main/resources/yamlgreet.sw.yml @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + id: yamlgreet version: "1.0" name: Greeting workflow diff --git a/examples/todo-list-view-vscode-extension/README.md b/examples/todo-list-view-vscode-extension/README.md index 5cd4430ead8..61b35e68e5f 100644 --- a/examples/todo-list-view-vscode-extension/README.md +++ b/examples/todo-list-view-vscode-extension/README.md @@ -1,3 +1,20 @@ + + # 'To do' list View :: VS Code Extension You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8a-%e2%80%8ahow-to-create-a-vs-code-extension-for-a-custom-view.html) a step-by-step tutorial of how this VS Code Extension was built. @@ -20,3 +37,33 @@ This extensions has the following commands: ## Building Run `pnpm build:prod`. A `.vsix` file will be on the `dist` folder. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/todo-list-view/README.md b/examples/todo-list-view/README.md index dc2eb263f17..1784914df28 100644 --- a/examples/todo-list-view/README.md +++ b/examples/todo-list-view/README.md @@ -1,3 +1,20 @@ + + # 'To do' list View You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples-how-to-create-a-custom-view.html) a step-by-step tutorial of how this custom View was built. @@ -14,3 +31,33 @@ It's divided in the following submodules: - Provides the necessary class for a Channel to create a 'To do' list Envelope. 1. `vscode` - Provides a convenience class to create a Webview inside a VS Code Extension. + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/uniforms-patternfly/README.md b/examples/uniforms-patternfly/README.md new file mode 100644 index 00000000000..e134e8a5b71 --- /dev/null +++ b/examples/uniforms-patternfly/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools-examples/uniforms-patternfly + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/uniforms-patternfly/src/schemas/json-schema.ts b/examples/uniforms-patternfly/src/schemas/json-schema.ts index d74a2049f15..d2e99e55434 100644 --- a/examples/uniforms-patternfly/src/schemas/json-schema.ts +++ b/examples/uniforms-patternfly/src/schemas/json-schema.ts @@ -27,6 +27,7 @@ function createValidator(schema: any) { return (model: any) => { validator(model); if (validator.errors && validator.errors.length) { + console.error("VALIDATION ERROR: MODEL: ", model); throw { details: validator.errors }; } }; @@ -83,8 +84,8 @@ const schema = { }, numberOfBeds: { placeholder: "Select...", - enum: [1, 2, 3], - type: "number", + enum: [null, 0, 1, 2], + type: ["null", "number"], }, }, }, diff --git a/examples/webapp/README.md b/examples/webapp/README.md index 9a98d7d0202..5c9f54cf72a 100644 --- a/examples/webapp/README.md +++ b/examples/webapp/README.md @@ -1,3 +1,20 @@ + + ## Webapp Example You can read [here](https://blog.kie.org/2020/10/kogito-tooling-examples%e2%80%8a-%e2%80%8ahow-to-integrate-a-custom-editor-an-existing-editors-and-custom-views.html) a step-by-step tutorial of how create this WebApp. @@ -43,3 +60,33 @@ To start the webapp execute the following command on the root folder of the proj ```shell script pnpm -F @kie-tools-examples/webapp start ``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/examples/webapp/static/examples/sample.bpmn b/examples/webapp/static/examples/sample.bpmn index 5e743d410e1..9c5894125f3 100644 --- a/examples/webapp/static/examples/sample.bpmn +++ b/examples/webapp/static/examples/sample.bpmn @@ -1,3 +1,22 @@ + + diff --git a/examples/webapp/static/examples/sample.dmn b/examples/webapp/static/examples/sample.dmn index cb20a547f50..ac55ca5bb9d 100644 --- a/examples/webapp/static/examples/sample.dmn +++ b/examples/webapp/static/examples/sample.dmn @@ -1,3 +1,22 @@ + + diff --git a/package.json b/package.json index b58d0a7d455..4ef55aaf9d5 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "format": "prettier --write . '**/*.xml'", "format:check": "prettier --check . '**/*.xml'", "prepare": "husky install", + "update-kogito-version-to": "kie-tools--update-kogito-version-to", + "update-stream-name-to": "kie-tools--update-stream-name-to", "update-version-to": "kie-tools--update-version-to" }, "devDependencies": { @@ -18,6 +20,8 @@ "@kie-tools-scripts/check-junit-report-results": "workspace:*", "@kie-tools-scripts/run-script-if": "workspace:*", "@kie-tools-scripts/sparse-checkout": "workspace:*", + "@kie-tools-scripts/update-kogito-version": "workspace:*", + "@kie-tools-scripts/update-stream-name": "workspace:*", "@kie-tools-scripts/update-version": "workspace:*", "@kie/lock-treatment-tool": "^0.2.4", "@nice-move/prettier-plugin-package-json": "^0.6.1", diff --git a/packages/backend/README.md b/packages/backend/README.md index 4efd6045a52..f40e7e8f5fd 100644 --- a/packages/backend/README.md +++ b/packages/backend/README.md @@ -1 +1,48 @@ + + Apache KIE Tools Backend API + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/backend/package.json b/packages/backend/package.json index 37b3e515f02..b7803f3e118 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -26,7 +26,7 @@ "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/notifications": "workspace:*", "@kie-tools-core/workspace": "workspace:*", - "axios": "^1.6.4", + "axios": "^1.6.8", "fast-xml-parser": "^4.3.1", "portfinder": "^1.0.32", "semver": "^7.5.4", diff --git a/packages/boxed-expression-component/README.md b/packages/boxed-expression-component/README.md index bbcde626a6c..07ff0b92702 100644 --- a/packages/boxed-expression-component/README.md +++ b/packages/boxed-expression-component/README.md @@ -1,3 +1,20 @@ + + # Boxed Expression Editor This editor provides the possibility to edit the expression related to a Decision Node, or to a Business Knowledge Model's function. @@ -58,3 +75,33 @@ pnpm test:e2e # To update the PlayWright Snapshot files, used for the regression: pnpm test:e2e:run -u ``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/boxed-expression-component/src/BoxedExpressionEditor.tsx b/packages/boxed-expression-component/src/BoxedExpressionEditor.tsx index 30e4a095b4a..29c524e421c 100644 --- a/packages/boxed-expression-component/src/BoxedExpressionEditor.tsx +++ b/packages/boxed-expression-component/src/BoxedExpressionEditor.tsx @@ -20,7 +20,7 @@ import "@patternfly/react-styles/css/components/Drawer/drawer.css"; import { I18nDictionariesProvider } from "@kie-tools-core/i18n/dist/react-components"; import * as React from "react"; -import { BeeGwtService, DmnDataType, BoxedExpression, PmmlDocument } from "./api"; +import { BeeGwtService, BoxedExpression, DmnDataType, PmmlDocument } from "./api"; import { boxedExpressionEditorDictionaries, BoxedExpressionEditorI18nContext, @@ -42,7 +42,7 @@ export interface BoxedExpressionEditorProps { /** Name of the Decision or BKM containing `expression` */ expressionHolderName: string; /** TypeRef of the Decision or BKM containing `expression` */ - expressionHolderTypeRef: string; + expressionHolderTypeRef: string | undefined; /** The boxed expression itself */ expression: BoxedExpression | undefined; /** Called every time something changes on the expression */ diff --git a/packages/boxed-expression-component/src/api/BeeGwtService.ts b/packages/boxed-expression-component/src/api/BeeGwtService.ts index 4e85810e2c1..8a6b6b18762 100644 --- a/packages/boxed-expression-component/src/api/BeeGwtService.ts +++ b/packages/boxed-expression-component/src/api/BeeGwtService.ts @@ -25,7 +25,7 @@ import { BoxedExpression } from "./BoxedExpression"; export interface BeeGwtService { getDefaultExpressionDefinition( logicType: BoxedExpression["__$$element"] | undefined, - typeRef: string, + typeRef: string | undefined, isRoot?: boolean ): { expression: BoxedExpression; widthsById: Map }; diff --git a/packages/boxed-expression-component/src/contextMenu/MenuWithHelp/MenuItemWithHelp.tsx b/packages/boxed-expression-component/src/contextMenu/MenuWithHelp/MenuItemWithHelp.tsx index e6be10abb6c..aa488fc2b60 100644 --- a/packages/boxed-expression-component/src/contextMenu/MenuWithHelp/MenuItemWithHelp.tsx +++ b/packages/boxed-expression-component/src/contextMenu/MenuWithHelp/MenuItemWithHelp.tsx @@ -52,7 +52,10 @@ export function MenuItemWithHelp({ actions={ (isHovered || visibleHelp === menuItemHelp) && ( setVisibleHelp(menuItemHelp)} + onClick={(e) => { + e.stopPropagation(); + setVisibleHelp(menuItemHelp); + }} icon={} actionId={menuItemKey + "-help"} aria-label={menuItemKey + "-help"} diff --git a/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx b/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx index 95679d7e630..4c33f5b02c1 100644 --- a/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx +++ b/packages/boxed-expression-component/src/expressionVariable/DataTypeSelector.tsx @@ -19,18 +19,18 @@ import { Select, SelectGroup, SelectOption, SelectVariant } from "@patternfly/react-core/dist/js/components/Select"; import * as React from "react"; -import { useCallback, useState, useRef, useMemo } from "react"; +import { useCallback, useMemo, useRef, useState } from "react"; import { useBoxedExpressionEditorI18n } from "../i18n"; import * as _ from "lodash"; -import { DmnDataType } from "../api"; +import { DmnBuiltInDataType, DmnDataType } from "../api"; import { useBoxedExpressionEditor } from "../BoxedExpressionEditorContext"; import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; export interface DataTypeSelectorProps { /** The pre-selected data type */ - value: string; + value: string | undefined; /** On DataType selection callback */ - onChange: (dataType: string) => void; + onChange: (dataType: string | undefined) => void; /** By default the menu will be appended inline, but it is possible to append on the parent or on other elements */ /** Callback for toggle select behavior */ onToggle?: (isOpen: boolean) => void; @@ -41,6 +41,7 @@ export interface DataTypeSelectorProps { /** This is the optimal height for the dropdown menu for the "Data Type" */ const DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT = 500; +const MININAL_SELECT_DATA_TYPE_MENU_HEIGHT = 70; /** This margin is the height of the status bar in the on-line editor because it can't be overlaped */ const POPUP_BOTTOM_MARGIN = 46; @@ -64,7 +65,7 @@ export const DataTypeSelector: React.FunctionComponent = /* this setTimeout keeps the context menu open after type selection changes. Without this Popover component thinks there has been a click outside the context menu, after DataTypeSelector has changed. This because the Select component has been removed from the html*/ setTimeout(() => setOpen(false), 0); - onChange(selection); + onChange(selection === DmnBuiltInDataType.Undefined ? undefined : selection); // Because Select leave the focus to the detached btn, give back the focus to the selectWrapperRef (selectContainerRef.current?.querySelector("button") as HTMLInputElement)?.focus(); @@ -108,7 +109,7 @@ export const DataTypeSelector: React.FunctionComponent = return buildSelectGroups().reduce((acc, group) => { const filteredGroup = React.cloneElement(group, { children: group.props?.children?.filter((item: React.ReactElement) => - item.props.value.toLowerCase().includes(textInput.toLowerCase()) + (item.props.value ?? DmnBuiltInDataType.Undefined).toLowerCase().includes(textInput.toLowerCase()) ), }); @@ -140,7 +141,10 @@ export const DataTypeSelector: React.FunctionComponent = DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT + yPos > availableHeight ) { const offset = DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT + yPos - availableHeight; - return DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT - offset - POPUP_BOTTOM_MARGIN; + const calculatedHeight = DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT - offset - POPUP_BOTTOM_MARGIN; + return calculatedHeight < MININAL_SELECT_DATA_TYPE_MENU_HEIGHT + ? MININAL_SELECT_DATA_TYPE_MENU_HEIGHT + : calculatedHeight; } } return DEFAULT_SELECT_DATA_TYPE_MENU_HEIGHT; @@ -157,7 +161,7 @@ export const DataTypeSelector: React.FunctionComponent = onSelect={onSelect} onFilter={onFilter} isOpen={isOpen} - selections={value} + selections={value ?? DmnBuiltInDataType.Undefined} isGrouped={true} hasInlineFilter={true} inlineFilterPlaceholderText={i18n.choose} diff --git a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx index 735c0c32c02..aeaab2fe45c 100644 --- a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx +++ b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableCell.tsx @@ -49,7 +49,7 @@ export const ExpressionVariableCell: React.FunctionComponent< const { expression, variable, index } = data[rowIndex]; const onVariableUpdated = useCallback( - ({ name = DEFAULT_EXPRESSION_VARIABLE_NAME, typeRef = DmnBuiltInDataType.Undefined }) => { + ({ name = DEFAULT_EXPRESSION_VARIABLE_NAME, typeRef = undefined }) => { onExpressionWithVariableUpdated(index, { // `expression` and `variable` must always have the same `typeRef` and `name/label`, as those are dictated by `variable`. expression: expression @@ -99,7 +99,7 @@ export const ExpressionVariableCell: React.FunctionComponent< rowIndex, columnIndex, undefined, - useCallback(() => `${variable["@_name"]} (${variable["@_typeRef"] ?? DmnBuiltInDataType.Undefined}})`, [variable]) + useCallback(() => `${variable["@_name"]} (${variable["@_typeRef"]}})`, [variable]) ); const { beeGwtService } = useBoxedExpressionEditor(); diff --git a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx index c257fdea2c5..03e50bfe219 100644 --- a/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx +++ b/packages/boxed-expression-component/src/expressionVariable/ExpressionVariableMenu.tsx @@ -18,10 +18,9 @@ */ import * as React from "react"; -import { useCallback, useEffect, useState, useRef } from "react"; +import { useCallback, useEffect, useRef, useState } from "react"; import { PopoverMenu, PopoverMenuRef } from "../contextMenu/PopoverMenu"; import { useBoxedExpressionEditorI18n } from "../i18n"; -import { DmnBuiltInDataType, BoxedExpression } from "../api"; import { useBoxedExpressionEditor } from "../BoxedExpressionEditorContext"; import { DataTypeSelector } from "./DataTypeSelector"; import { CogIcon } from "@patternfly/react-icons/dist/js/icons/cog-icon"; @@ -30,7 +29,7 @@ import { NavigationKeysUtils } from "../keysUtils/keyUtils"; import { PopoverPosition } from "@patternfly/react-core/dist/js/components/Popover"; import "./ExpressionVariableMenu.css"; -export type OnExpressionVariableUpdated = (args: { name: string; typeRef: string }) => void; +export type OnExpressionVariableUpdated = (args: { name: string; typeRef: string | undefined }) => void; export interface ExpressionVariableMenuProps { /** Optional children element to be considered for triggering the edit expression menu */ @@ -62,7 +61,7 @@ export function ExpressionVariableMenu({ arrowPlacement, nameField, dataTypeField, - selectedDataType = DmnBuiltInDataType.Undefined, + selectedDataType = undefined, selectedExpressionName, onVariableUpdated, position, @@ -92,7 +91,7 @@ export function ExpressionVariableMenu({ setExpressionName(event.target.value); }, []); - const onDataTypeChange = useCallback((dataType: DmnBuiltInDataType) => { + const onDataTypeChange = useCallback((dataType: string | undefined) => { setDataType(dataType); }, []); diff --git a/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx b/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx index 1bb8078b966..c3b1dee1373 100644 --- a/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx +++ b/packages/boxed-expression-component/src/expressions/ContextExpression/ContextExpression.tsx @@ -35,11 +35,11 @@ import { import { useBoxedExpressionEditorI18n } from "../../i18n"; import { useNestedExpressionContainerWithNestedExpressions } from "../../resizing/Hooks"; import { NestedExpressionContainerContext } from "../../resizing/NestedExpressionContainerContext"; -import { ResizerStopBehavior, ResizingWidth, useResizingWidths } from "../../resizing/ResizingWidthsContext"; +import { ResizerStopBehavior, ResizingWidth } from "../../resizing/ResizingWidthsContext"; import { CONTEXT_ENTRY_EXPRESSION_MIN_WIDTH, - CONTEXT_ENTRY_VARIABLE_MIN_WIDTH, CONTEXT_ENTRY_VARIABLE_COLUMN_WIDTH_INDEX, + CONTEXT_ENTRY_VARIABLE_MIN_WIDTH, CONTEXT_EXPRESSION_EXTRA_WIDTH, } from "../../resizing/WidthConstants"; import { useBeeTableCoordinates, useBeeTableSelectableCellRef } from "../../selection/BeeTableSelectionContext"; @@ -49,13 +49,11 @@ import { DEFAULT_EXPRESSION_VARIABLE_NAME } from "../../expressionVariable/Expre import { ContextEntryExpressionCell } from "./ContextEntryExpressionCell"; import { ExpressionVariableCell, ExpressionWithVariable } from "../../expressionVariable/ExpressionVariableCell"; import { ContextResultExpressionCell } from "./ContextResultExpressionCell"; -import { getExpressionMinWidth, getExpressionTotalMinWidth } from "../../resizing/WidthMaths"; +import { getExpressionTotalMinWidth } from "../../resizing/WidthMaths"; import { DMN15__tContextEntry } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { findAllIdsDeep } from "../../ids/ids"; import "./ContextExpression.css"; -const CONTEXT_ENTRY_DEFAULT_DATA_TYPE = DmnBuiltInDataType.Undefined; - export type ROWTYPE = ExpressionWithVariable & { index: number }; export function ContextExpression({ @@ -156,7 +154,7 @@ export function ContextExpression({ accessor: expressionHolderId as any, // FIXME: https://github.com/apache/incubator-kie-issues/issues/169 label: contextExpression["@_label"] ?? DEFAULT_EXPRESSION_VARIABLE_NAME, isRowIndexColumn: false, - dataType: contextExpression["@_typeRef"] ?? CONTEXT_ENTRY_DEFAULT_DATA_TYPE, + dataType: contextExpression["@_typeRef"] ?? DmnBuiltInDataType.Undefined, width: undefined, columns: [ { @@ -286,7 +284,7 @@ export function ContextExpression({ variable: { "@_id": generateUuid(), "@_name": variableName, - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, description: { __$$text: "" }, }, }; diff --git a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx index c9af257bcc4..27332a19b8d 100644 --- a/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx +++ b/packages/boxed-expression-component/src/expressions/DecisionTableExpression/DecisionTableExpression.tsx @@ -62,7 +62,6 @@ import { DMN15__tInputClause, DMN15__tLiteralExpression, DMN15__tOutputClause, - DMN15__tRuleAnnotation, DMN15__tRuleAnnotationClause, DMN15__tUnaryTests, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; @@ -728,7 +727,7 @@ export function DecisionTableExpression({ "@_id": generateUuid(), inputExpression: { "@_id": generateUuid(), - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, text: { __$$text: newName }, }, }); @@ -768,7 +767,7 @@ export function DecisionTableExpression({ outputColumnsToAdd.push({ "@_id": generateUuid(), "@_name": name, - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, }); } diff --git a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionContainer.tsx b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionContainer.tsx index e5108118450..bc1f446fd2e 100644 --- a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionContainer.tsx +++ b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionContainer.tsx @@ -20,7 +20,7 @@ import * as React from "react"; import { useCallback, useEffect, useRef } from "react"; import { useBoxedExpressionEditor, useBoxedExpressionEditorDispatch } from "../../BoxedExpressionEditorContext"; -import { BoxedExpression, DmnBuiltInDataType, generateUuid } from "../../api"; +import { BoxedExpression, generateUuid } from "../../api"; import { findAllIdsDeep } from "../../ids/ids"; import { DEFAULT_EXPRESSION_VARIABLE_NAME } from "../../expressionVariable/ExpressionVariableMenu"; import { useBeeTableSelectableCellRef } from "../../selection/BeeTableSelectionContext"; @@ -65,11 +65,7 @@ export const ExpressionContainer: React.FunctionComponent { const { expression: defaultExpression, widthsById: defaultWidthsById } = - beeGwtService!.getDefaultExpressionDefinition( - logicType, - parentElementTypeRef ?? expressionTypeRef ?? DmnBuiltInDataType.Undefined, - !isNested - ); + beeGwtService!.getDefaultExpressionDefinition(logicType, parentElementTypeRef ?? expressionTypeRef, !isNested); setExpression((prev: BoxedExpression) => { // Do not inline this variable for type safety. See https://github.com/microsoft/TypeScript/issues/241 diff --git a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx index cd097f15429..466a7ea4a8c 100644 --- a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx +++ b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionLogicTypeSelector.tsx @@ -33,11 +33,10 @@ import { RebootingIcon } from "@patternfly/react-icons/dist/js/icons/rebooting-i import { ResourcesAlmostEmptyIcon } from "@patternfly/react-icons/dist/js/icons/resources-almost-empty-icon"; import { ResourcesFullIcon } from "@patternfly/react-icons/dist/js/icons/resources-full-icon"; import * as React from "react"; -import { useCallback, useEffect, useMemo, useState } from "react"; +import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react"; import { BoxedExpression } from "../../api"; import { useCustomContextMenuHandler } from "../../contextMenu"; import { MenuItemWithHelp } from "../../contextMenu/MenuWithHelp"; -import { PopoverMenu } from "../../contextMenu/PopoverMenu"; import { useBoxedExpressionEditorI18n } from "../../i18n"; import { useNestedExpressionContainer } from "../../resizing/NestedExpressionContainerContext"; import { useBoxedExpressionEditor, useBoxedExpressionEditorDispatch } from "../../BoxedExpressionEditorContext"; @@ -76,11 +75,14 @@ export interface ExpressionDefinitionLogicTypeSelectorProps { hideDmn14BoxedExpressions?: boolean; } +const DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT = 550; +const LOGIC_TYPE_SELECTOR_BOTTOM_MARGIN = 5; +const PASTE_MENU_ITEM_ID = "paste"; + export function ExpressionDefinitionLogicTypeSelector({ expression, onLogicTypeSelected, onLogicTypeReset, - getPlacementRef, isResetSupported, isNested, parentElementId, @@ -90,6 +92,27 @@ export function ExpressionDefinitionLogicTypeSelector({ () => (isNested ? new Set([undefined]) : new Set([undefined, "functionDefinition"])), [isNested] ); + const { i18n } = useBoxedExpressionEditorI18n(); + const { setCurrentlyOpenContextMenu, widthsById, scrollableParentRef } = useBoxedExpressionEditor(); + const [isOpen, setOpen] = useState(false); + const [position, setPosition] = useState({ x: 0, y: 0 }); + + const showSelectExpression = useCallback( + (e: React.MouseEvent) => { + setPosition({ + x: + e.pageX + + (scrollableParentRef.current?.offsetLeft ?? 0) - + (scrollableParentRef.current?.getBoundingClientRect().left ?? 0), + y: + e.pageY + + (scrollableParentRef.current?.offsetTop ?? 0) - + (scrollableParentRef.current?.getBoundingClientRect().top ?? 0), + }); + setOpen(true); + }, + [scrollableParentRef] + ); const selectableLogicTypes = useMemo>( () => [ @@ -101,17 +124,15 @@ export function ExpressionDefinitionLogicTypeSelector({ "invocation", ...(isNested ? (["functionDefinition"] as const) : []), ...(!hideDmn14BoxedExpressions ? (["conditional"] as const) : []), - "for", - "every", - "some", - "filter", + ...(!hideDmn14BoxedExpressions ? (["for"] as const) : []), + ...(!hideDmn14BoxedExpressions ? (["every"] as const) : []), + ...(!hideDmn14BoxedExpressions ? (["some"] as const) : []), + ...(!hideDmn14BoxedExpressions ? (["filter"] as const) : []), ], [hideDmn14BoxedExpressions, isNested] ); - const { i18n } = useBoxedExpressionEditorI18n(); - - const { setCurrentlyOpenContextMenu, editorRef, widthsById } = useBoxedExpressionEditor(); + const selectLogicTypeContainer = useRef(null); const renderExpression = useMemo(() => { const logicType = expression?.__$$element; @@ -152,20 +173,15 @@ export function ExpressionDefinitionLogicTypeSelector({ } }, [expression, isNested, parentElementId]); - const getPopoverArrowPlacement = useCallback(() => { - return getPlacementRef() as HTMLDivElement; - }, [getPlacementRef]); - - const getPopoverContainer = useCallback(() => { - return editorRef?.current ?? getPopoverArrowPlacement; - }, [getPopoverArrowPlacement, editorRef]); - const selectLogicType = useCallback( - (_: React.MouseEvent, itemId?: string | number) => { - onLogicTypeSelected(itemId as BoxedExpression["__$$element"] | undefined); + (mouseEvent: React.MouseEvent, itemId?: string | number) => { + if (itemId !== PASTE_MENU_ITEM_ID) { + onLogicTypeSelected(itemId as BoxedExpression["__$$element"] | undefined); + } setCurrentlyOpenContextMenu(undefined); - setPasteExpressionError(""); setVisibleHelp(""); + setOpen(false); + mouseEvent.stopPropagation(); }, [onLogicTypeSelected, setCurrentlyOpenContextMenu] ); @@ -195,6 +211,27 @@ export function ExpressionDefinitionLogicTypeSelector({ return isResetContextMenuOpen && expression && isResetSupported; }, [isResetContextMenuOpen, isResetSupported, expression]); + const selectExpressionMenuContainerRef = React.useRef(null); + + const shouldRenderSelectExpressionContextMenu = useMemo(() => { + return isOpen && !expression; + }, [isOpen, expression]); + + const hide = useCallback((e: MouseEvent) => { + if (e.target != selectExpressionMenuContainerRef.current) { + setOpen(false); + } + }, []); + + useEffect(() => { + if (isOpen) { + document.addEventListener("click", hide); + } + return () => { + document.removeEventListener("click", hide); + }; + }, [hide, isOpen]); + const logicTypeIcon = useCallback((logicType: BoxedExpression["__$$element"] | undefined) => { switch (logicType) { case undefined: @@ -454,135 +491,186 @@ export function ExpressionDefinitionLogicTypeSelector({ setVisibleHelp((previousHelp) => (previousHelp !== help ? help : "")); }, []); - return ( - <> -
{ + if (selectLogicTypeContainer.current) { + const boundingClientRect = selectLogicTypeContainer.current?.getBoundingClientRect(); + if (boundingClientRect) { + const yPos = boundingClientRect.top; + const availableHeight = document.documentElement.clientHeight; + if (DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT + yPos > availableHeight) { + const offset = + DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT + yPos - availableHeight - LOGIC_TYPE_SELECTOR_BOTTOM_MARGIN; + selectLogicTypeContainer.current.style.height = DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT - offset + "px"; + selectLogicTypeContainer.current.style.overflowY = "scroll"; + } else { + selectLogicTypeContainer.current.style.height = DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT + "px"; + selectLogicTypeContainer.current.style.overflowY = "visible"; } - > - {expression ? ( - <> - {showExpressionHeader && ( -
- { - if (NavigationKeysUtils.isEsc(e.key)) { - setDropdownOpen(false); - } - }} - toggle={ - {logicTypeIcon(expression.__$$element)}} - style={{ padding: 0 }} - onToggle={setDropdownOpen} - tabIndex={-1} - > - {getLogicTypeLabel(expression?.__$$element)} - {expression.__$$element === "functionDefinition" && ` (${expression["@_kind"]})`} - - } + } else { + selectLogicTypeContainer.current.style.height = DEFAULT_LOGIC_TYPE_SELECTOR_HEIGHT + "px"; + selectLogicTypeContainer.current.style.overflowY = "visible"; + } + } + }); + + const getRenderExpressionElement = useCallback(() => { + return ( + <> + {showExpressionHeader && expression && ( +
+ { + if (NavigationKeysUtils.isEsc(e.key)) { + setDropdownOpen(false); + } + }} + toggle={ + {logicTypeIcon(expression.__$$element)}} + style={{ padding: 0 }} + onToggle={setDropdownOpen} + tabIndex={-1} > - - <>{contextMenuItems} - - -
- )} - {renderExpression} - - ) : ( - i18n.selectExpression + {getLogicTypeLabel(expression?.__$$element)} + {expression.__$$element === "functionDefinition" && ` (${expression["@_kind"]})`} + + } + > + + <>{contextMenuItems} + +
+
)} + {renderExpression} + + ); + }, [contextMenuItems, expression, isDropdownOpen, logicTypeIcon, renderExpression, showExpressionHeader]); - {!expression && ( - { - setPasteExpressionError(""); - setVisibleHelp(""); - }} - arrowPlacement={getPopoverArrowPlacement} - appendTo={getPopoverContainer()} - className="logic-type-popover" - hasAutoWidth={true} - body={ - <> - - - - <> - {selectableLogicTypes.map((key) => { - const label = getLogicTypeLabel(key); - return ( - - ); - })} - - - - - - - - - -
- } - > - {i18n.terms.paste} - - - - - } - /> - )} + const getSelectExpressionElement = useCallback(() => { + return ( +
+ + + + {selectableLogicTypes.map((key) => { + const label = getLogicTypeLabel(key); + return ( + + ); + })} + + + +
+ } + > + {i18n.terms.paste} + + + + - {shouldRenderResetContextMenu && ( + ); + }, [ + i18n.terms.paste, + logicTypeHelp, + logicTypeIcon, + menuIconContainerStyle, + pasteExpression, + pasteExpressionError, + position.x, + position.y, + selectLogicType, + selectableLogicTypes, + toggleVisibleHelp, + visibleHelp, + ]); + + const getResetExpressionElement = useCallback(() => { + return ( +
{ + if (NavigationKeysUtils.isEsc(e.key)) { + setDropdownOpen(false); + } + }} + > + + + {contextMenuItems} + +
+ ); + }, [contextMenuItems, expression?.__$$element, resetContextMenuXPos, resetContextMenuYPos]); + + return ( + <> + {!expression && (
{ - if (NavigationKeysUtils.isEsc(e.key)) { - setDropdownOpen(false); - } - }} + className={cssClass} + ref={selectExpressionMenuContainerRef} + onClick={showSelectExpression} + style={ + !expression && nestedExpressionContainer.resizingWidth + ? { width: `${nestedExpressionContainer.resizingWidth?.value}px` } + : {} + } + > + {i18n.selectExpression} + {!expression && shouldRenderSelectExpressionContextMenu && getSelectExpressionElement()} +
+ )} + + {expression && ( +
- - - {contextMenuItems} - + {expression ? getRenderExpressionElement() : i18n.selectExpression}
)} + {shouldRenderResetContextMenu && getResetExpressionElement()} ); } diff --git a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionRoot.tsx b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionRoot.tsx index 0ad8abb2907..3139416ed87 100644 --- a/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionRoot.tsx +++ b/packages/boxed-expression-component/src/expressions/ExpressionDefinitionRoot/ExpressionDefinitionRoot.tsx @@ -25,7 +25,7 @@ import "./ExpressionDefinitionRoot.css"; export interface ExpressionDefinitionRootProps { expressionHolderId: string; - expressionHolderTypeRef: string; + expressionHolderTypeRef: string | undefined; expression?: BoxedExpression; isResetSupported: boolean | undefined; expressionHolderName?: string; diff --git a/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx b/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx index 91be6514c94..2bc3aa89ffb 100644 --- a/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx +++ b/packages/boxed-expression-component/src/expressions/FunctionExpression/FeelFunctionExpression.tsx @@ -27,10 +27,10 @@ import { BeeTableOperation, BeeTableOperationConfig, BeeTableProps, - DmnBuiltInDataType, BoxedExpression, BoxedFunction, BoxedFunctionKind, + DmnBuiltInDataType, } from "../../api"; import { useBoxedExpressionEditorI18n } from "../../i18n"; import { useNestedExpressionContainerWithNestedExpressions } from "../../resizing/Hooks"; diff --git a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx index 5875422b6c4..48a36374342 100644 --- a/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx +++ b/packages/boxed-expression-component/src/expressions/FunctionExpression/FunctionExpression.tsx @@ -20,15 +20,15 @@ import _ from "lodash"; import * as React from "react"; import { useCallback, useMemo } from "react"; -import { DmnBuiltInDataType, BoxedFunction, BoxedFunctionKind, generateUuid } from "../../api"; +import { BoxedFunction, BoxedFunctionKind, DmnBuiltInDataType, generateUuid } from "../../api"; import { PopoverMenu } from "../../contextMenu/PopoverMenu"; import { useBoxedExpressionEditorI18n } from "../../i18n"; import { useBoxedExpressionEditor, useBoxedExpressionEditorDispatch } from "../../BoxedExpressionEditorContext"; -import { FeelFunctionExpression, BoxedFunctionFeel } from "./FeelFunctionExpression"; +import { BoxedFunctionFeel, FeelFunctionExpression } from "./FeelFunctionExpression"; import { FunctionKindSelector } from "./FunctionKindSelector"; -import { JavaFunctionExpression, BoxedFunctionJava } from "./JavaFunctionExpression"; +import { BoxedFunctionJava, JavaFunctionExpression } from "./JavaFunctionExpression"; import { ParametersPopover } from "./ParametersPopover"; -import { PmmlFunctionExpression, BoxedFunctionPmml } from "./PmmlFunctionExpression"; +import { BoxedFunctionPmml, PmmlFunctionExpression } from "./PmmlFunctionExpression"; import { DMN15__tFunctionDefinition, DMN15__tFunctionKind, @@ -86,11 +86,11 @@ export function useFunctionExpressionControllerCell(functionKind: DMN15__tFuncti "@_label": prev["@_label"], "@_id": generateUuid(), "@_kind": BoxedFunctionKind.Feel, - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, expression: { __$$element: "literalExpression", "@_id": generateUuid(), - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, }, formalParameter: [], }; @@ -108,7 +108,7 @@ export function useFunctionExpressionControllerCell(functionKind: DMN15__tFuncti "@_id": generateUuid(), }, "@_kind": BoxedFunctionKind.Java, - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, formalParameter: [], }; return retJava; @@ -123,7 +123,7 @@ export function useFunctionExpressionControllerCell(functionKind: DMN15__tFuncti "@_id": generateUuid(), }, "@_kind": BoxedFunctionKind.Pmml, - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, formalParameter: [], }; return retPmml; @@ -167,7 +167,9 @@ export function useFunctionExpressionParametersColumnHeader( {parameter["@_name"]} {": "} - ({parameter["@_typeRef"]}) + + ({parameter["@_typeRef"] ?? DmnBuiltInDataType.Undefined}) + {i < (formalParameters ?? []).length - 1 && {", "}} ))} diff --git a/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx b/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx index ddf0285725d..430ca10c3f1 100644 --- a/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx +++ b/packages/boxed-expression-component/src/expressions/FunctionExpression/JavaFunctionExpression.tsx @@ -29,10 +29,10 @@ import { BeeTableOperation, BeeTableOperationConfig, BeeTableProps, - DmnBuiltInDataType, + BoxedFunction, BoxedFunctionKind, + DmnBuiltInDataType, generateUuid, - BoxedFunction, } from "../../api"; import { useBoxedExpressionEditorI18n } from "../../i18n"; import { usePublishedBeeTableResizableColumns } from "../../resizing/BeeTableResizableColumnsContext"; diff --git a/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx b/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx index 12bd285985c..db5aed31578 100644 --- a/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx +++ b/packages/boxed-expression-component/src/expressions/FunctionExpression/ParametersPopover.tsx @@ -24,7 +24,7 @@ import { CubesIcon } from "@patternfly/react-icons/dist/js/icons/cubes-icon"; import { OutlinedTrashAltIcon } from "@patternfly/react-icons/dist/js/icons/outlined-trash-alt-icon"; import * as React from "react"; import { ChangeEvent, useCallback } from "react"; -import { DmnBuiltInDataType, BoxedFunction, generateUuid, getNextAvailablePrefixedName } from "../../api"; +import { BoxedFunction, DmnBuiltInDataType, generateUuid, getNextAvailablePrefixedName } from "../../api"; import { useBoxedExpressionEditorI18n } from "../../i18n"; import { useBoxedExpressionEditorDispatch } from "../../BoxedExpressionEditorContext"; import { DMN15__tInformationItem } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; @@ -51,7 +51,7 @@ export const ParametersPopover: React.FunctionComponent (prev.formalParameter ?? []).map((p) => p["@_name"]), "p" ), - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, }, ]; @@ -120,7 +120,7 @@ function ParameterEntry({ parameter, index }: { parameter: DMN15__tInformationIt ); const onDataTypeChange = useCallback( - (typeRef: string) => { + (typeRef: string | undefined) => { setExpression((prev: BoxedFunction) => { const newParameters = [...(prev.formalParameter ?? [])]; newParameters[index] = { @@ -166,11 +166,7 @@ function ParameterEntry({ parameter, index }: { parameter: DMN15__tInformationIt placeholder={"Parameter Name"} defaultValue={parameter["@_name"]} /> - + ); } - -// - -export async function runElk( - nodes: Elk.ElkNode[], - edges: { id: string; sources: string[]; targets: string[] }[], - options: Elk.LayoutOptions = {} -): Promise<{ isHorizontal: boolean; nodes: Elk.ElkNode[] | undefined; edges: Elk.ElkExtendedEdge[] | undefined }> { - const isHorizontal = options?.["elk.direction"] === "RIGHT"; - - const graph: Elk.ElkNode = { - id: "root", - layoutOptions: options, - children: nodes, - edges, - }; - - const layoutedGraph = await elk.layout(graph); - return { - isHorizontal, - nodes: layoutedGraph.children, - edges: layoutedGraph.edges as any[], - }; -} - -function visitNodeAndNested( - elkNode: Elk.ElkNode, - positionOffset: { x: number; y: number }, - visitor: (elkNode: Elk.ElkNode, positionOffset: { x: number; y: number }) => void -) { - visitor(elkNode, positionOffset); - for (const nestedNode of elkNode.children ?? []) { - visitNodeAndNested( - nestedNode, - { - x: elkNode.x! + positionOffset.x, - y: elkNode.y! + positionOffset.y, - }, - visitor - ); - } -} diff --git a/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts b/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts new file mode 100644 index 00000000000..74cd1b79ba2 --- /dev/null +++ b/packages/dmn-editor/src/autolayout/autoLayoutInfo.ts @@ -0,0 +1,407 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { DC__Bounds } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import ELK, * as Elk from "elkjs/lib/elk.bundled.js"; +import { Edge, Node } from "reactflow"; +import { NodeType } from "../diagram/connections/graphStructure"; +import { DmnDiagramEdgeData } from "../diagram/edges/Edges"; +import { DrgEdge, getAdjMatrix, traverse } from "../diagram/graph/graph"; +import { getContainmentRelationship } from "../diagram/maths/DmnMaths"; +import { DEFAULT_NODE_SIZES, MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; +import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; +import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; +import { SnapGrid } from "../store/Store"; +import { addNamespaceToHref, parseXmlHref } from "../xml/xmlHrefs"; + +const elk = new ELK(); + +export const ELK_OPTIONS = { + "elk.algorithm": "layered", + "elk.direction": "UP", + // By making width a lot bigger than height, we make sure disjoint graph components are placed horizontally, never vertically + "elk.aspectRatio": "9999999999", + // spacing + "elk.spacing.nodeNode": "60", + "elk.spacing.componentComponent": "200", + "layered.spacing.edgeEdgeBetweenLayers": "0", + "layered.spacing.edgeNodeBetweenLayers": "0", + "layered.spacing.nodeNodeBetweenLayers": "100", + // edges + "elk.edgeRouting": "ORTHOGONAL", + "elk.layered.mergeEdges": "true", // we need this to make sure space is consistent between layers. + "elk.layered.mergeHierarchyEdges": "true", + // positioning + "elk.partitioning.activate": "true", + "elk.nodePlacement.favorStraightEdges": "true", + "elk.nodePlacement.bk.fixedAlignment": "LEFTDOWN", + "elk.nodePlacement.bk.edgeStraightening": "IMPROVE_STRAIGHTNESS", + // + "layering.strategy": "LONGEST_PATH_SOURCE", +}; + +const PARENT_NODE_ELK_OPTIONS = { + "elk.padding": "[left=60, top=60, right=80, bottom=60]", + "elk.spacing.componentComponent": "60", +}; + +export interface AutolayoutParentNode { + decisionServiceSection: "output" | "encapsulated" | "n/a"; + elkNode: Elk.ElkNode; + contained: Set; + dependents: Set; + dependencies: Set; + contains: (otherNode: { id: string; bounds: DC__Bounds | undefined }) => { + isInside: boolean; + decisionServiceSection: AutolayoutParentNode["decisionServiceSection"]; + }; + hasDependencyTo: (otherNode: { id: string }) => boolean; + isDependencyOf: (otherNode: { id: string }) => boolean; +} + +export const FAKE_MARKER = "__$FAKE$__"; + +export async function getAutoLayoutedInfo({ + __readonly_snapGrid, + __readonly_nodesById, + __readonly_edgesById, + __readonly_nodes, + __readonly_drgEdges, + __readonly_isAlternativeInputDataShape, +}: { + __readonly_snapGrid: SnapGrid; + __readonly_nodesById: Map>; + __readonly_edgesById: Map>; + __readonly_nodes: Node[]; + __readonly_drgEdges: DrgEdge[]; + __readonly_isAlternativeInputDataShape: boolean; +}) { + const parentNodesById = new Map(); + const nodeParentsById = new Map>(); + + /** + Used to tell ELK that dependencies of nodes' children should be considered the node's dependency too. + This allows us to not rely on INCLUDE_STRATEGY hierarchy handling on ELK, keeping disjoint graph components separate, rendering side-by-side. + */ + const fakeEdgesForElk = new Set(); + + const adjMatrix = getAdjMatrix(__readonly_drgEdges); + + // 1. First we populate the `parentNodesById` map so that we know exactly what parent nodes we're dealing with. Decision Service nodes have two fake nodes to represent Output and Encapsulated sections. + for (const node of __readonly_nodes) { + const dependencies = new Set(); + const dependents = new Set(); + + if (node.data?.dmnObject?.__$$element === "decisionService") { + const { namespace } = parseXmlHref(node.id); + const outputs = new Set([ + ...(node.data.dmnObject.outputDecision ?? []).map((s) => addNamespaceToHref({ href: s["@_href"], namespace })), + ]); + const encapsulated = new Set([ + ...(node.data.dmnObject.encapsulatedDecision ?? []).map((s) => + addNamespaceToHref({ href: s["@_href"], namespace }) + ), + ]); + + const idOfFakeNodeForOutputSection = `${node.id}${FAKE_MARKER}dsOutput`; + const idOfFakeNodeForEncapsulatedSection = `${node.id}${FAKE_MARKER}dsEncapsulated`; + + const dsSize = MIN_NODE_SIZES[NODE_TYPES.decisionService]({ snapGrid: __readonly_snapGrid }); + parentNodesById.set(node.id, { + elkNode: { + id: node.id, + width: dsSize["@_width"], + height: dsSize["@_height"], + children: [ + { + id: idOfFakeNodeForOutputSection, + width: dsSize["@_width"], + height: dsSize["@_height"] / 2, + children: [], + layoutOptions: { + ...ELK_OPTIONS, + ...PARENT_NODE_ELK_OPTIONS, + }, + }, + { + id: idOfFakeNodeForEncapsulatedSection, + width: dsSize["@_width"], + height: dsSize["@_height"] / 2, + children: [], + layoutOptions: { + ...ELK_OPTIONS, + ...PARENT_NODE_ELK_OPTIONS, + }, + }, + ], + layoutOptions: { + "elk.algorithm": "layered", + "elk.direction": "UP", + "elk.aspectRatio": "9999999999", + "elk.partitioning.activate": "true", + "elk.spacing.nodeNode": "0", + "elk.spacing.componentComponent": "0", + "layered.spacing.edgeEdgeBetweenLayers": "0", + "layered.spacing.edgeNodeBetweenLayers": "0", + "layered.spacing.nodeNodeBetweenLayers": "0", + "elk.padding": "[left=0, top=0, right=0, bottom=0]", + }, + }, + decisionServiceSection: "output", + dependencies, + dependents, + contained: outputs, + contains: ({ id }) => ({ + isInside: outputs.has(id) || encapsulated.has(id), + decisionServiceSection: outputs.has(id) ? "output" : encapsulated.has(id) ? "encapsulated" : "n/a", + }), + isDependencyOf: ({ id }) => dependents.has(id), + hasDependencyTo: ({ id }) => dependencies.has(id), + }); + + fakeEdgesForElk.add({ + id: `${node.id}${FAKE_MARKER}fakeOutputEncapsulatedEdge`, + sources: [idOfFakeNodeForEncapsulatedSection], + targets: [idOfFakeNodeForOutputSection], + }); + } else if (node.data?.dmnObject?.__$$element === "group") { + const groupSize = DEFAULT_NODE_SIZES[NODE_TYPES.group]({ snapGrid: __readonly_snapGrid }); + const groupBounds = node.data.shape["dc:Bounds"]; + parentNodesById.set(node.id, { + decisionServiceSection: "n/a", + elkNode: { + id: node.id, + width: groupBounds?.["@_width"] ?? groupSize["@_width"], + height: groupBounds?.["@_height"] ?? groupSize["@_height"], + children: [], + layoutOptions: { + ...ELK_OPTIONS, + ...PARENT_NODE_ELK_OPTIONS, + }, + }, + dependencies, + dependents, + contained: new Set(), + contains: ({ id, bounds }) => ({ + isInside: getContainmentRelationship({ + bounds: bounds!, + container: groupBounds!, + snapGrid: __readonly_snapGrid, + isAlternativeInputDataShape: __readonly_isAlternativeInputDataShape, + containerMinSizes: MIN_NODE_SIZES[NODE_TYPES.group], + boundsMinSizes: MIN_NODE_SIZES[__readonly_nodesById.get(id)?.type as NodeType], + }).isInside, + decisionServiceSection: "n/a", + }), + isDependencyOf: ({ id }) => dependents.has(id), + hasDependencyTo: ({ id }) => dependencies.has(id), + }); + } + } + + // 2. Then we map all the nodes to elkNodes, including the parents. We mutate parents on the fly when iterating over the nodes list. + const elkNodes = __readonly_nodes.flatMap((node) => { + const parent = parentNodesById.get(node.id); + if (parent) { + return []; + } + + const defaultSize = DEFAULT_NODE_SIZES[node.type as NodeType]({ + snapGrid: __readonly_snapGrid, + isAlternativeInputDataShape: __readonly_isAlternativeInputDataShape, + }); + const elkNode: Elk.ElkNode = { + id: node.id, + width: node.data.shape["dc:Bounds"]?.["@_width"] ?? defaultSize["@_width"], + height: node.data.shape["dc:Bounds"]?.["@_height"] ?? defaultSize["@_height"], + children: [], + layoutOptions: { + "partitioning.partition": + // Since textAnnotations and knowledgeSources are not related to the logic, we leave them at the bottom. + (node.type as NodeType) === NODE_TYPES.textAnnotation || + (node.type as NodeType) === NODE_TYPES.knowledgeSource + ? "0" + : "1", + }, + }; + + // FIXME: Tiago --> Improve performance here as part of https://github.com/apache/incubator-kie-issues/issues/451. + const parents = [...parentNodesById.values()].filter( + (p) => p.contains({ id: elkNode.id, bounds: node.data.shape["dc:Bounds"] }).isInside + ); + if (parents.length > 0) { + const decisionServiceSection = parents[0].contains({ + id: elkNode.id, + bounds: node.data.shape["dc:Bounds"], + }).decisionServiceSection; + + // The only relationship that ELK will know about is the first matching container for this node. + if (decisionServiceSection === "n/a") { + parents[0].elkNode.children?.push(elkNode); + } else if (decisionServiceSection === "output") { + parents[0].elkNode.children?.[0].children?.push(elkNode); + } else if (decisionServiceSection === "encapsulated") { + parents[0].elkNode.children?.[1].children?.push(elkNode); + } else { + throw new Error(`Unknown decisionServiceSection ${decisionServiceSection}`); + } + + for (const p of parents) { + p.contained?.add(elkNode.id); // We need to keep track of nodes that are contained by multiple groups, but ELK will only know about one of those containment relationships. + nodeParentsById.set(node.id, new Set([...(nodeParentsById.get(node.id) ?? []), p.elkNode.id])); + } + return []; + } + + return [elkNode]; + }); + + // 3. After we have all containment relationships defined, we can proceed to resolving the hierarchical relationships. + for (const [_, parentNode] of parentNodesById) { + traverse(adjMatrix, parentNode.contained, [...parentNode.contained], "down", (n) => { + parentNode.dependencies.add(n); + }); + traverse(adjMatrix, parentNode.contained, [...parentNode.contained], "up", (n) => { + parentNode.dependents.add(n); + }); + + const p = __readonly_nodesById.get(parentNode.elkNode.id); + if (p?.type === NODE_TYPES.group && parentNode.elkNode.children?.length === 0) { + continue; // Ignore empty group nodes. + } else { + elkNodes.push(parentNode.elkNode); + } + } + + // 4. After we have all containment and hierarchical relationships defined, we can add the fake edges so that ELK creates the structure correctly. + for (const node of __readonly_nodes) { + const parentNodes = [...parentNodesById.values()]; + + const dependents = parentNodes.filter((p) => p.hasDependencyTo({ id: node.id })); + for (const dependent of dependents) { + // Not all nodes are present in all DRD + if (__readonly_nodesById.has(node.id) && __readonly_nodesById.has(dependent.elkNode.id)) { + fakeEdgesForElk.add({ + id: `${generateUuid()}${FAKE_MARKER}__fake`, + sources: [node.id], + targets: [dependent.elkNode.id], + }); + } + + for (const p of nodeParentsById.get(node.id) ?? []) { + // Not all nodes are present in all DRD + if (__readonly_nodesById.has(p) && __readonly_nodesById.has(dependent.elkNode.id)) { + fakeEdgesForElk.add({ + id: `${generateUuid()}${FAKE_MARKER}__fake`, + sources: [p], + targets: [dependent.elkNode.id], + }); + } + } + } + + const dependencies = parentNodes.filter((p) => p.isDependencyOf({ id: node.id })); + for (const dependency of dependencies) { + // Not all nodes are present in all DRD + if (__readonly_nodesById.has(node.id) && __readonly_nodesById.has(dependency.elkNode.id)) { + fakeEdgesForElk.add({ + id: `${generateUuid()}${FAKE_MARKER}__fake`, + sources: [dependency.elkNode.id], + targets: [node.id], + }); + } + + for (const p of nodeParentsById.get(node.id) ?? []) { + // Not all nodes are present in all DRD + if (__readonly_nodesById.has(p) && __readonly_nodesById.has(dependency.elkNode.id)) { + fakeEdgesForElk.add({ + id: `${generateUuid()}${FAKE_MARKER}__fake`, + sources: [dependency.elkNode.id], + targets: [p], + }); + } + } + } + } + + // 5. Concatenate real and fake edges to pass to ELK. + const elkEdges = [ + ...fakeEdgesForElk, + ...[...__readonly_edgesById.values()].flatMap((e) => { + // Not all nodes are present in all DRD + if (__readonly_nodesById.has(e.source) && __readonly_nodesById.has(e.target)) { + return { + id: e.id, + sources: [e.source], + targets: [e.target], + }; + } else { + return []; + } + }), + ]; + + // 6. Run ELK. + const autoLayoutedInfo = await runElk(elkNodes, elkEdges, ELK_OPTIONS); + return { + __readonly_autoLayoutedInfo: autoLayoutedInfo, + __readonly_parentNodesById: parentNodesById, + }; +} + +async function runElk( + nodes: Elk.ElkNode[], + edges: { id: string; sources: string[]; targets: string[] }[], + options: Elk.LayoutOptions = {} +): Promise<{ isHorizontal: boolean; nodes: Elk.ElkNode[] | undefined; edges: Elk.ElkExtendedEdge[] | undefined }> { + const isHorizontal = options?.["elk.direction"] === "RIGHT"; + + const graph: Elk.ElkNode = { + id: "root", + layoutOptions: options, + children: nodes, + edges, + }; + + const layoutedGraph = await elk.layout(graph); + return { + isHorizontal, + nodes: layoutedGraph.children, + edges: layoutedGraph.edges as any[], + }; +} + +export function visitNodeAndNested( + elkNode: Elk.ElkNode, + positionOffset: { x: number; y: number }, + visitor: (elkNode: Elk.ElkNode, positionOffset: { x: number; y: number }) => void +) { + visitor(elkNode, positionOffset); + for (const nestedNode of elkNode.children ?? []) { + visitNodeAndNested( + nestedNode, + { + x: elkNode.x! + positionOffset.x, + y: elkNode.y! + positionOffset.y, + }, + visitor + ); + } +} diff --git a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx index 791ac403c1e..3e35591cb4d 100644 --- a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx +++ b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx @@ -80,6 +80,7 @@ import { DmnEditorTab } from "../store/Store"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { getDefaultColumnWidth } from "./getDefaultColumnWidth"; import { getDefaultBoxedExpression } from "./getDefaultBoxedExpression"; +import { Normalized } from "../normalization/normalize"; export function BoxedExpressionScreen({ container }: { container: React.RefObject }) { const { externalModelsByNamespace } = useExternalModels(); @@ -172,7 +173,7 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec }, [drgElement, drgElementIndex]); const widthsByIdRef = useRef>(widthsById); - const boxedExpressionRef = useRef(expression?.boxedExpression); + const boxedExpressionRef = useRef | undefined>(expression?.boxedExpression); useEffect(() => { widthsByIdRef.current = widthsById; @@ -202,7 +203,7 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec [dmnEditorStoreApi] ); - const onExpressionChange: React.Dispatch> = useCallback( + const onExpressionChange: React.Dispatch>> = useCallback( (newExpressionAction) => { dmnEditorStoreApi.setState((state) => { const newExpression = @@ -385,11 +386,7 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec isResetSupportedOnRootExpression={isResetSupportedOnRootExpression} expressionHolderId={activeDrgElementId!} expressionHolderName={drgElement?.variable?.["@_name"] ?? drgElement?.["@_name"] ?? ""} - expressionHolderTypeRef={ - drgElement?.variable?.["@_typeRef"] ?? - expression?.boxedExpression?.["@_typeRef"] ?? - DmnBuiltInDataType.Undefined - } + expressionHolderTypeRef={drgElement?.variable?.["@_typeRef"] ?? expression?.boxedExpression?.["@_typeRef"]} expression={expression?.boxedExpression} onExpressionChange={onExpressionChange} dataTypes={dataTypes} @@ -406,18 +403,20 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec export function drgElementToBoxedExpression( expressionHolder: - | (DMN15__tDecision & { __$$element: "decision" }) - | (DMN15__tBusinessKnowledgeModel & { __$$element: "businessKnowledgeModel" }) -): BoxedExpression | undefined { + | (Normalized & { __$$element: "decision" }) + | (Normalized & { __$$element: "businessKnowledgeModel" }) +): Normalized | undefined { if (expressionHolder.__$$element === "businessKnowledgeModel") { return expressionHolder.encapsulatedLogic ? { __$$element: "functionDefinition", + "@_label": expressionHolder.encapsulatedLogic["@_label"] ?? expressionHolder["@_name"], + "@_typeRef": expressionHolder.encapsulatedLogic["@_typeRef"] ?? expressionHolder.variable?.["@_typeRef"], ...expressionHolder.encapsulatedLogic, } : { __$$element: "functionDefinition", - "@_id": expressionHolder.variable?.["@_id"] ?? generateUuid(), + "@_id": generateUuid(), "@_kind": "FEEL", expression: undefined!, // SPEC DISCREPANCY: Starting without an expression gives users the ability to select the expression type. formalParameter: [], @@ -432,7 +431,9 @@ export function drgElementToBoxedExpression( expressionHolder?.variable?.["@_name"] ?? expressionHolder.expression["@_label"] ?? expressionHolder?.["@_name"], - "@_typeRef": expressionHolder?.variable?.["@_typeRef"] ?? expressionHolder.expression["@_typeRef"], + "@_typeRef": expressionHolder?.variable + ? expressionHolder?.variable["@_typeRef"] + : expressionHolder.expression["@_typeRef"], } : undefined; } else { @@ -443,7 +444,7 @@ export function drgElementToBoxedExpression( } function determineInputsForDecision( - decision: DMN15__tDecision, + decision: Normalized, allTopLevelDataTypesByFeelName: DataTypeIndex, nodesById: Map> ) { @@ -487,7 +488,7 @@ function flattenItemComponents({ itemDefinition, acc, }: { - itemDefinition: DMN15__tItemDefinition; + itemDefinition: Normalized; acc: string; }): { name: string; typeRef: string | undefined }[] { if (!isStruct(itemDefinition)) { diff --git a/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts b/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts index ec3d46742d5..6e8618d40e8 100644 --- a/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts +++ b/packages/dmn-editor/src/boxedExpressions/boxedExpressionIndex.ts @@ -31,6 +31,7 @@ import { DMN15__tRelation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { AllExpressionTypes, AllExpressions, AllExpressionsWithoutTypes } from "../dataTypes/DataTypeSpec"; +import { Normalized } from "../normalization/normalize"; interface PathType { type: AllExpressionTypes; @@ -411,134 +412,134 @@ export function getDmnObjectByPath( if (path.type === "conditional") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tConditional; + return expressionToEdit as Normalized; } if (path.row === "if") { - return (expressionToEdit as DMN15__tConditional).if.expression; + return (expressionToEdit as Normalized).if.expression; } if (path.row === "else") { - return (expressionToEdit as DMN15__tConditional).else.expression; + return (expressionToEdit as Normalized).else.expression; } - return (expressionToEdit as DMN15__tConditional).then.expression; + return (expressionToEdit as Normalized).then.expression; } if (path.type === "context") { // root if (path.row === undefined || path.column === undefined) { - return expressionToEdit as DMN15__tContext; + return expressionToEdit as Normalized; } if (path.column === "expression") { - return (expressionToEdit as DMN15__tContext).contextEntry?.[path.row].expression; + return (expressionToEdit as Normalized).contextEntry?.[path.row].expression; } - return (expressionToEdit as DMN15__tContext).contextEntry?.[path.row].variable; + return (expressionToEdit as Normalized).contextEntry?.[path.row].variable; } if (path.type === "decisionTable") { // root if (path.row === undefined || path.column === undefined) { - return expressionToEdit as DMN15__tDecisionTable; + return expressionToEdit as Normalized; } if (path.header === "input") { if (path.row < 0) { - return (expressionToEdit as DMN15__tDecisionTable).input?.[path.column]; + return (expressionToEdit as Normalized).input?.[path.column]; } - return (expressionToEdit as DMN15__tDecisionTable).rule?.[path.row].inputEntry?.[path.column]; + return (expressionToEdit as Normalized).rule?.[path.row].inputEntry?.[path.column]; } if (path.row < 0) { - return (expressionToEdit as DMN15__tDecisionTable).output?.[path.column]; + return (expressionToEdit as Normalized).output?.[path.column]; } - return (expressionToEdit as DMN15__tDecisionTable).rule?.[path.row].outputEntry?.[path.column]; + return (expressionToEdit as Normalized).rule?.[path.row].outputEntry?.[path.column]; } if (path.type === "every") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tQuantified; + return expressionToEdit as Normalized; } if (path.row === "variable") { - return expressionToEdit as DMN15__tQuantified; + return expressionToEdit as Normalized; } if (path.row === "in") { - return (expressionToEdit as DMN15__tQuantified).in.expression; + return (expressionToEdit as Normalized).in.expression; } - return (expressionToEdit as DMN15__tQuantified).satisfies.expression; + return (expressionToEdit as Normalized).satisfies.expression; } if (path.type === "filter") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tFilter; + return expressionToEdit as Normalized; } if (path.row === "in") { - return (expressionToEdit as DMN15__tFilter).in.expression; + return (expressionToEdit as Normalized).in.expression; } - return (expressionToEdit as DMN15__tFilter).match.expression; + return (expressionToEdit as Normalized).match.expression; } if (path.type === "for") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tFor; + return expressionToEdit as Normalized; } if (path.row === "variable") { - return expressionToEdit as DMN15__tFor; + return expressionToEdit as Normalized; } if (path.row === "in") { - return (expressionToEdit as DMN15__tFor).in.expression; + return (expressionToEdit as Normalized).in.expression; } - return (expressionToEdit as DMN15__tFor).return.expression; + return (expressionToEdit as Normalized).return.expression; } if (path.type === "functionDefinition") { // root if (!path.parameterIndex) { - return expressionToEdit as DMN15__tFunctionDefinition; + return expressionToEdit as Normalized; } if (path.parameterIndex < 0) { - return (expressionToEdit as DMN15__tFunctionDefinition).expression; + return (expressionToEdit as Normalized).expression; } - return expressionToEdit as DMN15__tFunctionDefinition; + return expressionToEdit as Normalized; } if (path.type === "invocation") { // root if (path.row === undefined || path.column === undefined) { - return expressionToEdit as DMN15__tInvocation; + return expressionToEdit as Normalized; } if (path.column === "parameter") { - return (expressionToEdit as DMN15__tInvocation).binding?.[path.row].parameter; + return (expressionToEdit as Normalized).binding?.[path.row].parameter; } if (path.column === "expression" && path.row >= 0) { - return (expressionToEdit as DMN15__tInvocation).binding?.[path.row].expression; + return (expressionToEdit as Normalized).binding?.[path.row].expression; } // function call - return (expressionToEdit as DMN15__tInvocation).expression; + return (expressionToEdit as Normalized).expression; } if (path.type === "list") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tList; + return expressionToEdit as Normalized; } - return (expressionToEdit as DMN15__tList).expression?.[path.row]; + return (expressionToEdit as Normalized).expression?.[path.row]; } if (path.type === "literalExpression") { - return expressionToEdit as DMN15__tLiteralExpression; + return expressionToEdit as Normalized; } if (path.type === "relation") { // root if (path.row === undefined || path.column === undefined) { - return expressionToEdit as DMN15__tRelation; + return expressionToEdit as Normalized; } if (path.row < 0) { - return (expressionToEdit as DMN15__tRelation).column?.[path.column]; + return (expressionToEdit as Normalized).column?.[path.column]; } - return (expressionToEdit as DMN15__tRelation).row?.[path.row].expression?.[path.column]; + return (expressionToEdit as Normalized).row?.[path.row].expression?.[path.column]; } if (path.type === "some") { // root if (path.row === undefined) { - return expressionToEdit as DMN15__tQuantified; + return expressionToEdit as Normalized; } if (path.row === "variable") { - return expressionToEdit as DMN15__tQuantified; + return expressionToEdit as Normalized; } if (path.row === "in") { - return (expressionToEdit as DMN15__tQuantified).in.expression; + return (expressionToEdit as Normalized).in.expression; } - return (expressionToEdit as DMN15__tQuantified).satisfies.expression; + return (expressionToEdit as Normalized).satisfies.expression; } }, expressionRoot); } diff --git a/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx b/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx index 3410cf7d2e7..e47a3e687d8 100644 --- a/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx +++ b/packages/dmn-editor/src/boxedExpressions/getDefaultBoxedExpression.tsx @@ -18,39 +18,36 @@ */ import { - DmnBuiltInDataType, + BoxedConditional, + BoxedContext, + BoxedDecisionTable, + BoxedEvery, BoxedExpression, - generateUuid, - BoxedLiteral, + BoxedFilter, + BoxedFor, BoxedFunction, - BoxedContext, - BoxedList, BoxedInvocation, + BoxedList, + BoxedLiteral, BoxedRelation, - BoxedDecisionTable, - BoxedConditional, - BoxedFor, BoxedSome, - BoxedEvery, - BoxedFilter, + DmnBuiltInDataType, + generateUuid, } from "@kie-tools/boxed-expression-component/dist/api"; import { - LITERAL_EXPRESSION_MIN_WIDTH, + BEE_TABLE_ROW_INDEX_COLUMN_WIDTH, CONTEXT_ENTRY_VARIABLE_MIN_WIDTH, + DECISION_TABLE_ANNOTATION_DEFAULT_WIDTH, DECISION_TABLE_INPUT_DEFAULT_WIDTH, DECISION_TABLE_OUTPUT_DEFAULT_WIDTH, - DECISION_TABLE_ANNOTATION_DEFAULT_WIDTH, + LITERAL_EXPRESSION_MIN_WIDTH, RELATION_EXPRESSION_COLUMN_DEFAULT_WIDTH, - BEE_TABLE_ROW_INDEX_COLUMN_WIDTH, } from "@kie-tools/boxed-expression-component/dist/resizing/WidthConstants"; import { DECISION_TABLE_INPUT_DEFAULT_VALUE, DECISION_TABLE_OUTPUT_DEFAULT_VALUE, } from "@kie-tools/boxed-expression-component/dist/expressions/DecisionTableExpression/DecisionTableExpression"; -import { - INVOCATION_EXPRESSION_DEFAULT_PARAMETER_NAME, - INVOCATION_EXPRESSION_DEFAULT_PARAMETER_DATA_TYPE, -} from "@kie-tools/boxed-expression-component/dist/expressions/InvocationExpression/InvocationExpression"; +import { INVOCATION_EXPRESSION_DEFAULT_PARAMETER_NAME } from "@kie-tools/boxed-expression-component/dist/expressions/InvocationExpression/InvocationExpression"; import { RELATION_EXPRESSION_DEFAULT_VALUE } from "@kie-tools/boxed-expression-component/dist/expressions/RelationExpression/RelationExpression"; import { DataTypeIndex } from "../dataTypes/DataTypes"; import { isStruct } from "../dataTypes/DataTypeSpec"; @@ -58,6 +55,7 @@ import { DMN15__tContextEntry, DMN15__tOutputClause, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; export function getDefaultBoxedExpression({ logicType, @@ -67,17 +65,17 @@ export function getDefaultBoxedExpression({ getInputs, getDefaultColumnWidth, }: { - logicType: BoxedExpression["__$$element"] | undefined; - typeRef: string; + logicType: Normalized["__$$element"] | undefined; + typeRef: string | undefined; allTopLevelDataTypesByFeelName: DataTypeIndex; getInputs?: () => { name: string; typeRef: string | undefined }[] | undefined; getDefaultColumnWidth?: (args: { name: string; typeRef: string | undefined }) => number | undefined; widthsById: Map; -}): BoxedExpression { - const dataType = allTopLevelDataTypesByFeelName.get(typeRef); +}): Normalized { + const dataType = allTopLevelDataTypesByFeelName.get(typeRef ?? DmnBuiltInDataType.Undefined); if (logicType === "literalExpression") { - const literalExpression: BoxedLiteral = { + const literalExpression: Normalized = { __$$element: "literalExpression", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -88,7 +86,7 @@ export function getDefaultBoxedExpression({ } // else if (logicType === "functionDefinition") { - const functionExpression: BoxedFunction = { + const functionExpression: Normalized = { __$$element: "functionDefinition", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -101,7 +99,7 @@ export function getDefaultBoxedExpression({ else if (logicType === "context") { let maxWidthBasedOnEntryNames = CONTEXT_ENTRY_VARIABLE_MIN_WIDTH; - let contextEntries: DMN15__tContextEntry[]; + let contextEntries: Normalized[]; if (!dataType || !isStruct(dataType.itemDefinition)) { contextEntries = [ { @@ -109,7 +107,6 @@ export function getDefaultBoxedExpression({ variable: { "@_id": generateUuid(), "@_name": "ContextEntry-1", - "@_typeRef": DmnBuiltInDataType.Undefined, }, expression: undefined!, // SPEC DISCREPANCY: Starting without an expression gives users the ability to select the expression type. }, @@ -117,7 +114,7 @@ export function getDefaultBoxedExpression({ } else { contextEntries = (dataType.itemDefinition.itemComponent ?? []).map((ic) => { const name = ic["@_name"]; - const typeRef = isStruct(ic) ? DmnBuiltInDataType.Any : ic.typeRef?.__$$text ?? DmnBuiltInDataType.Undefined; + const typeRef = isStruct(ic) ? DmnBuiltInDataType.Any : ic.typeRef?.__$$text; maxWidthBasedOnEntryNames = Math.max( maxWidthBasedOnEntryNames, getDefaultColumnWidth?.({ name, typeRef }) ?? CONTEXT_ENTRY_VARIABLE_MIN_WIDTH @@ -140,7 +137,7 @@ export function getDefaultBoxedExpression({ expression: undefined!, // SPEC DISCREPANCY: Starting without an expression gives users the ability to select the expression type. }); - const contextExpression: BoxedContext = { + const contextExpression: Normalized = { __$$element: "context", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -150,7 +147,7 @@ export function getDefaultBoxedExpression({ widthsById.set(contextExpression["@_id"]!, [maxWidthBasedOnEntryNames]); return contextExpression; } else if (logicType === "list") { - const listExpression: BoxedList = { + const listExpression: Normalized = { __$$element: "list", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -160,7 +157,7 @@ export function getDefaultBoxedExpression({ }; return listExpression; } else if (logicType === "invocation") { - const invocationExpression: BoxedInvocation = { + const invocationExpression: Normalized = { __$$element: "invocation", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -169,7 +166,7 @@ export function getDefaultBoxedExpression({ parameter: { "@_id": generateUuid(), "@_name": INVOCATION_EXPRESSION_DEFAULT_PARAMETER_NAME, - "@_typeRef": INVOCATION_EXPRESSION_DEFAULT_PARAMETER_DATA_TYPE, + "@_typeRef": undefined, }, expression: undefined!, // SPEC DISCREPANCY: Starting without an expression gives users the ability to select the expression type. }, @@ -185,7 +182,7 @@ export function getDefaultBoxedExpression({ } else if (logicType === "relation") { const isSimple = !dataType || !isStruct(dataType.itemDefinition); - const relationExpression: BoxedRelation = { + const relationExpression: Normalized = { __$$element: "relation", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -206,14 +203,12 @@ export function getDefaultBoxedExpression({ { "@_id": generateUuid(), "@_name": dataType?.itemDefinition["@_name"] ?? "column-1", - "@_typeRef": dataType?.feelName ?? DmnBuiltInDataType.Undefined, + "@_typeRef": dataType?.feelName, }, ] : (dataType.itemDefinition.itemComponent ?? []).map((ic) => { const name = ic["@_name"]; - const typeRef = isStruct(ic) - ? DmnBuiltInDataType.Any - : ic.typeRef?.__$$text ?? DmnBuiltInDataType.Undefined; + const typeRef = isStruct(ic) ? DmnBuiltInDataType.Any : ic.typeRef?.__$$text; return { "@_id": generateUuid(), "@_name": name, @@ -236,11 +231,11 @@ export function getDefaultBoxedExpression({ } else if (logicType === "decisionTable") { const singleOutputColumn = { name: "Output-1", - typeRef: dataType?.feelName ?? DmnBuiltInDataType.Undefined, + typeRef: dataType?.feelName, }; const singleInputColumn = { name: "Input-1", - typeRef: DmnBuiltInDataType.Undefined, + typeRef: undefined, }; const input = getInputs?.()?.map((input) => ({ @@ -248,7 +243,7 @@ export function getDefaultBoxedExpression({ inputExpression: { "@_id": generateUuid(), text: { __$$text: input.name }, - "@_typeRef": input.typeRef ?? DmnBuiltInDataType.Undefined, + "@_typeRef": input.typeRef, }, })) ?? [ { @@ -256,12 +251,12 @@ export function getDefaultBoxedExpression({ inputExpression: { "@_id": generateUuid(), text: { __$$text: singleInputColumn.name }, - "@_typeRef": singleInputColumn.typeRef ?? DmnBuiltInDataType.Undefined, + "@_typeRef": singleInputColumn.typeRef, }, }, ]; - const output: DMN15__tOutputClause[] = + const output: Normalized[] = !dataType || !isStruct(dataType.itemDefinition) ? [ { @@ -273,10 +268,10 @@ export function getDefaultBoxedExpression({ : (dataType.itemDefinition.itemComponent ?? []).map((ic) => ({ "@_id": generateUuid(), "@_name": ic["@_name"], - "@_typeRef": isStruct(ic) ? DmnBuiltInDataType.Any : ic.typeRef?.__$$text ?? DmnBuiltInDataType.Undefined, + "@_typeRef": isStruct(ic) ? DmnBuiltInDataType.Any : ic.typeRef?.__$$text, })); - const decisionTableExpression: BoxedDecisionTable = { + const decisionTableExpression: Normalized = { __$$element: "decisionTable", "@_id": generateUuid(), "@_typeRef": typeRef, @@ -325,7 +320,8 @@ export function getDefaultBoxedExpression({ return decisionTableExpression; } else if (logicType === "conditional") { - const conditionalExpression: BoxedConditional = { + const conditionalExpression: Normalized = { + "@_id": generateUuid(), __$$element: "conditional", if: { "@_id": generateUuid(), @@ -343,7 +339,8 @@ export function getDefaultBoxedExpression({ return conditionalExpression; } else if (logicType === "for") { - const forExpression: BoxedFor = { + const forExpression: Normalized = { + "@_id": generateUuid(), __$$element: "for", return: { "@_id": generateUuid(), @@ -356,7 +353,8 @@ export function getDefaultBoxedExpression({ }; return forExpression; } else if (logicType == "some") { - const someExpression: BoxedSome = { + const someExpression: Normalized = { + "@_id": generateUuid(), __$$element: "some", satisfies: { "@_id": generateUuid(), @@ -369,7 +367,8 @@ export function getDefaultBoxedExpression({ }; return someExpression; } else if (logicType === "every") { - const everyExpression: BoxedEvery = { + const everyExpression: Normalized = { + "@_id": generateUuid(), __$$element: "every", satisfies: { "@_id": generateUuid(), @@ -382,7 +381,8 @@ export function getDefaultBoxedExpression({ }; return everyExpression; } else if (logicType === "filter") { - const filterExpression: BoxedFilter = { + const filterExpression: Normalized = { + "@_id": generateUuid(), __$$element: "filter", match: { "@_id": generateUuid(), diff --git a/packages/dmn-editor/src/clipboard/Clipboard.ts b/packages/dmn-editor/src/clipboard/Clipboard.ts index 87e80ad728c..8704f2c5999 100644 --- a/packages/dmn-editor/src/clipboard/Clipboard.ts +++ b/packages/dmn-editor/src/clipboard/Clipboard.ts @@ -37,6 +37,7 @@ import { KIE__tComponentWidths } from "@kie-tools/dmn-marshaller/dist/schemas/ki import { DataType } from "../dataTypes/DataTypes"; import { parseXmlHref } from "../xml/xmlHrefs"; import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; +import { Normalized } from "../normalization/normalize"; export const DMN_EDITOR_DIAGRAM_CLIPBOARD_MIME_TYPE = "application/json+kie-dmn-editor--diagram" as const; export const DMN_EDITOR_BOXED_EXPRESSION_CLIPBOARD_MIME_TYPE = @@ -47,17 +48,17 @@ export type DmnEditorDataTypesClipboard = { mimeType: typeof DMN_EDITOR_DATA_TYPES_CLIPBOARD_MIME_TYPE; namespaceWhereClipboardWasCreatedFrom: string; namespace: string; - itemDefinitions: DMN15__tItemDefinition[]; + itemDefinitions: Normalized[]; }; export type DmnEditorDiagramClipboard = { mimeType: typeof DMN_EDITOR_DIAGRAM_CLIPBOARD_MIME_TYPE; namespaceWhereClipboardWasCreatedFrom: string; - drgElements: NonNullable>[]; - artifacts: NonNullable>[]; + drgElements: NonNullable["drgElement"]>>[]; + artifacts: NonNullable["artifact"]>>[]; widths: Namespaced[]; - shapes: DMNDI15__DMNShape[]; - edges: DMNDI15__DMNEdge[]; + shapes: Normalized[]; + edges: Normalized[]; }; export function buildClipboardFromDiagram(rfState: RF.ReactFlowState, dmnEditorState: State) { @@ -89,12 +90,12 @@ export function buildClipboardFromDiagram(rfState: RF.ReactFlowState, dmnEditorS return; } - const dmnObject = JSON.parse(JSON.stringify(node.data.dmnObject)) as DMN15__tDecision; // Casting to `DMN15__tDecision` because it has all requirement types. + const dmnObject = JSON.parse(JSON.stringify(node.data.dmnObject)) as Normalized; // Casting to `DMN15__tDecision` because it has all requirement types. // This is going to get repopulated when this data is pasted somewhere. if (node.data.dmnObject?.__$$element === "decisionService") { - (dmnObject as DMN15__tDecisionService).inputData = []; - (dmnObject as DMN15__tDecisionService).inputDecision = []; + (dmnObject as Normalized).inputData = []; + (dmnObject as Normalized).inputDecision = []; } if (dmnObject.authorityRequirement) { diff --git a/packages/dmn-editor/src/commands/CommandsContextProvider.tsx b/packages/dmn-editor/src/commands/CommandsContextProvider.tsx index ab664a26388..1a8cdaf7f82 100644 --- a/packages/dmn-editor/src/commands/CommandsContextProvider.tsx +++ b/packages/dmn-editor/src/commands/CommandsContextProvider.tsx @@ -26,8 +26,6 @@ export interface Commands { togglePropertiesPanel: () => void; createGroup: () => void; selectAll: () => void; - panDown: () => void; - panUp: () => void; paste: () => void; copy: () => void; cut: () => void; @@ -61,12 +59,6 @@ export function CommandsContextProvider(props: React.PropsWithChildren<{}>) { selectAll: () => { throw new Error("DMN EDITOR: selectAll command not implemented."); }, - panDown: () => { - throw new Error("DMN EDITOR: panDown command not implemented."); - }, - panUp: () => { - throw new Error("DMN EDITOR: panUp command not implemented."); - }, paste: () => { throw new Error("DMN EDITOR: paste command not implemented."); }, diff --git a/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintDate.tsx b/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintDate.tsx index e4cb2e573e9..368f8f9ceda 100644 --- a/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintDate.tsx +++ b/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintDate.tsx @@ -22,6 +22,7 @@ import { DatePicker } from "@patternfly/react-core/dist/js/components/DatePicker import "./Constraint.css"; import "./ConstraintDate.css"; import { ConstraintProps } from "./Constraint"; +import moment from "moment"; export function ConstraintDate({ value, onChange, isValid }: ConstraintProps) { return ( @@ -32,7 +33,16 @@ export function ConstraintDate({ value, onChange, isValid }: ConstraintProps) { }`} inputProps={{ className: "kie-dmn-editor--constraint-input" }} value={value} - onChange={(e, value) => onChange(value)} + onChange={(e, value) => { + if (moment(value, "YYYY-MM-DD", true).isValid()) { + onChange(value); + } + }} + onBlur={(e, value) => { + if (moment(value, "YYYY-MM-DD", true).isValid()) { + onChange(value); + } + }} /> ); diff --git a/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintTime.tsx b/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintTime.tsx index 346b3eb4a82..dd2a7ea481d 100644 --- a/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintTime.tsx +++ b/packages/dmn-editor/src/dataTypes/ConstraintComponents/ConstraintTime.tsx @@ -26,6 +26,8 @@ import { ConstraintProps } from "./Constraint"; import { Select, SelectOption, SelectVariant } from "@patternfly/react-core/dist/js/components/Select"; import { useDmnEditor } from "../../DmnEditorContext"; import { useInViewSelect } from "../../responsiveness/useInViewSelect"; +import { Tooltip } from "@patternfly/react-core/dist/js/components/Tooltip"; +import moment from "moment"; // Time zone list from https://www.timeanddate.com/time/zones/ const UTC_POSITEVE_TIMEZONES = [ @@ -75,11 +77,19 @@ const UTC_NEGATIVE_TIMEZONES = [ "-01:00", ]; +const TIME_REGEXP = /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?([+|-](0[0-9]|1[0-9]|2[0-3]):[0-9][0-9])?$/; + export function ConstraintTime({ value, onChange, isValid }: ConstraintProps) { const time = useMemo(() => { + if (value.match(TIME_REGEXP) === null) { + return ""; + } return value.includes("+") ? value.split("+")[0] : value.split("-")[0]; }, [value]); const timezone = useMemo(() => { + if (value.match(TIME_REGEXP) === null) { + return UTC_POSITEVE_TIMEZONES[0]; + } return value.includes("+") ? `+${value.split("+")[1]}` : value.includes("-") @@ -123,36 +133,62 @@ export function ConstraintTime({ value, onChange, isValid }: ConstraintProps) { className={`kie-dmn-editor--constraint-time kie-dmn-editor--constraint-input ${ isValid ? "" : "kie-dmn-editor--constraint-invalid" }`} - inputProps={{ className: "kie-dmn-editor--constraint-input" }} + inputProps={{ + className: "kie-dmn-editor--constraint-input", + onBlur: (e: React.FocusEvent) => { + if (moment(value, "HH:mm", true).isValid() || moment(value, "HH:mm:ss", true).isValid()) { + onChangeTime(value); + } + }, + }} time={time} - onChange={(e, value, hour, minute, seconds, isValid) => { - if (isValid) { + onChange={(e, value) => { + if (moment(value, "HH:mm", true).isValid()) { + onChangeTime(`${value}:00`); + } + if (moment(value, "HH:mm:ss", true).isValid()) { onChangeTime(value); } }} includeSeconds={true} /> - + {time === "" ? ( + + + + ) : ( + + )} ); } diff --git a/packages/dmn-editor/src/dataTypes/Constraints.tsx b/packages/dmn-editor/src/dataTypes/Constraints.tsx index 9a2b93230af..cc871b56179 100644 --- a/packages/dmn-editor/src/dataTypes/Constraints.tsx +++ b/packages/dmn-editor/src/dataTypes/Constraints.tsx @@ -18,7 +18,7 @@ */ import * as React from "react"; -import { useMemo, useCallback, useState, useEffect } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { ConstraintsExpression } from "./ConstraintsExpression"; import { DMN15__tItemDefinition, @@ -50,6 +50,7 @@ import { useDmnEditorStore } from "../store/StoreContext"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { UniqueNameIndex } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { builtInFeelTypeNames } from "./BuiltInFeelTypes"; +import { Normalized } from "../normalization/normalize"; export type TypeHelper = { check: (value: string) => boolean; @@ -82,12 +83,11 @@ enum ConstraintsType { // that is part of the built in FEEL types. // If the found `itemDefinition` is a collection, it will have a early stop. export function recursivelyGetRootItemDefinition( - itemDefinition: DMN15__tItemDefinition, + itemDefinition: Normalized, allDataTypesById: DataTypeIndex, allTopLevelItemDefinitionUniqueNames: UniqueNameIndex -): DMN15__tItemDefinition { - const typeRef: DmnBuiltInDataType = - (itemDefinition.typeRef?.__$$text as DmnBuiltInDataType) ?? DmnBuiltInDataType.Undefined; +): Normalized { + const typeRef: DmnBuiltInDataType = itemDefinition.typeRef?.__$$text as DmnBuiltInDataType; if (builtInFeelTypeNames.has(typeRef) === false) { const parentDataType = allDataTypesById.get(allTopLevelItemDefinitionUniqueNames.get(typeRef) ?? ""); @@ -109,7 +109,7 @@ export function recursivelyGetRootItemDefinition( } export const constraintTypeHelper = ( - itemDefinition: DMN15__tItemDefinition, + itemDefinition: Normalized, allDataTypesById?: DataTypeIndex, allTopLevelItemDefinitionUniqueNames?: UniqueNameIndex ): TypeHelper => { @@ -151,6 +151,7 @@ export const constraintTypeHelper = ( case DmnBuiltInDataType.DateTime: return ( moment(recoveredValue, "YYYY-MM-DDTHH:mm:ssZZ", true).isValid() || + moment(recoveredValue, "YYYY-MM-DDTHH:mmZZ", true).isValid() || moment(recoveredValue, "YYYY-MM-DD", true).isValid() || value === "" || recoveredValue === "" @@ -160,7 +161,12 @@ export const constraintTypeHelper = ( case DmnBuiltInDataType.Number: return !isNaN(parseFloat(recoveredValue ?? "")) || value === "" || recoveredValue === ""; case DmnBuiltInDataType.Time: - return moment(recoveredValue, "HH:mm:ssZZ", true).isValid() || value === "" || recoveredValue === ""; + return ( + moment(recoveredValue, "HH:mmZZ", true).isValid() || + moment(recoveredValue, "HH:mm:ssZZ", true).isValid() || + value === "" || + recoveredValue === "" + ); case DmnBuiltInDataType.YearsMonthsDuration: return REGEX_YEARS_MONTH_DURATION.test(recoveredValue ?? "") || value === "" || recoveredValue === ""; default: @@ -303,8 +309,8 @@ export function useConstraint({ constraintTypeHelper, enabledConstraints, }: { - constraint: DMN15__tUnaryTests | undefined; - itemDefinition: DMN15__tItemDefinition; + constraint: Normalized | undefined; + itemDefinition: Normalized; isCollectionConstraintEnabled: boolean; constraintTypeHelper: TypeHelper; enabledConstraints: KIE__tConstraintType[] | undefined; @@ -406,7 +412,7 @@ export function ConstraintsFromAllowedValuesAttribute({ renderOnPropertiesPanel, }: { isReadonly: boolean; - itemDefinition: DMN15__tItemDefinition; + itemDefinition: Normalized; editItemDefinition: EditItemDefinition; renderOnPropertiesPanel?: boolean; isEnumDisabled?: boolean; @@ -422,7 +428,7 @@ export function ConstraintsFromAllowedValuesAttribute({ const allowedValues = useMemo(() => itemDefinition?.allowedValues, [itemDefinition?.allowedValues]); const itemDefinitionId = itemDefinition["@_id"]!; - const typeRef = (itemDefinition?.typeRef?.__$$text as DmnBuiltInDataType) ?? DmnBuiltInDataType.Undefined; + const typeRef = itemDefinition?.typeRef?.__$$text as DmnBuiltInDataType; const typeRefConstraintTypeHelper = useMemo( () => constraintTypeHelper(itemDefinition, allDataTypesById, allTopLevelItemDefinitionUniqueNames), [allDataTypesById, allTopLevelItemDefinitionUniqueNames, itemDefinition] @@ -472,7 +478,7 @@ export function ConstraintsFromAllowedValuesAttribute({ if (value === "" || value === undefined) { itemDefinition.allowedValues = undefined; } else { - itemDefinition.allowedValues ??= { text: { __$$text: "" } }; + itemDefinition.allowedValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; itemDefinition.allowedValues.text.__$$text = value; itemDefinition.allowedValues["@_id"] = itemDefinition.allowedValues?.["@_id"] ?? generateUuid(); itemDefinition.allowedValues["@_kie:constraintType"] = enumToKieConstraintType(selectedConstraint); @@ -548,7 +554,7 @@ export function ConstraintsFromTypeConstraintAttribute({ defaultsToAllowedValues, }: { isReadonly: boolean; - itemDefinition: DMN15__tItemDefinition; + itemDefinition: Normalized; editItemDefinition: EditItemDefinition; renderOnPropertiesPanel?: boolean; defaultsToAllowedValues: boolean; @@ -569,7 +575,7 @@ export function ConstraintsFromTypeConstraintAttribute({ [defaultsToAllowedValues, itemDefinition?.allowedValues, itemDefinition?.typeConstraint] ); - const typeRef = (itemDefinition?.typeRef?.__$$text as DmnBuiltInDataType) ?? DmnBuiltInDataType.Undefined; + const typeRef = itemDefinition?.typeRef?.__$$text as DmnBuiltInDataType; const typeRefConstraintTypeHelper = useMemo( () => constraintTypeHelper(itemDefinition, allDataTypesById, allTopLevelItemDefinitionUniqueNames), [allDataTypesById, allTopLevelItemDefinitionUniqueNames, itemDefinition] @@ -587,9 +593,7 @@ export function ConstraintsFromTypeConstraintAttribute({ if (isCollection(rootItemDefinition)) { return ["expression"] as KIE__tConstraintType[]; } - return constrainableBuiltInFeelTypes.get( - (rootItemDefinition.typeRef?.__$$text as DmnBuiltInDataType) ?? DmnBuiltInDataType.Undefined - ); + return constrainableBuiltInFeelTypes.get(rootItemDefinition.typeRef?.__$$text as DmnBuiltInDataType); }, [rootItemDefinition]); const { @@ -613,7 +617,7 @@ export function ConstraintsFromTypeConstraintAttribute({ if (value === "" || value === undefined) { itemDefinition.typeConstraint = undefined; } else { - itemDefinition.typeConstraint ??= { text: { __$$text: "" } }; + itemDefinition.typeConstraint ??= { "@_id": generateUuid(), text: { __$$text: "" } }; itemDefinition.typeConstraint.text.__$$text = value; itemDefinition.typeConstraint["@_id"] = itemDefinition.typeConstraint?.["@_id"] ?? generateUuid(); itemDefinition.typeConstraint["@_kie:constraintType"] = enumToKieConstraintType(selectedConstraint); @@ -635,6 +639,11 @@ export function ConstraintsFromTypeConstraintAttribute({ return; } + if (!itemDefinition.typeConstraint && itemDefinition.allowedValues) { + itemDefinition.typeConstraint = itemDefinition.allowedValues; + itemDefinition.allowedValues = undefined; + } + if (itemDefinition.typeConstraint) { itemDefinition.typeConstraint["@_kie:constraintType"] = enumToKieConstraintType(selectedConstraint); } @@ -712,20 +721,26 @@ export function Constraints({ onToggleGroupChange: (selected: boolean, selectedConstraint: ConstraintsType) => void; onConstraintChange: (value: string | undefined, selectedConstraint: ConstraintsType) => void; }) { - const [internalSelectedConstraint, setInternalSelectedConstraint] = - useState(selectedKieConstraintType); + const [internalSelectedConstraint, setInternalSelectedConstraint] = useState<{ + selectedConstraint: ConstraintsType; + itemDefinitionId: string; + }>({ selectedConstraint: selectedKieConstraintType, itemDefinitionId }); // Updates the `selectedConstraint` only after changing the active item definition // Both `internalSelectedConstraint` and `selectedKieConstraintType` should not be coupled together useEffect(() => { - setInternalSelectedConstraint(selectedKieConstraintType); - // eslint-disable-next-line - }, [itemDefinitionId]); + setInternalSelectedConstraint((prev) => { + if (selectedKieConstraintType === ConstraintsType.NONE && prev.itemDefinitionId === itemDefinitionId) { + return prev; + } + return { selectedConstraint: selectedKieConstraintType, itemDefinitionId }; + }); + }, [itemDefinitionId, selectedKieConstraintType]); const onToggleGroupChangeInternal = useCallback( (selected: boolean, event: React.KeyboardEvent | MouseEvent | React.MouseEvent) => { const selectedConstraint = event.currentTarget.id as ConstraintsType; - setInternalSelectedConstraint(selectedConstraint); + setInternalSelectedConstraint((prev) => ({ selectedConstraint, itemDefinitionId: prev.itemDefinitionId })); onToggleGroupChange(selected, selectedConstraint); }, [onToggleGroupChange] @@ -733,9 +748,11 @@ export function Constraints({ const onConstraintChangeInternal = useCallback( (value: string | undefined) => { - onConstraintChange(value, internalSelectedConstraint); + if (constraintValue !== value) { + onConstraintChange(value, internalSelectedConstraint.selectedConstraint); + } }, - [onConstraintChange, internalSelectedConstraint] + [onConstraintChange, internalSelectedConstraint, constraintValue] ); return ( @@ -760,10 +777,7 @@ export function Constraints({ @@ -775,30 +789,21 @@ export function Constraints({ style={{ zIndex: 10 }} text={ConstraintsType.EXPRESSION} buttonId={ConstraintsType.EXPRESSION} - isSelected={ - selectedKieConstraintType === ConstraintsType.EXPRESSION || - internalSelectedConstraint === ConstraintsType.EXPRESSION - } + isSelected={internalSelectedConstraint.selectedConstraint === ConstraintsType.EXPRESSION} onChange={onToggleGroupChangeInternal} isDisabled={isReadonly || !isConstraintEnabled.expression} /> @@ -806,8 +811,7 @@ export function Constraints({
- {(selectedKieConstraintType === ConstraintsType.ENUMERATION || - internalSelectedConstraint === ConstraintsType.ENUMERATION) && ( + {internalSelectedConstraint.selectedConstraint === ConstraintsType.ENUMERATION && ( )} - {(selectedKieConstraintType === ConstraintsType.RANGE || - internalSelectedConstraint === ConstraintsType.RANGE) && ( + {internalSelectedConstraint.selectedConstraint === ConstraintsType.RANGE && ( )} - {(selectedKieConstraintType === ConstraintsType.EXPRESSION || - internalSelectedConstraint === ConstraintsType.EXPRESSION) && ( + {internalSelectedConstraint.selectedConstraint === ConstraintsType.EXPRESSION && ( )} - {selectedKieConstraintType === ConstraintsType.NONE && - internalSelectedConstraint === ConstraintsType.NONE && ( -

- {`All values are allowed`} -

- )} + {internalSelectedConstraint.selectedConstraint === ConstraintsType.NONE && ( +

+ {`All values are allowed`} +

+ )}
)} diff --git a/packages/dmn-editor/src/dataTypes/DataTypeName.tsx b/packages/dmn-editor/src/dataTypes/DataTypeName.tsx index 14e5e9aeb34..965d211f2dc 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypeName.tsx +++ b/packages/dmn-editor/src/dataTypes/DataTypeName.tsx @@ -30,6 +30,8 @@ import { buildFeelQNameFromNamespace } from "../feel/buildFeelQName"; import { InlineFeelNameInput, OnInlineFeelNameRenamed } from "../feel/InlineFeelNameInput"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { State } from "../store/Store"; +import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; +import { Normalized } from "../normalization/normalize"; export function DataTypeName({ isReadonly, @@ -43,7 +45,7 @@ export function DataTypeName({ }: { isReadonly: boolean; editMode: "hover" | "double-click"; - itemDefinition: DMN15__tItemDefinition; + itemDefinition: Normalized; isActive: boolean; relativeToNamespace: string; shouldCommitOnBlur?: boolean; @@ -135,7 +137,7 @@ export function DataTypeName({ /> {!isEditingLabel && ( diff --git a/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx b/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx index 080955d5791..2be7adc9ac1 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx +++ b/packages/dmn-editor/src/dataTypes/DataTypePanel.tsx @@ -52,6 +52,8 @@ import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "./useResolvedTypeRef"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { Alert } from "@patternfly/react-core/dist/js/components/Alert/Alert"; +import { Popover } from "@patternfly/react-core/dist/js/components/Popover"; +import { InfoAltIcon } from "@patternfly/react-icons/dist/js/icons/info-alt-icon"; export function DataTypePanel({ isReadonly, @@ -123,7 +125,7 @@ export function DataTypePanel({ } editItemDefinition(dataType.itemDefinition["@_id"]!, (itemDefinition) => { - itemDefinition.typeRef = { __$$text: typeRef }; + itemDefinition.typeRef = typeRef ? { __$$text: typeRef } : undefined; const originalItemDefinition = original(itemDefinition); if (originalItemDefinition?.typeRef?.__$$text !== typeRef) { itemDefinition.typeConstraint = undefined; @@ -185,6 +187,8 @@ export function DataTypePanel({ const allTopLevelItemDefinitionUniqueNames = useDmnEditorStore( (s) => s.computed(s).getDataTypes(externalModelsByNamespace).allTopLevelItemDefinitionUniqueNames ); + const [isCollectionConstraintPopoverOpen, setIsCollectionConstraintPopoverOpen] = useState(false); + const [isCollectionItemConstraintPopoverOpen, setIsCollectionItemConstraintPopoverOpen] = useState(false); const allUniqueNames = useMemo( () => @@ -363,9 +367,30 @@ export function DataTypePanel({
{dataType.itemDefinition["@_isCollection"] === true ? ( <> - - Collection constraint - + + + Collection constraint + + setIsCollectionConstraintPopoverOpen(false)} + headerContent="Collection Constraints (Type Constraint)" + headerIcon={} + headerComponent="h1" + bodyContent={ +

+ As per the DMN specification, the Type Constraint attribute lists the possible values +
+ or ranges of values in the base type that are allowed in this ItemDefinition. +

+ } + > + setIsCollectionConstraintPopoverOpen(true)} + onMouseLeave={() => setIsCollectionConstraintPopoverOpen(false)} + /> +
+


- - Collection item constraint - + + + Collection item constraint + + setIsCollectionItemConstraintPopoverOpen(false)} + headerContent="Collection Item Constraints (Allowed Values)" + headerIcon={} + headerComponent="h1" + bodyContent={ +

+ As per the DMN specification, the Allowed Values attribute lists the possible values +
+ or ranges of values in the base type that are allowed in this ItemDefinition. +

+ } + > + setIsCollectionItemConstraintPopoverOpen(true)} + onMouseLeave={() => setIsCollectionItemConstraintPopoverOpen(false)} + /> +
+

Creating constraints for the collection items directly on the collection itself is deprecated since diff --git a/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts b/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts index 1525d4ccec3..d53e5039992 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts +++ b/packages/dmn-editor/src/dataTypes/DataTypeSpec.ts @@ -37,6 +37,7 @@ import { import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { DataTypeIndex } from "./DataTypes"; import { KIE__tConstraintType } from "@kie-tools/dmn-marshaller/dist/schemas/kie-1_0/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; export function findDataTypeById({ definitions, @@ -45,7 +46,7 @@ export function findDataTypeById({ }: { allDataTypesById: DataTypeIndex; itemDefinitionId: string; - definitions: DMN15__tDefinitions; + definitions: Normalized; }) { const indexesPath: number[] = []; let current = allDataTypesById.get(itemDefinitionId); @@ -65,7 +66,9 @@ export function findDataTypeById({ return { items, itemDefinition, index: last }; } -export function getNewItemDefinition(partial?: Partial) { +export function getNewItemDefinition( + partial?: Partial> +): Normalized { return { "@_id": generateUuid(), "@_name": "New data type", @@ -75,11 +78,11 @@ export function getNewItemDefinition(partial?: Partial) }; } -export function isCollection(itemDefinition: DMN15__tItemDefinition) { +export function isCollection(itemDefinition: Normalized) { return itemDefinition["@_isCollection"] ?? false; } -export function isStruct(itemDefinition: DMN15__tItemDefinition) { +export function isStruct(itemDefinition: Normalized) { return !itemDefinition.typeRef && !!itemDefinition.itemComponent; } @@ -96,7 +99,7 @@ export const constrainableBuiltInFeelTypes = new Map) { return ( isCollection(itemDefinition) || (!isStruct(itemDefinition) && @@ -105,8 +108,8 @@ export function canHaveConstraints(itemDefinition: DMN15__tItemDefinition) { } export function traverseItemDefinitions( - items: DMN15__tItemDefinition[], - consumer: (itemDefinition: DMN15__tItemDefinition) => void + items: Normalized[], + consumer: (itemDefinition: Normalized) => void ) { for (let i = 0; i < (items.length ?? 0); i++) { consumer(items[i]); @@ -114,7 +117,7 @@ export function traverseItemDefinitions( } } -export type AllExpressions = NonNullable; +export type AllExpressions = NonNullable["expression"]>; export type AllExpressionsWithoutTypes = Omit; export type AllExpressionTypes = AllExpressions["__$$element"]; @@ -122,8 +125,8 @@ export type AllExpressionTypes = AllExpressions["__$$element"]; export function traverseTypeRefedInExpressionHolders( expressionHolder: - | (DMN15__tDecision & { __$$element: "decision" }) - | (DMN15__tBusinessKnowledgeModel & { __$$element: "businessKnowledgeModel" }), + | (Normalized & { __$$element: "decision" }) + | (Normalized & { __$$element: "businessKnowledgeModel" }), consumer: (typed: { "@_typeRef"?: string }) => void ) { if (expressionHolder.__$$element === "decision") { @@ -154,11 +157,11 @@ export function traverseTypeRefedInExpressions( if (__$$element === "literalExpression") { // Leaf expression. } else if (__$$element === "decisionTable") { - for (const e of (expression as DMN15__tDecisionTable).input ?? []) { + for (const e of (expression as Normalized).input ?? []) { traverseTypeRefedInExpressions(e.inputExpression, "literalExpression", consumer); } - for (const e of (expression as DMN15__tDecisionTable).output ?? []) { + for (const e of (expression as Normalized).output ?? []) { consumer(e); if (e.defaultOutputEntry) { consumer(e.defaultOutputEntry); @@ -168,52 +171,52 @@ export function traverseTypeRefedInExpressions( } } } else if (__$$element === "relation") { - for (const e of (expression as DMN15__tRelation).column ?? []) { + for (const e of (expression as Normalized).column ?? []) { consumer(e); } // Leaf expression. } else if (__$$element === "list") { - for (const e of (expression as DMN15__tList).expression ?? []) { + for (const e of (expression as Normalized).expression ?? []) { traverseTypeRefedInExpressions(e, e.__$$element, consumer); } } else if (__$$element === "context") { - for (const e of (expression as DMN15__tContext).contextEntry ?? []) { + for (const e of (expression as Normalized).contextEntry ?? []) { if (e.variable) { consumer(e.variable); } traverseTypeRefedInExpressions(e.expression, e.expression?.__$$element, consumer); } } else if (__$$element === "invocation") { - for (const e of (expression as DMN15__tInvocation).binding ?? []) { + for (const e of (expression as Normalized).binding ?? []) { if (e.parameter) { consumer(e.parameter); } traverseTypeRefedInExpressions(e.expression, e.expression?.__$$element, consumer); } } else if (__$$element === "functionDefinition") { - const e = expression as DMN15__tFunctionDefinition; + const e = expression as Normalized; traverseTypeRefedInExpressions(e.expression, e.expression?.__$$element, consumer); } else if (__$$element === "conditional") { - const e = expression as DMN15__tConditional; + const e = expression as Normalized; traverseTypeRefedInExpressions(e.if.expression, e.if.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.then.expression, e.then.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.else.expression, e.else.expression?.__$$element, consumer); } else if (__$$element === "every") { - const e = expression as DMN15__tQuantified; + const e = expression as Normalized; consumer(e.in); traverseTypeRefedInExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.satisfies.expression, e.satisfies.expression?.__$$element, consumer); } else if (__$$element === "some") { - const e = expression as DMN15__tQuantified; + const e = expression as Normalized; consumer(e.in); traverseTypeRefedInExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.satisfies.expression, e.satisfies.expression?.__$$element, consumer); } else if (__$$element === "filter") { - const e = expression as DMN15__tFilter; + const e = expression as Normalized; traverseTypeRefedInExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.match.expression, e.match.expression?.__$$element, consumer); } else if (__$$element === "for") { - const e = expression as DMN15__tFor; + const e = expression as Normalized; consumer(e.in); traverseTypeRefedInExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseTypeRefedInExpressions(e.return.expression, e.return.expression?.__$$element, consumer); @@ -226,8 +229,8 @@ export function traverseTypeRefedInExpressions( export function traverseExpressionsInExpressionHolders( expressionHolder: - | (DMN15__tDecision & { __$$element: "decision" }) - | (DMN15__tBusinessKnowledgeModel & { __$$element: "businessKnowledgeModel" }), + | (Normalized & { __$$element: "decision" }) + | (Normalized & { __$$element: "businessKnowledgeModel" }), consumer: (expression: AllExpressionsWithoutTypes | undefined, __$$element: AllExpressionTypes | undefined) => void ) { if (expressionHolder.__$$element === "decision") { @@ -257,45 +260,45 @@ export function traverseExpressions( if (__$$element === "literalExpression") { // No nested expressions. } else if (__$$element === "decisionTable") { - for (const e of (expression as DMN15__tDecisionTable).input ?? []) { + for (const e of (expression as Normalized).input ?? []) { traverseExpressions(e.inputExpression, "literalExpression", consumer); } } else if (__$$element === "relation") { // No nested expressions. } else if (__$$element === "list") { - for (const e of (expression as DMN15__tList).expression ?? []) { + for (const e of (expression as Normalized).expression ?? []) { traverseExpressions(e, e.__$$element, consumer); } } else if (__$$element === "context") { - for (const e of (expression as DMN15__tContext).contextEntry ?? []) { + for (const e of (expression as Normalized).contextEntry ?? []) { traverseExpressions(e.expression, e.expression?.__$$element, consumer); } } else if (__$$element === "invocation") { - for (const e of (expression as DMN15__tInvocation).binding ?? []) { + for (const e of (expression as Normalized).binding ?? []) { traverseExpressions(e.expression, e.expression?.__$$element, consumer); } } else if (__$$element === "functionDefinition") { - const e = expression as DMN15__tFunctionDefinition; + const e = expression as Normalized; traverseExpressions(e.expression, e.expression?.__$$element, consumer); } else if (__$$element === "conditional") { - const e = expression as DMN15__tConditional; + const e = expression as Normalized; traverseExpressions(e.if.expression, e.if.expression?.__$$element, consumer); traverseExpressions(e.then.expression, e.then.expression?.__$$element, consumer); traverseExpressions(e.else.expression, e.else.expression?.__$$element, consumer); } else if (__$$element === "every") { - const e = expression as DMN15__tQuantified; + const e = expression as Normalized; traverseExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseExpressions(e.satisfies.expression, e.satisfies.expression?.__$$element, consumer); } else if (__$$element === "some") { - const e = expression as DMN15__tQuantified; + const e = expression as Normalized; traverseExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseExpressions(e.satisfies.expression, e.satisfies.expression?.__$$element, consumer); } else if (__$$element === "filter") { - const e = expression as DMN15__tFilter; + const e = expression as Normalized; traverseExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseExpressions(e.match.expression, e.match.expression?.__$$element, consumer); } else if (__$$element === "for") { - const e = expression as DMN15__tFor; + const e = expression as Normalized; traverseExpressions(e.in.expression, e.in.expression?.__$$element, consumer); traverseExpressions(e.return.expression, e.return.expression?.__$$element, consumer); } else { diff --git a/packages/dmn-editor/src/dataTypes/DataTypes.tsx b/packages/dmn-editor/src/dataTypes/DataTypes.tsx index 7d950a6ee67..95bf4a5eae5 100644 --- a/packages/dmn-editor/src/dataTypes/DataTypes.tsx +++ b/packages/dmn-editor/src/dataTypes/DataTypes.tsx @@ -57,9 +57,10 @@ import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; import { addTopLevelItemDefinition as _addTopLevelItemDefinition } from "../mutations/addTopLevelItemDefinition"; import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../normalization/normalize"; export type DataType = { - itemDefinition: DMN15__tItemDefinition; + itemDefinition: Normalized; parentId: string | undefined; parents: Set; index: number; @@ -70,16 +71,20 @@ export type DataType = { export type DataTypeTreeViewDataItem = {}; export type DataTypeIndex = Map; -export type AddItemComponent = (id: string, how: "unshift" | "push", partial?: Partial) => void; -export type AddTopLevelItemDefinition = (partial: Partial) => void; +export type AddItemComponent = ( + id: string, + how: "unshift" | "push", + partial?: Partial> +) => void; +export type AddTopLevelItemDefinition = (partial: Partial>) => void; export type EditItemDefinition = ( id: string, consumer: ( - itemDefinition: DMN15__tItemDefinition, - items: DMN15__tItemDefinition[], + itemDefinition: Normalized, + items: Normalized[], index: number, - all: DMN15__tItemDefinition[], + all: Normalized[], state: State ) => void ) => void; @@ -171,7 +176,7 @@ export function DataTypes() { <> {(dataTypesTree.length <= 0 && ( addTopLevelItemDefinition({ typeRef: { __$$text: DmnBuiltInDataType.Undefined } })} + onAdd={() => addTopLevelItemDefinition({ typeRef: undefined })} onPaste={pasteTopLevelItemDefinition} /> )) || ( @@ -203,9 +208,7 @@ export function DataTypes() { {...extraPropsForDropdownToggleAction} key="add-data-type-action" aria-label="Add Data Type" - onClick={() => - addTopLevelItemDefinition({ typeRef: { __$$text: DmnBuiltInDataType.Undefined } }) - } + onClick={() => addTopLevelItemDefinition({ typeRef: undefined })} > , diff --git a/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx b/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx index 7769fd8c709..fe0cb9319ed 100644 --- a/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx +++ b/packages/dmn-editor/src/dataTypes/ItemComponentsTable.tsx @@ -39,16 +39,16 @@ import { AngleDownIcon } from "@patternfly/react-icons/dist/js/icons/angle-down- import { AngleRightIcon } from "@patternfly/react-icons/dist/js/icons/angle-right-icon"; import { EyeIcon } from "@patternfly/react-icons/dist/js/icons/eye-icon"; import { TrashIcon } from "@patternfly/react-icons/dist/js/icons/trash-icon"; -import { DataType, EditItemDefinition, AddItemComponent, DataTypeIndex } from "./DataTypes"; +import { AddItemComponent, DataType, DataTypeIndex, EditItemDefinition } from "./DataTypes"; import { DataTypeName } from "./DataTypeName"; -import { isStruct, canHaveConstraints, getNewItemDefinition } from "./DataTypeSpec"; +import { canHaveConstraints, getNewItemDefinition, isStruct } from "./DataTypeSpec"; import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex"; import { Title } from "@patternfly/react-core/dist/js/components/Title"; import { UniqueNameIndex } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { + buildClipboardFromDataType, DMN_EDITOR_DATA_TYPES_CLIPBOARD_MIME_TYPE, DmnEditorDataTypesClipboard, - buildClipboardFromDataType, getClipboard, } from "../clipboard/Clipboard"; import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; @@ -60,6 +60,7 @@ import { useDmnEditor } from "../DmnEditorContext"; import { DMN15__tItemDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { resolveTypeRef } from "./resolveTypeRef"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../normalization/normalize"; export const BRIGHTNESS_DECREASE_STEP_IN_PERCENTAGE_PER_NESTING_LEVEL = 5; export const STARTING_BRIGHTNESS_LEVEL_IN_PERCENTAGE = 95; @@ -110,6 +111,7 @@ export function ItemComponentsTable({ const flatTree = useMemo(() => { const ret: { dataType: DataType; allUniqueNamesAtLevel: UniqueNameIndex }[] = []; + function traverse(dataType: DataType[], allUniqueNamesAtLevel: UniqueNameIndex) { for (let i = 0; i < (dataType?.length ?? 0); i++) { ret.push({ dataType: dataType[i], allUniqueNamesAtLevel }); @@ -162,7 +164,7 @@ export function ItemComponentsTable({ onClick={() => addItemComponent(parent.itemDefinition["@_id"]!, "unshift", { "@_name": "New property", - typeRef: { __$$text: DmnBuiltInDataType.Undefined }, + typeRef: undefined, }) } > @@ -376,7 +378,7 @@ export function ItemComponentsTable({ onClick={() => { addItemComponent(dt.itemDefinition["@_id"]!, "unshift", { "@_name": "New property", - typeRef: { __$$text: DmnBuiltInDataType.Undefined }, + typeRef: undefined, }); dmnEditorStoreApi.setState((state) => { state.dataTypesEditor.expandedItemComponentIds.push(dt.itemDefinition["@_id"]!); @@ -434,11 +436,11 @@ export function ItemComponentsTable({ })} onChange={(newDataType) => { editItemDefinition(dt.itemDefinition["@_id"]!, (itemDefinition, items) => { - itemDefinition.typeRef = { __$$text: newDataType }; if (itemDefinition.typeRef?.__$$text !== newDataType) { itemDefinition.typeConstraint = undefined; itemDefinition.allowedValues = undefined; } + itemDefinition.typeRef = newDataType ? { __$$text: newDataType } : undefined; }); }} /> @@ -515,7 +517,7 @@ export function ItemComponentsTable({ "@_isCollection": false, }); - const newItemDefinitionCopy: DMN15__tItemDefinition = JSON.parse( + const newItemDefinitionCopy: Normalized = JSON.parse( JSON.stringify(newItemDefinition) ); // Necessary because idRandomizer will mutate this object. @@ -640,7 +642,7 @@ export function ItemComponentsTable({ onClick={() => addItemComponent(parent.itemDefinition["@_id"]!, "push", { "@_name": "New property", - typeRef: { __$$text: DmnBuiltInDataType.Undefined }, + typeRef: undefined, }) } style={{ paddingLeft: 0 }} diff --git a/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx b/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx index 124788860bb..03da2f7e40a 100644 --- a/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx +++ b/packages/dmn-editor/src/dataTypes/TypeRefLabel.tsx @@ -18,9 +18,9 @@ */ import * as React from "react"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; -import { buildFeelQNameFromXmlQName } from "../feel/buildFeelQName"; import { useMemo } from "react"; +import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { buildFeelQNameFromXmlQName } from "../feel/buildFeelQName"; import { buildXmlQName, parseXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import { useDmnEditorStore } from "../store/StoreContext"; import { getXmlNamespaceDeclarationName } from "../xml/xmlNamespaceDeclarations"; @@ -74,7 +74,10 @@ export function TypeRefLabel({ importsByNamespace, relativeToNamespace: thisDmn.model.definitions["@_namespace"], model: thisDmn.model.definitions, - namedElement: { "@_name": parsedFeelQName.importName ? parsedFeelQName.localPart : typeRef }, + namedElement: { + "@_id": generateUuid(), + "@_name": parsedFeelQName.importName ? parsedFeelQName.localPart : typeRef, + }, namedElementQName: xmlQName, }).full; diff --git a/packages/dmn-editor/src/dataTypes/TypeRefSelector.tsx b/packages/dmn-editor/src/dataTypes/TypeRefSelector.tsx index 42456e8b817..a0be25f0a88 100644 --- a/packages/dmn-editor/src/dataTypes/TypeRefSelector.tsx +++ b/packages/dmn-editor/src/dataTypes/TypeRefSelector.tsx @@ -32,12 +32,10 @@ import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex"; import { useInViewSelect } from "../responsiveness/useInViewSelect"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; -export type OnTypeRefChange = (newDataType: DmnBuiltInDataType) => void; +export type OnTypeRefChange = (newDataType: string | undefined) => void; export type OnCreateDataType = (newDataTypeName: string) => void; export type OnToggle = (isExpanded: boolean) => void; -export const typeRefSelectorLimitedSpaceStyle = { maxHeight: "600px", boxShadow: "none", overflowY: "scroll" }; - export function TypeRefSelector({ zoom, heightRef, @@ -132,16 +130,16 @@ export function TypeRefSelector({ )} ; nodeType?: NodeType; isEnabled?: boolean; }): NodeStyle { @@ -111,7 +112,7 @@ export function getNodeStyle({ } export function getNodeShapeFillColor(args: { - dmnStyle?: DMNDI15__DMNStyle | undefined; + dmnStyle?: Normalized | undefined; nodeType?: NodeType | undefined; isEnabled?: boolean | undefined; }) { @@ -134,7 +135,7 @@ export function getNodeShapeFillColor(args: { } export function getNodeShapeStrokeColor(args: { - dmnStyle?: DMNDI15__DMNStyle | undefined; + dmnStyle?: Normalized | undefined; isEnabled?: boolean | undefined; }) { const blue = args.dmnStyle?.["dmndi:StrokeColor"]?.["@_blue"]; @@ -148,7 +149,7 @@ export function getNodeShapeStrokeColor(args: { } export function getDmnFontStyle(args: { - dmnStyle?: DMNDI15__DMNStyle | undefined; + dmnStyle?: Normalized | undefined; isEnabled?: boolean | undefined; }): DmnFontStyle { const blue = args.dmnStyle?.["dmndi:FontColor"]?.["@_blue"]; diff --git a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx index cf7a7240e6b..724e8a7a4a0 100644 --- a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx +++ b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; +import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tBusinessKnowledgeModel, DMN15__tDecision, @@ -71,6 +71,7 @@ import { OutgoingStuffNodePanel } from "./OutgoingStuffNodePanel"; import { propsHaveSameValuesDeep } from "../memoization/memoization"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { NODE_LAYERS } from "../../store/computed/computeDiagramData"; +import { Normalized } from "../../normalization/normalize"; export type ElementFilter = E extends any ? E["__$$element"] extends Filter @@ -80,14 +81,14 @@ export type ElementFilter - | ElementFilter, "textAnnotation" | "group">; + | Unpacked["drgElement"]> + | ElementFilter["artifact"]>, "textAnnotation" | "group">; export type DmnDiagramNodeData = { dmnObjectNamespace: string | undefined; dmnObjectQName: XmlQName; dmnObject: T; - shape: DMNDI15__DMNShape & { index: number }; + shape: Normalized & { index: number }; index: number; hasHiddenRequirements: boolean; /** @@ -106,7 +107,7 @@ export const InputDataNode = React.memo( zIndex, type, id, - }: RF.NodeProps>) => { + }: RF.NodeProps & { __$$element: "inputData" }>>) => { const renderCount = useRef(0); renderCount.current++; @@ -149,8 +150,8 @@ export const InputDataNode = React.memo( const onTypeRefChange = useCallback( (newTypeRef) => { dmnEditorStoreApi.setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tInputData; - drgElement.variable ??= { "@_name": inputData["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": inputData["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }, @@ -167,8 +168,6 @@ export const InputDataNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - const { externalModelsByNamespace } = useExternalModels(); const isCollection = useDmnEditorStore((s) => { @@ -207,9 +206,9 @@ export const InputDataNode = React.memo( return ( <> {isAlternativeInputDataShape ? ( >) => { + }: RF.NodeProps & { __$$element: "decision" }>>) => { const renderCount = useRef(0); renderCount.current++; @@ -375,8 +374,8 @@ export const DecisionNode = React.memo( const onTypeRefChange = useCallback( (newTypeRef) => { dmnEditorStoreApi.setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tDecision; - drgElement.variable ??= { "@_name": decision["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": decision["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; if (drgElement.expression) { drgElement.expression["@_typeRef"] = newTypeRef; @@ -396,8 +395,6 @@ export const DecisionNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - const { externalModelsByNamespace } = useExternalModels(); const isCollection = useDmnEditorStore((s) => { @@ -413,7 +410,7 @@ export const DecisionNode = React.memo( return ( <> - + >) => { + }: RF.NodeProps< + DmnDiagramNodeData & { __$$element: "businessKnowledgeModel" }> + >) => { const renderCount = useRef(0); renderCount.current++; @@ -530,8 +529,10 @@ export const BkmNode = React.memo( const onTypeRefChange = useCallback( (newTypeRef) => { dmnEditorStoreApi.setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tBusinessKnowledgeModel; - drgElement.variable ??= { "@_name": bkm["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![ + index + ] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": bkm["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; if (drgElement.encapsulatedLogic) { drgElement.encapsulatedLogic["@_typeRef"] = newTypeRef; @@ -551,11 +552,9 @@ export const BkmNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - return ( <> - + >) => { + }: RF.NodeProps & { __$$element: "knowledgeSource" }>>) => { const renderCount = useRef(0); renderCount.current++; @@ -678,11 +677,9 @@ export const KnowledgeSourceNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - return ( <> - + >) => { + }: RF.NodeProps & { __$$element: "textAnnotation" }>>) => { const renderCount = useRef(0); renderCount.current++; @@ -796,11 +792,9 @@ export const TextAnnotationNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - return ( <> - + >) => { + }: RF.NodeProps & { __$$element: "decisionService" }>>) => { const renderCount = useRef(0); renderCount.current++; const ref = useRef(null); const isExternal = !!dmnObjectQName.prefix; - + const { externalModelsByNamespace } = useExternalModels(); const snapGrid = useDmnEditorStore((s) => s.diagram.snapGrid); const enableCustomNodeStyles = useDmnEditorStore((s) => s.diagram.overlays.enableCustomNodeStyles); const isHovered = useIsHovered(ref); @@ -930,8 +924,8 @@ export const DecisionServiceNode = React.memo( const onTypeRefChange = useCallback( (newTypeRef) => { dmnEditorStoreApi.setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tInputData; - drgElement.variable ??= { "@_name": decisionService["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": decisionService["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }, @@ -963,8 +957,12 @@ export const DecisionServiceNode = React.memo( updateDecisionServiceDividerLine({ definitions: state.dmn.model.definitions, drdIndex: state.computed(state).getDrdIndex(), - dmnShapesByHref: state.computed(state).indexedDrd().dmnShapesByHref, + __readonly_dmnShapesByHref: state.computed(state).indexedDrd().dmnShapesByHref, drgElementIndex: index, + __readonly_dmnObjectNamespace: dmnObjectNamespace, + __readonly_externalDmnsIndex: state + .computed(state) + .getExternalModelTypesByNamespace(externalModelsByNamespace).dmns, shapeIndex: shape.index, localYPosition: e.y, snapGrid: state.diagram.snapGrid, @@ -981,7 +979,7 @@ export const DecisionServiceNode = React.memo( return () => { selection.on(".drag", null); }; - }, [decisionService, dmnEditorStoreApi, id, index, shape.index]); + }, [decisionService, dmnEditorStoreApi, dmnObjectNamespace, externalModelsByNamespace, id, index, shape.index]); const { fontCssProperties, shapeStyle } = useNodeStyle({ dmnStyle: shape["di:Style"], @@ -989,11 +987,9 @@ export const DecisionServiceNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - return ( <> - +

>) => { + }: RF.NodeProps & { __$$element: "group" }>>) => { const renderCount = useRef(0); renderCount.current++; @@ -1142,11 +1138,9 @@ export const GroupNode = React.memo( isEnabled: enableCustomNodeStyles, }); - const additionalClasses = `${className} ${dmnObjectQName.prefix ? "external" : ""}`; - return ( <> - +
; } & ( | { nodeType: Extract; isAlternativeInputDataShape: boolean } | { nodeType: Exclude } @@ -1470,12 +1464,12 @@ export function useDataTypeCreationCallbackForNodes(index: number, drgElementNam return useCallback( (newDataTypeName) => { dmnEditorStoreApi.setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tInputData; - drgElement.variable ??= { "@_name": drgElementName }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": drgElementName }; drgElement.variable["@_typeRef"] = newDataTypeName; const newItemDefinition = addTopLevelItemDefinition({ definitions: state.dmn.model.definitions, - partial: { "@_name": newDataTypeName, typeRef: { __$$text: DmnBuiltInDataType.Undefined } }, + partial: { "@_name": newDataTypeName, typeRef: undefined }, }); state.dataTypesEditor.activeItemDefinitionId = newItemDefinition["@_id"]; state.navigation.tab = DmnEditorTab.DATA_TYPES; diff --git a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx index afff1c14890..85423717aba 100644 --- a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx +++ b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx @@ -30,6 +30,7 @@ import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-co import { useDmnEditorStore } from "../store/StoreContext"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "../normalization/normalize"; export function DmnObjectListItem({ dmnObject, @@ -37,7 +38,7 @@ export function DmnObjectListItem({ namespace, relativeToNamespace, }: { - dmnObject: Unpacked | undefined; + dmnObject: Unpacked["drgElement"]> | undefined; dmnObjectHref: string; namespace: string; relativeToNamespace: string; diff --git a/packages/dmn-editor/src/feel/buildFeelQName.ts b/packages/dmn-editor/src/feel/buildFeelQName.ts index dc97edd7b67..41b8a75c8d1 100644 --- a/packages/dmn-editor/src/feel/buildFeelQName.ts +++ b/packages/dmn-editor/src/feel/buildFeelQName.ts @@ -20,6 +20,7 @@ import { DMN15__tImport, DMN15__tNamedElement } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import { XmlParserTsRootElementBaseType } from "@kie-tools/xml-parser-ts"; +import { Normalized } from "../normalization/normalize"; export type FeelQNameBuild = { full: string; @@ -35,7 +36,7 @@ export function buildFeelQNameFromXmlQName({ relativeToNamespace, model, }: { - namedElement: DMN15__tNamedElement; + namedElement: Normalized; namedElementQName: XmlQName; importsByNamespace: Map; model: XmlParserTsRootElementBaseType; @@ -64,7 +65,7 @@ export function buildFeelQNameFromNamespace({ importsByNamespace, relativeToNamespace, }: { - namedElement: DMN15__tNamedElement; + namedElement: Normalized; namespace: string; importsByNamespace: Map; relativeToNamespace: string; diff --git a/packages/dmn-editor/src/includedModels/IncludedModels.css b/packages/dmn-editor/src/includedModels/IncludedModels.css new file mode 100644 index 00000000000..6f6767ad97e --- /dev/null +++ b/packages/dmn-editor/src/includedModels/IncludedModels.css @@ -0,0 +1,3 @@ +.kie-dmn-editor--selected-model-to-include-error { + color: var(--pf-global--danger-color--100); +} diff --git a/packages/dmn-editor/src/includedModels/IncludedModels.tsx b/packages/dmn-editor/src/includedModels/IncludedModels.tsx index 2f06d2f6f19..3e2d5806ebe 100644 --- a/packages/dmn-editor/src/includedModels/IncludedModels.tsx +++ b/packages/dmn-editor/src/includedModels/IncludedModels.tsx @@ -50,11 +50,15 @@ import { allPmmlImportNamespaces, getPmmlNamespace } from "../pmml/pmml"; import { allDmnImportNamespaces } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { getNamespaceOfDmnImport } from "./importNamespaces"; import { Alert, AlertVariant } from "@patternfly/react-core/dist/js/components/Alert/Alert"; -import { Dropdown, DropdownItem, KebabToggle } from "@patternfly/react-core/dist/js/components/Dropdown"; +import { KebabToggle } from "@patternfly/react-core/dist/js/components/Dropdown"; import { TrashIcon } from "@patternfly/react-icons/dist/js/icons/trash-icon"; import { useInViewSelect } from "../responsiveness/useInViewSelect"; import { useCancelableEffect } from "@kie-tools-core/react-hooks/dist/useCancelableEffect"; import { State } from "../store/Store"; +import "./IncludedModels.css"; +import { Normalized } from "../normalization/normalize"; +import { Popover, PopoverPosition } from "@patternfly/react-core/dist/js/components/Popover"; +import { AlertActionCloseButton, AlertActionLink } from "@patternfly/react-core/dist/js/components/Alert"; export const EMPTY_IMPORT_NAME_NAMESPACE_IDENTIFIER = ""; @@ -79,6 +83,7 @@ export function IncludedModels() { const [importName, setImportName] = useState(""); const [selectedModel, setSelectedModel] = useState(undefined); + const [selectedModelError, setSelectedModelError] = useState(undefined); useCancelableEffect( useCallback( @@ -101,9 +106,13 @@ export function IncludedModels() { return; } + setSelectedModelError(undefined); setSelectedModel(externalModel); }) .catch((err) => { + setSelectedModelError( + `An error occurred when parsing the selected model '${selectedPathRelativeToThisDmn}'. Please double-check it is a non-empty valid model.` + ); console.error(err); return; }); @@ -121,6 +130,7 @@ export function IncludedModels() { setModelSelectOpen(false); setSelectedPathRelativeToThisDmn(undefined); setImportName(""); + setSelectedModelError(undefined); }, []); const add = useCallback(() => { @@ -161,6 +171,7 @@ export function IncludedModels() { }); setTimeout(() => { + setSelectedModelError(undefined); setSelectedModel(undefined); }, 5000); // Give it time for the `externalModelsByNamespace` object to be reassembled externally. @@ -239,11 +250,11 @@ export function IncludedModels() { <> setModalOpen(false)} + onClose={() => cancel()} title={"Include model"} variant={ModalVariant.large} actions={ - (modelPathsRelativeToThisDmnNotYetIncluded?.length ?? 0) > 0 + (modelPathsRelativeToThisDmnNotYetIncluded?.length ?? 0) > 0 && selectedModelError === undefined ? [ + ) + } + hasNoPadding={shouldRenderConfirmationMessage} + maxWidth={shouldRenderConfirmationMessage ? "300px" : "150px"} + minWidth={shouldRenderConfirmationMessage ? "300px" : "150px"} + isVisible={isRemovePopoverOpen} + showClose={false} + shouldClose={() => { + setRemovePopoverOpen(false); + setConfirmationPopoverOpen(false); }} + position={PopoverPosition.bottom} + shouldOpen={() => setRemovePopoverOpen(true)} > - {pathDisplayed} - - - - - ); -} - -function UnknownIncludedModelCard({ - _import, - index, - isReadonly, -}: { - _import: DMN15__tImport; - index: number; - isReadonly: boolean; -}) { - const dmnEditorStoreApi = useDmnEditorStoreApi(); - - const remove = useCallback( - (index: number) => { - dmnEditorStoreApi.setState((state) => { - deleteImport({ definitions: state.dmn.model.definitions, index }); - }); - }, - [dmnEditorStoreApi] - ); - - const { externalModelsByNamespace } = useExternalModels(); - - const rename = useCallback( - (newName) => { - dmnEditorStoreApi.setState((state) => { - renameImport({ - definitions: state.dmn.model.definitions, - index, - newName, - allTopLevelDataTypesByFeelName: state.computed(state).getDataTypes(externalModelsByNamespace) - .allTopLevelDataTypesByFeelName, - }); - }); - }, - [dmnEditorStoreApi, externalModelsByNamespace, index] - ); - - const extension = useMemo(() => { - if (allDmnImportNamespaces.has(_import["@_importType"])) { - return "dmn"; - } else if (allPmmlImportNamespaces.has(_import["@_importType"])) { - return "pmml"; - } else { - return "Unknwon"; - } - }, [_import]); - - const [isCardActionsOpen, setCardActionsOpen] = useState(false); - - return ( - - - - } - onSelect={() => setCardActionsOpen(false)} - isOpen={isCardActionsOpen} - menuAppendTo={document.body} - isPlain={true} - position={"right"} - dropdownItems={[ - - {!isReadonly && ( - } - onClick={() => { - if (isReadonly) { - return; - } - - remove(index); - }} - > - Remove - - )} - , - ]} - /> + + - - - + {externalModel ? ( + + {`${title}`} +

-

- Namespace: {_import["@_namespace"]} -

-

- URI: {_import["@_locationURI"] ?? None} -

-
-
+ + + + + ) : ( + // unknown + + + +
+

+ Namespace: {_import["@_namespace"]} +

+

+ URI: {_import["@_locationURI"] ?? None} +

+
+
+ )}
); } diff --git a/packages/dmn-editor/src/includedModels/importNamespaces.ts b/packages/dmn-editor/src/includedModels/importNamespaces.ts index 81fc8424207..e8345f98916 100644 --- a/packages/dmn-editor/src/includedModels/importNamespaces.ts +++ b/packages/dmn-editor/src/includedModels/importNamespaces.ts @@ -20,8 +20,9 @@ import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { allDmnImportNamespaces } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { allPmmlImportNamespaces, getPmmlNamespaceFromDmnImport } from "../pmml/pmml"; +import { Normalized } from "../normalization/normalize"; -export function getNamespaceOfDmnImport({ dmnImport }: { dmnImport: DMN15__tImport }) { +export function getNamespaceOfDmnImport({ dmnImport }: { dmnImport: Normalized }) { if (allDmnImportNamespaces.has(dmnImport["@_importType"])) { return dmnImport["@_namespace"]; } else if (allPmmlImportNamespaces.has(dmnImport["@_importType"])) { diff --git a/packages/dmn-editor/src/mutations/addConnectedNode.ts b/packages/dmn-editor/src/mutations/addConnectedNode.ts index a001d008f15..75868d7f355 100644 --- a/packages/dmn-editor/src/mutations/addConnectedNode.ts +++ b/packages/dmn-editor/src/mutations/addConnectedNode.ts @@ -37,6 +37,7 @@ import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { buildXmlHref } from "../xml/xmlHrefs"; +import { Normalized } from "../normalization/normalize"; export function addConnectedNode({ definitions, @@ -45,7 +46,7 @@ export function addConnectedNode({ newNode, edgeType, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; sourceNode: { type: NodeType; href: string; bounds: DC__Bounds; shapeId: string | undefined }; newNode: { type: NodeType; bounds: DC__Bounds }; @@ -62,7 +63,7 @@ export function addConnectedNode({ definitions.drgElement ??= []; const variableBase = { "@_id": generateUuid(), - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, }; definitions.drgElement?.push( switchExpression(newNode.type as Exclude, { @@ -179,40 +180,53 @@ export function getRequirementsFromEdge( sourceNode: { type: NodeType; href: string }, newEdgeId: string, edge: EdgeType -) { +): + | (Pick, "informationRequirement"> & + Pick, "knowledgeRequirement"> & + Pick, "authorityRequirement">) + | undefined { const ir: | undefined // - | Required> - | Required> = switchExpression(sourceNode.type, { - [NODE_TYPES.inputData]: { "@_id": newEdgeId, requiredInput: { "@_href": `${sourceNode.href}` } }, - [NODE_TYPES.decision]: { "@_id": newEdgeId, requiredDecision: { "@_href": `${sourceNode.href}` } }, - default: undefined, - }); + | Required, "requiredInput" | "@_id">> + | Required, "requiredDecision" | "@_id">> = switchExpression( + sourceNode.type, + { + [NODE_TYPES.inputData]: { "@_id": newEdgeId, requiredInput: { "@_href": `${sourceNode.href}` } }, + [NODE_TYPES.decision]: { "@_id": newEdgeId, requiredDecision: { "@_href": `${sourceNode.href}` } }, + default: undefined, + } + ); const kr: | undefined // - | Required> = switchExpression(sourceNode.type, { - [NODE_TYPES.bkm]: { "@_id": newEdgeId, requiredKnowledge: { "@_href": `${sourceNode.href}` } }, - [NODE_TYPES.decisionService]: { "@_id": newEdgeId, requiredKnowledge: { "@_href": `${sourceNode.href}` } }, - default: undefined, - }); + | Required, "requiredKnowledge" | "@_id">> = switchExpression( + sourceNode.type, + { + [NODE_TYPES.bkm]: { "@_id": newEdgeId, requiredKnowledge: { "@_href": `${sourceNode.href}` } }, + [NODE_TYPES.decisionService]: { "@_id": newEdgeId, requiredKnowledge: { "@_href": `${sourceNode.href}` } }, + default: undefined, + } + ); const ar: | undefined // - | Required> - | Required> - | Required> = switchExpression(sourceNode.type, { - [NODE_TYPES.inputData]: { "@_id": newEdgeId, requiredInput: { "@_href": `${sourceNode.href}` } }, - [NODE_TYPES.decision]: { "@_id": newEdgeId, requiredDecision: { "@_href": `${sourceNode.href}` } }, - [NODE_TYPES.knowledgeSource]: { "@_id": newEdgeId, requiredAuthority: { "@_href": `${sourceNode.href}` } }, - default: undefined, - }); + | Required, "requiredInput" | "@_id">> + | Required, "requiredDecision" | "@_id">> + | Required, "requiredAuthority" | "@_id">> = switchExpression( + sourceNode.type, + { + [NODE_TYPES.inputData]: { "@_id": newEdgeId, requiredInput: { "@_href": `${sourceNode.href}` } }, + [NODE_TYPES.decision]: { "@_id": newEdgeId, requiredDecision: { "@_href": `${sourceNode.href}` } }, + [NODE_TYPES.knowledgeSource]: { "@_id": newEdgeId, requiredAuthority: { "@_href": `${sourceNode.href}` } }, + default: undefined, + } + ); // We can use tDecision to type here, because it contains all requirement types. const requirements: - | (Pick & - Pick & - Pick) + | (Pick, "informationRequirement"> & + Pick, "knowledgeRequirement"> & + Pick, "authorityRequirement">) | undefined = switchExpression(edge, { [EDGE_TYPES.informationRequirement]: ir ? { informationRequirement: [ir] } : undefined, [EDGE_TYPES.knowledgeRequirement]: kr ? { knowledgeRequirement: [kr] } : undefined, diff --git a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts index aa33665f767..6bd3055581f 100644 --- a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts +++ b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts @@ -24,6 +24,7 @@ import { repopulateInputDataAndDecisionsOnDecisionService } from "./repopulateIn import { SnapGrid } from "../store/Store"; import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; +import { Normalized } from "../normalization/normalize"; export function addDecisionToDecisionService({ definitions, @@ -32,7 +33,7 @@ export function addDecisionToDecisionService({ drdIndex, snapGrid, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; decisionId: string; decisionServiceId: string; drdIndex: number; @@ -55,11 +56,11 @@ export function addDecisionToDecisionService({ const diagram = addOrGetDrd({ definitions, drdIndex }); const decisionShape = diagram.diagramElements.find( (s) => s["@_dmnElementRef"] === decisionId && s.__$$element === "dmndi:DMNShape" - ) as DMNDI15__DMNShape; + ) as Normalized; const decisionServiceShape = diagram.diagramElements.find( (s) => s["@_dmnElementRef"] === decisionServiceId && s.__$$element === "dmndi:DMNShape" - ) as DMNDI15__DMNShape; + ) as Normalized; const section = getSectionForDecisionInsideDecisionService({ decisionShape, decisionServiceShape, snapGrid }); if (section === "encapsulated") { @@ -80,8 +81,8 @@ export function getSectionForDecisionInsideDecisionService({ decisionServiceShape, snapGrid, }: { - decisionShape: DMNDI15__DMNShape; - decisionServiceShape: DMNDI15__DMNShape; + decisionShape: Normalized; + decisionServiceShape: Normalized; snapGrid: SnapGrid; }): "output" | "encapsulated" { if (!decisionShape?.["dc:Bounds"] || !decisionServiceShape?.["dc:Bounds"]) { diff --git a/packages/dmn-editor/src/mutations/addEdge.ts b/packages/dmn-editor/src/mutations/addEdge.ts index ff98be9a09d..14e549433f9 100644 --- a/packages/dmn-editor/src/mutations/addEdge.ts +++ b/packages/dmn-editor/src/mutations/addEdge.ts @@ -27,6 +27,7 @@ import { DMN15__tInformationRequirement, DMN15__tKnowledgeRequirement, DMNDI15__DMNEdge, + DMNDI15__DMNShape, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; @@ -39,6 +40,7 @@ import { Unpacked } from "../tsExt/tsExt"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; import { AutoPositionedEdgeMarker } from "../diagram/edges/AutoPositionedEdgeMarker"; +import { Normalized } from "../normalization/normalize"; export function addEdge({ definitions, @@ -48,7 +50,7 @@ export function addEdge({ edge, keepWaypoints, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; sourceNode: { type: NodeType; @@ -85,7 +87,7 @@ export function addEdge({ if (edge.type === EDGE_TYPES.association) { definitions.artifact ??= []; - const newAssociation: DMN15__tAssociation = { + const newAssociation: Normalized = { "@_id": newEdgeId, "@_associationDirection": "Both", sourceRef: { "@_href": `${sourceNode.href}` }, @@ -109,7 +111,7 @@ export function addEdge({ // Requirements else { const requirements = getRequirementsFromEdge(sourceNode, newEdgeId, edge.type); - const drgElement = definitions.drgElement![targetNode.index] as DMN15__tDecision; // We cast to tDecision here because it has all three types of requirement. + const drgElement = definitions.drgElement![targetNode.index] as Normalized; // We cast to tDecision here because it has all three types of requirement. if (requirements?.informationRequirement) { drgElement.informationRequirement ??= []; const removed = removeFirstMatchIfPresent(drgElement.informationRequirement, (ir) => @@ -156,10 +158,10 @@ export function addEdge({ const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); // Remove existing - const removedDmnEdge: DMNDI15__DMNEdge | undefined = removeFirstMatchIfPresent( + const removedDmnEdge = removeFirstMatchIfPresent( diagramElements, (e) => e.__$$element === "dmndi:DMNEdge" && e["@_dmnElementRef"] === existingEdgeId - ); + ) as Normalized | undefined; const newWaypoints = keepWaypoints ? [ @@ -191,18 +193,18 @@ export function addEdge({ return { newDmnEdge }; } -function doesInformationRequirementsPointTo(a: DMN15__tInformationRequirement, nodeId: string) { +function doesInformationRequirementsPointTo(a: Normalized, nodeId: string) { return ( a.requiredInput?.["@_href"] === `${nodeId}` || // a.requiredDecision?.["@_href"] === `${nodeId}` ); } -function doesKnowledgeRequirementsPointTo(a: DMN15__tKnowledgeRequirement, nodeId: string) { +function doesKnowledgeRequirementsPointTo(a: Normalized, nodeId: string) { return a.requiredKnowledge?.["@_href"] === `${nodeId}`; } -function doesAuthorityRequirementsPointTo(a: DMN15__tAuthorityRequirement, nodeId: string) { +function doesAuthorityRequirementsPointTo(a: Normalized, nodeId: string) { return ( a.requiredInput?.["@_href"] === `${nodeId}` || a.requiredDecision?.["@_href"] === `${nodeId}` || @@ -210,7 +212,7 @@ function doesAuthorityRequirementsPointTo(a: DMN15__tAuthorityRequirement, nodeI ); } -function areAssociationsEquivalent(a: DMN15__tAssociation, b: DMN15__tAssociation) { +function areAssociationsEquivalent(a: Normalized, b: Normalized) { return ( (a.sourceRef["@_href"] === b.sourceRef["@_href"] && a.targetRef["@_href"] === b.targetRef["@_href"]) || (a.sourceRef["@_href"] === b.targetRef["@_href"] && a.targetRef["@_href"] === b.sourceRef["@_href"]) diff --git a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts index 87735cf144d..282865f0c5e 100644 --- a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts @@ -19,6 +19,7 @@ import { DC__Point, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { addOrGetDrd } from "./addOrGetDrd"; +import { Normalized } from "../normalization/normalize"; export function addEdgeWaypoint({ definitions, @@ -27,7 +28,7 @@ export function addEdgeWaypoint({ beforeIndex, waypoint, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; edgeIndex: number; beforeIndex: number; diff --git a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts index 97e39f60a54..84817732264 100644 --- a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts +++ b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts @@ -17,72 +17,91 @@ * under the License. */ +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tDecisionService, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { DECISION_SERVICE_COLLAPSED_DIMENSIONS } from "../diagram/nodes/DefaultSizes"; +import { ExternalModelsIndex } from "../DmnEditor"; +import { getAutoLayoutedInfo } from "../autolayout/autoLayoutInfo"; +import { DECISION_SERVICE_COLLAPSED_DIMENSIONS, MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; -import { Computed } from "../store/Store"; +import { Normalized } from "../normalization/normalize"; +import { Computed, SnapGrid, State } from "../store/Store"; import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts"; +import { computeDiagramData } from "../store/computed/computeDiagramData"; +import { computeExternalModelsByType } from "../store/computed/computeExternalModelsByType"; import { computeIndexedDrd } from "../store/computed/computeIndexes"; import { xmlHrefToQName } from "../xml/xmlHrefToQName"; import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs"; +import { addOrGetDrd } from "./addOrGetDrd"; import { addShape } from "./addShape"; +import { applyAutoLayoutToDrd } from "./applyAutoLayoutToDrd"; import { repositionNode } from "./repositionNode"; +export enum StrategyForAddingDecisionServiceToDrd { + AUTO_GENERATE, + CONFLICT, + COPY_FROM_ANOTHER_DRD, +} + /** * When adding a Decision Service to a DRD, we need to bring all its encapsulated and output Decisions with it, * copying their layout from other DRDs, or formatting with autolayout. + * This method returns the strategy to be used when adding a Decision Service. + * The strategy should be used to call one of three methods: + * - AUTO_GENERATE: addAutoGeneratedDecisionServiceToDrd + * - CONFLICT: addConflictingDecisionServiceToDrd + * - COPY_FROM_ANOTHER_DRD: addExistingDecisionServiceToDrd */ -export function addExistingDecisionServiceToDrd({ - decisionServiceNamespace, - decisionService, - externalDmnsIndex, - thisDmnsNamespace, - thisDmnsDefinitions, - thisDmnsIndexedDrd, - drdIndex, - dropPoint, +export function getStrategyToAddExistingDecisionServiceToDrd({ + __readonly_definitions, + __readonly_decisionServiceNamespace, + __readonly_drgElement, + __readonly_externalDmnsIndex, + __readonly_namespace, + __readonly_indexedDrd, + __readonly_drdIndex, }: { - decisionServiceNamespace: string; - decisionService: DMN15__tDecisionService; - externalDmnsIndex: ReturnType["dmns"]; - thisDmnsNamespace: string; - thisDmnsDefinitions: DMN15__tDefinitions; - thisDmnsIndexedDrd: ReturnType; - drdIndex: number; - dropPoint: { x: number; y: number }; + __readonly_definitions: Normalized; + __readonly_decisionServiceNamespace: string; + __readonly_drgElement: Normalized; + __readonly_externalDmnsIndex: ReturnType["dmns"]; + __readonly_namespace: string; + __readonly_indexedDrd: ReturnType; + __readonly_drdIndex: number; }) { const decisionServiceDmnDefinitions = - !decisionServiceNamespace || decisionServiceNamespace === thisDmnsNamespace - ? thisDmnsDefinitions - : externalDmnsIndex.get(decisionServiceNamespace)?.model.definitions; + !__readonly_decisionServiceNamespace || __readonly_decisionServiceNamespace === __readonly_namespace + ? __readonly_definitions + : __readonly_externalDmnsIndex.get(__readonly_decisionServiceNamespace)?.model.definitions; if (!decisionServiceDmnDefinitions) { - throw new Error(`DMN MUTATION: Can't find definitions for model with namespace ${decisionServiceNamespace}`); + throw new Error( + `DMN MUTATION: Can't find definitions for model with namespace ${__readonly_decisionServiceNamespace}` + ); } const { decisionServiceNamespaceForHref, containedDecisionHrefsRelativeToThisDmn } = getDecisionServicePropertiesRelativeToThisDmn({ - thisDmnsNamespace, - decisionServiceNamespace, - decisionService, + thisDmnsNamespace: __readonly_namespace, + decisionServiceNamespace: __readonly_decisionServiceNamespace, + decisionService: __readonly_drgElement, }); const decisionServiceHrefRelativeToThisDmn = buildXmlHref({ namespace: decisionServiceNamespaceForHref, - id: decisionService["@_id"]!, + id: __readonly_drgElement["@_id"]!, }); const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn = computeContainingDecisionServiceHrefsByDecisionHrefs({ - thisDmnsNamespace, - drgElementsNamespace: decisionServiceNamespace, + thisDmnsNamespace: __readonly_namespace, + drgElementsNamespace: __readonly_decisionServiceNamespace, drgElements: decisionServiceDmnDefinitions.drgElement, }); const doesThisDrdHaveConflictingDecisionService = containedDecisionHrefsRelativeToThisDmn.some((decisionHref) => (containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn.get(decisionHref) ?? []).some((d) => - thisDmnsIndexedDrd.dmnShapesByHref.has(d) + __readonly_indexedDrd.dmnShapesByHref.has(d) ) ); @@ -90,33 +109,21 @@ export function addExistingDecisionServiceToDrd({ // There's already, in this DRD, a Decision Service in expanded form that contains a Decision that is contained by the Decision Service we're adding. // As the DMN specification doesn't allow two copies of the same DRG element to be depicted in the same DRD, we can't add the Decision Service in expanded form. // To not disallow depicting the Decision Service in this DRD, though, we add it in collpased form. - addShape({ - definitions: thisDmnsDefinitions, - drdIndex, - nodeType: NODE_TYPES.decisionService, - shape: { - "@_dmnElementRef": xmlHrefToQName(decisionServiceHrefRelativeToThisDmn, thisDmnsDefinitions), - "@_isCollapsed": true, - "dc:Bounds": { - "@_x": dropPoint.x, - "@_y": dropPoint.y, - "@_width": DECISION_SERVICE_COLLAPSED_DIMENSIONS.width, - "@_height": DECISION_SERVICE_COLLAPSED_DIMENSIONS.height, - }, - }, - }); - return; + return { + strategyForAddingDecisionServiceToDrd: StrategyForAddingDecisionServiceToDrd.CONFLICT, + decisionServiceHrefRelativeToThisDmn, + containedDecisionHrefsRelativeToThisDmn, + }; } const drds = decisionServiceDmnDefinitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? []; - let indexedDrd: ReturnType | undefined; for (let i = 0; i < drds.length; i++) { - if (thisDmnsNamespace === decisionServiceNamespace && i === drdIndex) { + if (__readonly_namespace === __readonly_decisionServiceNamespace && i === __readonly_drdIndex) { continue; // Skip the current DRD! } - const _indexedDrd = computeIndexedDrd(thisDmnsNamespace, decisionServiceDmnDefinitions, i); + const _indexedDrd = computeIndexedDrd(__readonly_namespace, decisionServiceDmnDefinitions, i); const dsShape = _indexedDrd.dmnShapesByHref.get(decisionServiceHrefRelativeToThisDmn); const hasCompleteExpandedDepictionOfDecisionService = dsShape && @@ -129,95 +136,383 @@ export function addExistingDecisionServiceToDrd({ } } - if (!indexedDrd) { - // There's no DRD which inclues a complete expanded depiction of the Decision Service. Let's proceed with auto-layout. - // TODO: Tiago + if (indexedDrd === undefined) { + return { + strategyForAddingDecisionServiceToDrd: StrategyForAddingDecisionServiceToDrd.AUTO_GENERATE, + decisionServiceHrefRelativeToThisDmn, + containedDecisionHrefsRelativeToThisDmn, + }; } else { - // Let's copy the expanded depiction of the Decision Service from `drd`. - // Adding or moving nodes that already exist in the current DRD to inside the Decision Service. - // The positions need all be relative to the Decision Service node, of course. - const dsShapeOnOtherDrd = indexedDrd.dmnShapesByHref.get(decisionServiceHrefRelativeToThisDmn); - if ( - dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_x"] === undefined || - dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] === undefined - ) { + return { + strategyForAddingDecisionServiceToDrd: StrategyForAddingDecisionServiceToDrd.COPY_FROM_ANOTHER_DRD, + indexedDrdContainingDecisionServiceDepiction: indexedDrd, + decisionServiceHrefRelativeToThisDmn, + containedDecisionHrefsRelativeToThisDmn, + }; + } +} + +export function addConflictingDecisionServiceToDrd({ + definitions, + __readonly_drdIndex, + __readonly_dropPoint, + __readonly_decisionServiceHrefRelativeToThisDmn, +}: { + definitions: Normalized; + __readonly_drdIndex: number; + __readonly_dropPoint: { x: number; y: number }; + __readonly_decisionServiceHrefRelativeToThisDmn: string; +}) { + addShape({ + definitions: definitions, + drdIndex: __readonly_drdIndex, + nodeType: NODE_TYPES.decisionService, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": xmlHrefToQName(__readonly_decisionServiceHrefRelativeToThisDmn, definitions), + "@_isCollapsed": true, + "dc:Bounds": { + "@_x": __readonly_dropPoint.x, + "@_y": __readonly_dropPoint.y, + "@_width": DECISION_SERVICE_COLLAPSED_DIMENSIONS.width, + "@_height": DECISION_SERVICE_COLLAPSED_DIMENSIONS.height, + }, + }, + }); +} + +export async function addAutoGeneratedDecisionServiceToDrd({ + state, + __readonly_decisionServiceNamespace, + __readonly_externalDmnsIndex, + __readonly_drdIndex, + __readonly_snapGrid, + __readonly_decisionServiceHrefRelativeToThisDmn, + __readonly_containedDecisionHrefsRelativeToThisDmn, + __readonly_dropPoint, + __readonly_isAlternativeInputDataShape, + __readonly_externalModelsByNamespace, +}: { + state: State; + __readonly_decisionServiceNamespace: string; + __readonly_externalDmnsIndex: ReturnType["dmns"]; + __readonly_drdIndex: number; + __readonly_snapGrid: SnapGrid; + __readonly_decisionServiceHrefRelativeToThisDmn: string; + __readonly_containedDecisionHrefsRelativeToThisDmn: string[]; + __readonly_dropPoint: { x: number; y: number }; + __readonly_isAlternativeInputDataShape: boolean; + __readonly_externalModelsByNamespace: ExternalModelsIndex | undefined; +}) { + const drds = state.dmn.model.definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"]; + // Create a Dummy DRD + // In case the model doesn't have a DRD, the Dummy DRD will be the new DRD. + // Otherwise, the Dummy DRD will be the next index. + const dummyDrdIndex = drds?.length === undefined ? 0 : drds.length; + addOrGetDrd({ + definitions: state.dmn.model.definitions, + drdIndex: dummyDrdIndex, + }); + + // Add the Decision Service + const minNodeSize = MIN_NODE_SIZES[NODE_TYPES.decisionService]({ + snapGrid: __readonly_snapGrid, + }); + addShape({ + definitions: state.dmn.model.definitions, + drdIndex: dummyDrdIndex, + nodeType: NODE_TYPES.decisionService, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": xmlHrefToQName(__readonly_decisionServiceHrefRelativeToThisDmn, state.dmn.model.definitions), + "dc:Bounds": { + "@_x": 0, // Auto-layout will be applied; + "@_y": 0, // Auto-layout will be applied; + ...minNodeSize, + }, + }, + }); + + // Add all Encapsulated and Output Decisions + for (const decisionHref of __readonly_containedDecisionHrefsRelativeToThisDmn) { + const decisionNs = parseXmlHref(decisionHref).namespace; + const decisionDmnDefinitions = + !decisionNs || decisionNs === state.dmn.model.definitions["@_namespace"] + ? state.dmn.model.definitions + : __readonly_externalDmnsIndex.get(decisionNs)?.model.definitions; + if (!decisionDmnDefinitions) { throw new Error( - `DMN MUTATION: Complete DMNShape for Decision Service with href ${decisionServiceHrefRelativeToThisDmn} should've existed on the indexed DRD.` + `DMN MUTATION: Can't find definitions for model with namespace ${__readonly_decisionServiceNamespace}` ); } - + const minNodeSize = MIN_NODE_SIZES[NODE_TYPES.decision]({ + snapGrid: __readonly_snapGrid, + }); addShape({ - definitions: thisDmnsDefinitions, - drdIndex, - nodeType: NODE_TYPES.decisionService, + definitions: state.dmn.model.definitions, + drdIndex: dummyDrdIndex, + nodeType: NODE_TYPES.decision, shape: { - "@_dmnElementRef": xmlHrefToQName(decisionServiceHrefRelativeToThisDmn, thisDmnsDefinitions), + "@_id": generateUuid(), + "@_dmnElementRef": xmlHrefToQName(decisionHref, state.dmn.model.definitions), "dc:Bounds": { - "@_x": dropPoint.x, - "@_y": dropPoint.y, - "@_width": dsShapeOnOtherDrd["dc:Bounds"]["@_width"], - "@_height": dsShapeOnOtherDrd["dc:Bounds"]["@_height"], + "@_x": 0, // Auto-layout will be applied; + "@_y": 0, // Auto-layout will be applied; + ...minNodeSize, }, }, }); + } + + // Compute the external model types by namespace after autogenerating the Decision Service + const externalModelTypesByNamespace = computeExternalModelsByType( + state.dmn.model.definitions.import, + __readonly_externalModelsByNamespace + ); + + // Compute the Dummy DRD indexed drd after autogenerating the Decision Service + const dummyIndexedDrd = computeIndexedDrd( + state.dmn.model.definitions["@_namespace"], + state.dmn.model.definitions, + dummyDrdIndex + ); - for (const decisionHref of containedDecisionHrefsRelativeToThisDmn) { - const decisionShapeOnOtherDrd = indexedDrd.dmnShapesByHref.get(decisionHref); - if ( - decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_x"] === undefined || - decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] === undefined || - decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_width"] === undefined || - decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_height"] === undefined - ) { + // Compute the Dummy DRD diagram data after autogenerating the Decision Service + const { nodes, nodesById, edges, edgesById, drgEdges } = computeDiagramData( + state.diagram, + state.dmn.model.definitions, + externalModelTypesByNamespace, + dummyIndexedDrd, + __readonly_isAlternativeInputDataShape + ); + + // Get the auto-layout info + const { __readonly_autoLayoutedInfo, __readonly_parentNodesById } = await getAutoLayoutedInfo({ + __readonly_snapGrid, + __readonly_nodesById: nodesById, + __readonly_edgesById: edgesById, + __readonly_nodes: nodes, + __readonly_drgEdges: drgEdges, + __readonly_isAlternativeInputDataShape: __readonly_isAlternativeInputDataShape, + }); + + // Apply the auto-layouted info to the Dummy DRD + applyAutoLayoutToDrd({ + state, + __readonly_dmnShapesByHref: dummyIndexedDrd.dmnShapesByHref, + __readonly_edges: edges, + __readonly_edgesById: edgesById, + __readonly_nodesById: nodesById, + __readonly_autoLayoutedInfo, + __readonly_parentNodesById, + __readonly_drdIndex: dummyDrdIndex, + __readonly_dmnObjectNamespace: __readonly_decisionServiceNamespace, + __readonly_externalDmnsIndex: externalModelTypesByNamespace.dmns, + }); + + // Save DS shape before applying the autolayout + const { "@_x": dsShapeX, "@_y": dsShapeY } = dummyIndexedDrd.dmnShapesByHref.get( + __readonly_decisionServiceHrefRelativeToThisDmn + )!["dc:Bounds"]!; + // Reposition the auto generated Decision Service to the drop point + repositionNode({ + definitions: state.dmn.model.definitions, + drdIndex: dummyDrdIndex, + controlWaypointsByEdge: new Map(), + change: { + nodeType: NODE_TYPES.decisionService, + type: "absolute", + position: { x: __readonly_dropPoint.x, y: __readonly_dropPoint.y }, + shapeIndex: dummyIndexedDrd.dmnShapesByHref.get(__readonly_decisionServiceHrefRelativeToThisDmn)?.index ?? 0, + selectedEdges: [], + sourceEdgeIndexes: [], + targetEdgeIndexes: [], + }, + }); + + // Relatively reposition the auto generated Decisions to the drop point + for (const decisionHref of __readonly_containedDecisionHrefsRelativeToThisDmn) { + const currentDecisionShape = dummyIndexedDrd.dmnShapesByHref.get(decisionHref); + + const x = __readonly_dropPoint.x + currentDecisionShape!["dc:Bounds"]!["@_x"] - dsShapeX; + const y = __readonly_dropPoint.y + currentDecisionShape!["dc:Bounds"]!["@_y"] - dsShapeY; + + if (currentDecisionShape) { + repositionNode({ + definitions: state.dmn.model.definitions, + drdIndex: dummyDrdIndex, + controlWaypointsByEdge: new Map(), + change: { + nodeType: NODE_TYPES.decision, + type: "absolute", + position: { x, y }, + shapeIndex: currentDecisionShape.index, + selectedEdges: [], + sourceEdgeIndexes: [], + targetEdgeIndexes: [], + }, + }); + } + } + + // Copy the DS and Decisions to current DRD and remove Dummy DRD; + if (dummyDrdIndex !== __readonly_drdIndex) { + // The auto generated shape. + const { index, dmnElementRefQName, ...dsShape } = dummyIndexedDrd.dmnShapesByHref.get( + __readonly_decisionServiceHrefRelativeToThisDmn + )!; + drds![__readonly_drdIndex]["dmndi:DMNDiagramElement"] ??= []; + drds?.[__readonly_drdIndex]["dmndi:DMNDiagramElement"]?.push({ ...dsShape, __$$element: "dmndi:DMNShape" }); + for (const decisionHref of __readonly_containedDecisionHrefsRelativeToThisDmn) { + const { index, dmnElementRefQName, ...decisionShape } = dummyIndexedDrd.dmnShapesByHref.get(decisionHref)!; + drds?.[__readonly_drdIndex]["dmndi:DMNDiagramElement"]?.push({ + ...decisionShape, + __$$element: "dmndi:DMNShape", + }); + } + drds?.pop(); // Remove Dummy DRD; + } else { + // In this case Dummy DRD is the current DRD + } +} + +export function addExistingDecisionServiceToDrd({ + definitions, + __readonly_decisionServiceNamespace, + __readonly_externalDmnsIndex, + __readonly_namespace, + __readonly_indexedDrd, + __readonly_indexedDrdContainingDecisionServiceDepiction, + __readonly_drdIndex, + __readonly_dropPoint, + __readonly_decisionServiceHrefRelativeToThisDmn, + __readonly_containedDecisionHrefsRelativeToThisDmn, +}: { + definitions: Normalized; + __readonly_decisionServiceNamespace: string; + __readonly_externalDmnsIndex: ReturnType["dmns"]; + __readonly_namespace: string; + __readonly_indexedDrd: ReturnType; + __readonly_indexedDrdContainingDecisionServiceDepiction: ReturnType; + __readonly_drdIndex: number; + __readonly_dropPoint: { x: number; y: number }; + __readonly_decisionServiceHrefRelativeToThisDmn: string; + __readonly_containedDecisionHrefsRelativeToThisDmn: string[]; +}) { + // Let's copy the expanded depiction of the Decision Service from `drd`. + // Adding or moving nodes that already exist in the current DRD to inside the Decision Service. + // The positions need all be relative to the Decision Service node, of course. + const dsShapeOnOtherDrd = __readonly_indexedDrdContainingDecisionServiceDepiction.dmnShapesByHref.get( + __readonly_decisionServiceHrefRelativeToThisDmn + ); + if ( + dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_x"] === undefined || + dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] === undefined + ) { + throw new Error( + `DMN MUTATION: Complete DMNShape for Decision Service with href ${__readonly_decisionServiceHrefRelativeToThisDmn} should've existed on the indexed DRD.` + ); + } + + const dsDividirLineOnOtherDrd = dsShapeOnOtherDrd["dmndi:DMNDecisionServiceDividerLine"]; + const decisionServiceDividerLineWaypoint = [ + { + "@_x": __readonly_dropPoint.x, + "@_y": + (dsDividirLineOnOtherDrd?.["di:waypoint"]?.[0]["@_y"] ?? 0) - + (dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] ?? 0) + + __readonly_dropPoint.y, + }, + { + "@_x": + (dsDividirLineOnOtherDrd?.["di:waypoint"]?.[1]["@_x"] ?? 0) - + (dsDividirLineOnOtherDrd?.["di:waypoint"]?.[0]["@_x"] ?? 0) + + __readonly_dropPoint.x, + "@_y": + (dsDividirLineOnOtherDrd?.["di:waypoint"]?.[0]["@_y"] ?? 0) - + (dsShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] ?? 0) + + __readonly_dropPoint.y, + }, + ]; + addShape({ + definitions: definitions, + drdIndex: __readonly_drdIndex, + nodeType: NODE_TYPES.decisionService, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": xmlHrefToQName(__readonly_decisionServiceHrefRelativeToThisDmn, definitions), + "dc:Bounds": { + "@_x": __readonly_dropPoint.x, + "@_y": __readonly_dropPoint.y, + "@_width": dsShapeOnOtherDrd["dc:Bounds"]["@_width"], + "@_height": dsShapeOnOtherDrd["dc:Bounds"]["@_height"], + }, + }, + decisionServiceDividerLineWaypoint, + }); + + for (const decisionHref of __readonly_containedDecisionHrefsRelativeToThisDmn) { + const decisionShapeOnOtherDrd = + __readonly_indexedDrdContainingDecisionServiceDepiction.dmnShapesByHref.get(decisionHref); + if ( + decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_x"] === undefined || + decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_y"] === undefined || + decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_width"] === undefined || + decisionShapeOnOtherDrd?.["dc:Bounds"]?.["@_height"] === undefined + ) { + throw new Error( + `DMN MUTATION: Complete DMNShape for Decision with href ${decisionHref} should've existed on the indexed DRD.` + ); + } + + const x = + __readonly_dropPoint.x + (decisionShapeOnOtherDrd["dc:Bounds"]["@_x"] - dsShapeOnOtherDrd["dc:Bounds"]["@_x"]); + const y = + __readonly_dropPoint.y + (decisionShapeOnOtherDrd["dc:Bounds"]["@_y"] - dsShapeOnOtherDrd["dc:Bounds"]["@_y"]); + + const existingDecisionShape = __readonly_indexedDrd.dmnShapesByHref.get(decisionHref); + if (existingDecisionShape) { + repositionNode({ + definitions: definitions, + drdIndex: __readonly_drdIndex, + controlWaypointsByEdge: new Map(), + change: { + nodeType: NODE_TYPES.decision, + type: "absolute", + position: { x, y }, + shapeIndex: existingDecisionShape.index, + selectedEdges: [], + sourceEdgeIndexes: [], + targetEdgeIndexes: [], + }, + }); + } else { + const decisionNs = parseXmlHref(decisionHref).namespace; + const decisionDmnDefinitions = + !decisionNs || decisionNs === __readonly_namespace + ? definitions + : __readonly_externalDmnsIndex.get(decisionNs)?.model.definitions; + if (!decisionDmnDefinitions) { throw new Error( - `DMN MUTATION: Complete DMNShape for Decision with href ${decisionHref} should've existed on the indexed DRD.` + `DMN MUTATION: Can't find definitions for model with namespace ${__readonly_decisionServiceNamespace}` ); } - const x = dropPoint.x + (decisionShapeOnOtherDrd["dc:Bounds"]["@_x"] - dsShapeOnOtherDrd["dc:Bounds"]["@_x"]); - const y = dropPoint.y + (decisionShapeOnOtherDrd["dc:Bounds"]["@_y"] - dsShapeOnOtherDrd["dc:Bounds"]["@_y"]); - - const existingDecisionShape = thisDmnsIndexedDrd.dmnShapesByHref.get(decisionHref); - if (existingDecisionShape) { - repositionNode({ - definitions: thisDmnsDefinitions, - drdIndex, - controlWaypointsByEdge: new Map(), - change: { - nodeType: NODE_TYPES.decision, - type: "absolute", - position: { x, y }, - shapeIndex: existingDecisionShape.index, - selectedEdges: [], - sourceEdgeIndexes: [], - targetEdgeIndexes: [], - }, - }); - } else { - const decisionNs = parseXmlHref(decisionHref).namespace; - const decisionDmnDefinitions = - !decisionNs || decisionNs === thisDmnsNamespace - ? thisDmnsDefinitions - : externalDmnsIndex.get(decisionNs)?.model.definitions; - if (!decisionDmnDefinitions) { - throw new Error(`DMN MUTATION: Can't find definitions for model with namespace ${decisionServiceNamespace}`); - } - - addShape({ - definitions: thisDmnsDefinitions, - drdIndex, - nodeType: NODE_TYPES.decision, - shape: { - "@_dmnElementRef": xmlHrefToQName(decisionHref, thisDmnsDefinitions), - "dc:Bounds": { - "@_x": x, - "@_y": y, - "@_width": decisionShapeOnOtherDrd["dc:Bounds"]["@_width"], - "@_height": decisionShapeOnOtherDrd["dc:Bounds"]["@_height"], - }, + addShape({ + definitions: definitions, + drdIndex: __readonly_drdIndex, + nodeType: NODE_TYPES.decision, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": xmlHrefToQName(decisionHref, definitions), + "dc:Bounds": { + "@_x": x, + "@_y": y, + "@_width": decisionShapeOnOtherDrd["dc:Bounds"]["@_width"], + "@_height": decisionShapeOnOtherDrd["dc:Bounds"]["@_height"], }, - }); - } + }, + }); } } } @@ -229,7 +524,7 @@ export function getDecisionServicePropertiesRelativeToThisDmn({ }: { thisDmnsNamespace: string; decisionServiceNamespace: string; - decisionService: DMN15__tDecisionService; + decisionService: Normalized; }) { const decisionServiceNamespaceForHref = decisionServiceNamespace === thisDmnsNamespace ? "" : decisionServiceNamespace; diff --git a/packages/dmn-editor/src/mutations/addImport.ts b/packages/dmn-editor/src/mutations/addImport.ts index e0ebe5eca79..2e802dfafe1 100644 --- a/packages/dmn-editor/src/mutations/addImport.ts +++ b/packages/dmn-editor/src/mutations/addImport.ts @@ -19,12 +19,13 @@ import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tDefinitions, DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; export function addImport({ definitions, includedModel, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; includedModel: { name: string; namespace: string; @@ -40,7 +41,7 @@ export function addImport({ ? includedModel.normalizedPathRelativeToThisDmn // If the included model is located in a parent directory, we leave it that way because that is explicit enough already. : `./${includedModel.normalizedPathRelativeToThisDmn}`; // Always use this notation to make it explicit that we're using thisDmn's location as reference. - const newImport: DMN15__tImport = { + const newImport: Normalized = { "@_id": generateUuid(), "@_name": includedModel.name.trim(), "@_importType": includedModel.xmlns, diff --git a/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts b/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts index 198c07b0f98..253623ccb4c 100644 --- a/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts +++ b/packages/dmn-editor/src/mutations/addMissingImportNamespaces.ts @@ -18,8 +18,9 @@ */ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; -export function addMissingImportNamespaces(definitions: DMN15__tDefinitions) { +export function addMissingImportNamespaces(definitions: Normalized) { if (definitions.import === undefined) { return; } diff --git a/packages/dmn-editor/src/mutations/addOrGetDrd.ts b/packages/dmn-editor/src/mutations/addOrGetDrd.ts index 2200bfaf35c..6cf19f7928c 100644 --- a/packages/dmn-editor/src/mutations/addOrGetDrd.ts +++ b/packages/dmn-editor/src/mutations/addOrGetDrd.ts @@ -19,13 +19,20 @@ import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; export function getDefaultDrdName({ drdIndex }: { drdIndex: number }) { return drdIndex === 0 ? "Default DRD" : "Unnamed DRD"; } -export function addOrGetDrd({ definitions, drdIndex }: { definitions: DMN15__tDefinitions; drdIndex: number }) { - const defaultName = getDefaultDrdName({ drdIndex }); +export function addOrGetDrd({ + definitions, + drdIndex, +}: { + definitions: Normalized; + drdIndex: number; +}) { + const drdName = getDefaultDrdName({ drdIndex: drdIndex }); // diagram definitions["dmndi:DMNDI"] ??= {}; @@ -34,7 +41,7 @@ export function addOrGetDrd({ definitions, drdIndex }: { definitions: DMN15__tDe const defaultDiagram = definitions["dmndi:DMNDI"]["dmndi:DMNDiagram"][drdIndex]; defaultDiagram["@_id"] ??= generateUuid(); - defaultDiagram["@_name"] ??= defaultName; + defaultDiagram["@_name"] ??= drdName; defaultDiagram["@_useAlternativeInputDataShape"] ??= false; defaultDiagram["dmndi:DMNDiagramElement"] ??= []; diff --git a/packages/dmn-editor/src/mutations/addShape.ts b/packages/dmn-editor/src/mutations/addShape.ts index 92c8448fd18..fd716e34ae6 100644 --- a/packages/dmn-editor/src/mutations/addShape.ts +++ b/packages/dmn-editor/src/mutations/addShape.ts @@ -17,33 +17,43 @@ * under the License. */ -import { DMN15__tDefinitions, DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; -import { addOrGetDrd } from "./addOrGetDrd"; -import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { + DC__Point, + DMN15__tDefinitions, + DMNDI15__DMNDecisionServiceDividerLine, + DMNDI15__DMNShape, +} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { NodeType } from "../diagram/connections/graphStructure"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; +import { Normalized } from "../normalization/normalize"; +import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function addShape({ definitions, drdIndex, nodeType, shape, + decisionServiceDividerLineWaypoint: decisionServiceDividerLineWaypoint, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; nodeType: NodeType; - shape: WithoutIdXmlAttributes; + shape: Normalized; + decisionServiceDividerLineWaypoint?: DC__Point[]; }) { const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); diagramElements.push({ __$$element: "dmndi:DMNShape", - "@_id": generateUuid(), ...(nodeType === NODE_TYPES.decisionService - ? { "dmndi:DMNDecisionServiceDividerLine": getCentralizedDecisionServiceDividerLine(shape["dc:Bounds"]!) } + ? { + "dmndi:DMNDecisionServiceDividerLine": + decisionServiceDividerLineWaypoint !== undefined + ? { "@_id": generateUuid(), "di:waypoint": [...decisionServiceDividerLineWaypoint] } + : getCentralizedDecisionServiceDividerLine(shape["dc:Bounds"]!), + } : {}), ...shape, }); } - -export type WithoutIdXmlAttributes = { [K in keyof T]: K extends "@_id" ? never : WithoutIdXmlAttributes }; diff --git a/packages/dmn-editor/src/mutations/addStandaloneNode.ts b/packages/dmn-editor/src/mutations/addStandaloneNode.ts index 607ab2d1950..2b348f07def 100644 --- a/packages/dmn-editor/src/mutations/addStandaloneNode.ts +++ b/packages/dmn-editor/src/mutations/addStandaloneNode.ts @@ -27,13 +27,14 @@ import { addOrGetDrd as getDefaultDiagram } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; import { buildXmlHref } from "../xml/xmlHrefs"; +import { Normalized } from "../normalization/normalize"; export function addStandaloneNode({ definitions, drdIndex, newNode, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; newNode: { type: NodeType; bounds: DC__Bounds }; }) { @@ -44,7 +45,7 @@ export function addStandaloneNode({ definitions.drgElement ??= []; const variableBase = { "@_id": generateUuid(), - "@_typeRef": DmnBuiltInDataType.Undefined, + "@_typeRef": undefined, }; definitions.drgElement?.push( switchExpression(newNode.type as Exclude, { @@ -120,13 +121,15 @@ export function addStandaloneNode({ const shapeId = generateUuid(); diagramElements?.push({ __$$element: "dmndi:DMNShape", - "@_id": shapeId, + "@_id": shapeId, // FIXME: Tiago --> This should break if removed. "@_dmnElementRef": newNodeId, "@_isCollapsed": false, "@_isListedInputData": false, "dc:Bounds": newNode.bounds, ...(newNode.type === NODE_TYPES.decisionService - ? { "dmndi:DMNDecisionServiceDividerLine": getCentralizedDecisionServiceDividerLine(newNode.bounds) } + ? { + "dmndi:DMNDecisionServiceDividerLine": getCentralizedDecisionServiceDividerLine(newNode.bounds), + } : {}), }); diff --git a/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts b/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts index 9111bde3a88..f1ab338af15 100644 --- a/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts +++ b/packages/dmn-editor/src/mutations/addTopLevelItemDefinition.ts @@ -22,13 +22,14 @@ import { DMN15__tItemDefinition, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { getNewItemDefinition } from "../dataTypes/DataTypeSpec"; +import { Normalized } from "../normalization/normalize"; export function addTopLevelItemDefinition({ definitions, partial, }: { - definitions: DMN15__tDefinitions; - partial?: Partial; + definitions: Normalized; + partial?: Partial>; }) { const newItemDefinition = getNewItemDefinition(partial); definitions.itemDefinition ??= []; diff --git a/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts new file mode 100644 index 00000000000..0f3786a1b83 --- /dev/null +++ b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts @@ -0,0 +1,225 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DMNDI15__DMNShape } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { XmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; +import * as Elk from "elkjs/lib/elk.bundled.js"; +import * as RF from "reactflow"; +import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; +import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; +import { DmnDiagramEdgeData } from "../diagram/edges/Edges"; +import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; +import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; +import { addEdge } from "../mutations/addEdge"; +import { repositionNode } from "../mutations/repositionNode"; +import { resizeNode } from "../mutations/resizeNode"; +import { updateDecisionServiceDividerLine } from "../mutations/updateDecisionServiceDividerLine"; +import { Normalized } from "../normalization/normalize"; +import { State } from "../store/Store"; +import { AutolayoutParentNode, FAKE_MARKER, visitNodeAndNested } from "../autolayout/autoLayoutInfo"; +import { ExternalDmnsIndex } from "../DmnEditor"; + +export function applyAutoLayoutToDrd({ + state, + __readonly_autoLayoutedInfo, + __readonly_parentNodesById, + __readonly_nodesById, + __readonly_edgesById, + __readonly_edges, + __readonly_dmnShapesByHref, + __readonly_drdIndex, + __readonly_dmnObjectNamespace, + __readonly_externalDmnsIndex, +}: { + state: State; + __readonly_autoLayoutedInfo: { + isHorizontal: boolean; + nodes: Elk.ElkNode[] | undefined; + edges: Elk.ElkExtendedEdge[] | undefined; + }; + __readonly_parentNodesById: Map; + __readonly_nodesById: Map>; + __readonly_edgesById: Map>; + __readonly_edges: RF.Edge[]; + __readonly_dmnShapesByHref: Map< + string, + Normalized & { + index: number; + dmnElementRefQName: XmlQName; + } + >; + __readonly_drdIndex: number; + __readonly_dmnObjectNamespace: string | undefined; + __readonly_externalDmnsIndex: ExternalDmnsIndex; +}) { + // 7. Update all nodes positions skipping empty groups, which will be positioned manually after all nodes are done being repositioned. + const autolayoutedElkNodesById = new Map(); + + for (const topLevelElkNode of __readonly_autoLayoutedInfo.nodes ?? []) { + visitNodeAndNested(topLevelElkNode, { x: 100, y: 100 }, (elkNode, positionOffset) => { + if (elkNode.id.includes(FAKE_MARKER)) { + return; + } + + autolayoutedElkNodesById.set(elkNode.id, elkNode); + + const nodeId = elkNode.id; + const node = __readonly_nodesById.get(nodeId)!; + + repositionNode({ + definitions: state.dmn.model.definitions, + drdIndex: __readonly_drdIndex, + controlWaypointsByEdge: new Map(), + change: { + nodeType: node.type as NodeType, + type: "absolute", + position: { + x: elkNode.x! + positionOffset.x, + y: elkNode.y! + positionOffset.y, + }, + selectedEdges: [...__readonly_edgesById.keys()], + shapeIndex: node.data?.shape.index, + sourceEdgeIndexes: __readonly_edges.flatMap((e) => + e.source === nodeId && e.data?.dmnEdge ? [e.data.dmnEdge.index] : [] + ), + targetEdgeIndexes: __readonly_edges.flatMap((e) => + e.target === nodeId && e.data?.dmnEdge ? [e.data.dmnEdge.index] : [] + ), + }, + }); + }); + } + + // 8. Resize all nodes using the sizes calculated by ELK. + for (const topLevelElkNode of __readonly_autoLayoutedInfo.nodes ?? []) { + visitNodeAndNested(topLevelElkNode, { x: 0, y: 0 }, (elkNode) => { + if (elkNode.id.includes(FAKE_MARKER)) { + return; + } + + const nodeId = elkNode.id; + const node = __readonly_nodesById.get(nodeId)!; + + resizeNode({ + definitions: state.dmn.model.definitions, + drdIndex: __readonly_drdIndex, + __readonly_dmnShapesByHref: __readonly_dmnShapesByHref, + snapGrid: state.diagram.snapGrid, + __readonly_dmnObjectNamespace, + __readonly_externalDmnsIndex, + change: { + index: node.data.index, + isExternal: !!node.data.dmnObjectQName.prefix, + nodeType: node.type as NodeType, + dimension: { + "@_width": elkNode.width!, + "@_height": elkNode.height!, + }, + shapeIndex: node.data?.shape.index, + sourceEdgeIndexes: __readonly_edges.flatMap((e) => + e.source === nodeId && e.data?.dmnEdge ? [e.data.dmnEdge.index] : [] + ), + targetEdgeIndexes: __readonly_edges.flatMap((e) => + e.target === nodeId && e.data?.dmnEdge ? [e.data.dmnEdge.index] : [] + ), + }, + }); + }); + } + + // 9. Updating Decision Service divider lines after all nodes are repositioned and resized. + for (const [parentNodeId] of __readonly_parentNodesById) { + const parentNode = __readonly_nodesById.get(parentNodeId); + if (parentNode?.type !== NODE_TYPES.decisionService) { + continue; + } + + const elkNode = autolayoutedElkNodesById.get(parentNodeId); + if (!elkNode) { + throw new Error(`Couldn't find Decision Service with id ${parentNode.id} at the autolayouted nodes map`); + } + + /** + * The second children of a Decision Service elkNode is a node representing the Encapsulated section. + * It's Y position will be exactly where the divider line should be. + */ + const dividerLinerLocalYPosition = elkNode.children?.[1]?.y; + if (!dividerLinerLocalYPosition) { + throw new Error( + `Couldn't find second child (which represents the Encapuslated Decision section) of Decision Service with id ${parentNode.id} at the autolayouted nodes map` + ); + } + + updateDecisionServiceDividerLine({ + definitions: state.dmn.model.definitions, + drdIndex: __readonly_drdIndex, + __readonly_dmnShapesByHref, + __readonly_dmnObjectNamespace, + __readonly_externalDmnsIndex, + drgElementIndex: parentNode.data.index, + shapeIndex: parentNode.data.shape.index, + snapGrid: state.diagram.snapGrid, + localYPosition: dividerLinerLocalYPosition, + }); + } + + // 10. Update the edges. Edges always go from top to bottom, removing waypoints. + for (const elkEdge of __readonly_autoLayoutedInfo.edges ?? []) { + if (elkEdge.id.includes(FAKE_MARKER)) { + continue; + } + + const edge = __readonly_edgesById.get(elkEdge.id)!; + + const sourceNode = __readonly_nodesById.get(elkEdge.sources[0])!; + const targetNode = __readonly_nodesById.get(elkEdge.targets[0])!; + + // If the target is an external node, we don't have to create the edge. + if (targetNode.data.dmnObjectQName.prefix) { + continue; + } + + addEdge({ + definitions: state.dmn.model.definitions, + drdIndex: __readonly_drdIndex, + edge: { + autoPositionedEdgeMarker: undefined, + type: edge.type as EdgeType, + targetHandle: PositionalNodeHandleId.Bottom, + sourceHandle: PositionalNodeHandleId.Top, + }, + sourceNode: { + type: sourceNode.type as NodeType, + href: sourceNode.id, + data: sourceNode.data, + bounds: sourceNode.data.shape["dc:Bounds"]!, + shapeId: sourceNode.data.shape["@_id"], + }, + targetNode: { + type: targetNode.type as NodeType, + href: targetNode.id, + data: targetNode.data, + bounds: targetNode.data.shape["dc:Bounds"]!, + index: targetNode.data.index, + shapeId: targetNode.data.shape["@_id"], + }, + keepWaypoints: false, + }); + } +} diff --git a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts index a22b078e334..cb9e1273299 100644 --- a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts +++ b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts @@ -19,13 +19,14 @@ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { repopulateInputDataAndDecisionsOnDecisionService } from "./repopulateInputDataAndDecisionsOnDecisionService"; +import { Normalized } from "../normalization/normalize"; export function deleteDecisionFromDecisionService({ definitions, decisionId, decisionServiceId, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; decisionId: string; decisionServiceId: string; }) { diff --git a/packages/dmn-editor/src/mutations/deleteEdge.ts b/packages/dmn-editor/src/mutations/deleteEdge.ts index 4399438ddd0..3cc43c8126c 100644 --- a/packages/dmn-editor/src/mutations/deleteEdge.ts +++ b/packages/dmn-editor/src/mutations/deleteEdge.ts @@ -26,6 +26,7 @@ import { import { addOrGetDrd } from "./addOrGetDrd"; import { DmnDiagramEdgeData } from "../diagram/edges/Edges"; import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService"; +import { Normalized } from "../normalization/normalize"; export enum EdgeDeletionMode { FROM_DRG_AND_ALL_DRDS, @@ -38,7 +39,7 @@ export function deleteEdge({ edge, mode, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; edge: { id: string; dmnObject: DmnDiagramEdgeData["dmnObject"] }; mode: EdgeDeletionMode; @@ -48,7 +49,7 @@ export function deleteEdge({ return { dmnEdge: undefined }; } - const dmnObjects: DMN15__tDefinitions["drgElement" | "artifact"] = + const dmnObjects: Normalized["drgElement" | "artifact"] = switchExpression(edge?.dmnObject.type, { association: definitions.artifact, group: definitions.artifact, @@ -64,9 +65,9 @@ export function deleteEdge({ const requirements = switchExpression(edge?.dmnObject.requirementType, { // Casting to DMN15__tDecision because if has all types of requirement, but not necessarily that's true. - informationRequirement: (dmnObjects[dmnObjectIndex] as DMN15__tDecision).informationRequirement, - knowledgeRequirement: (dmnObjects[dmnObjectIndex] as DMN15__tDecision).knowledgeRequirement, - authorityRequirement: (dmnObjects[dmnObjectIndex] as DMN15__tDecision).authorityRequirement, + informationRequirement: (dmnObjects[dmnObjectIndex] as Normalized).informationRequirement, + knowledgeRequirement: (dmnObjects[dmnObjectIndex] as Normalized).knowledgeRequirement, + authorityRequirement: (dmnObjects[dmnObjectIndex] as Normalized).authorityRequirement, association: dmnObjects, }) ?? []; @@ -78,7 +79,7 @@ export function deleteEdge({ } // Deleting the DMNEdge's - let deletedDmnEdgeOnCurrentDrd: DMNDI15__DMNEdge | undefined; + let deletedDmnEdgeOnCurrentDrd: Normalized | undefined; const drdCount = (definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? []).length; for (let i = 0; i < drdCount; i++) { diff --git a/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts index cf275118fe3..ca03b38b03f 100644 --- a/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/deleteEdgeWaypoint.ts @@ -19,6 +19,7 @@ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { addOrGetDrd } from "./addOrGetDrd"; +import { Normalized } from "../normalization/normalize"; export function deleteEdgeWaypoint({ definitions, @@ -26,7 +27,7 @@ export function deleteEdgeWaypoint({ edgeIndex, waypointIndex, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; edgeIndex: number; waypointIndex: number; diff --git a/packages/dmn-editor/src/mutations/deleteImport.ts b/packages/dmn-editor/src/mutations/deleteImport.ts index b934cb61e04..34aa40bcc7a 100644 --- a/packages/dmn-editor/src/mutations/deleteImport.ts +++ b/packages/dmn-editor/src/mutations/deleteImport.ts @@ -19,15 +19,69 @@ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { getXmlNamespaceDeclarationName } from "../xml/xmlNamespaceDeclarations"; +import { Normalized } from "../normalization/normalize"; +import { computeDiagramData } from "../store/computed/computeDiagramData"; +import { deleteNode, NodeDeletionMode } from "./deleteNode"; +import { nodeNatures } from "./NodeNature"; +import { NodeType } from "../diagram/connections/graphStructure"; +import { deleteEdge, EdgeDeletionMode } from "./deleteEdge"; +import { computeIndexedDrd } from "../store/computed/computeIndexes"; +import { Computed, defaultStaticState } from "../store/Store"; +import { TypeOrReturnType } from "../store/ComputedStateCache"; -export function deleteImport({ definitions, index }: { definitions: DMN15__tDefinitions; index: number }) { +export function deleteImport({ + definitions, + __readonly_index, + __readonly_externalModelTypesByNamespace, +}: { + definitions: Normalized; + __readonly_index: number; + __readonly_externalModelTypesByNamespace: TypeOrReturnType; +}) { definitions.import ??= []; - const [deleted] = definitions.import.splice(index, 1); + const [deletedImport] = definitions.import.splice(__readonly_index, 1); const namespaceName = getXmlNamespaceDeclarationName({ rootElement: definitions, - namespace: deleted["@_namespace"], + namespace: deletedImport["@_namespace"], }); + + // Delete from all DRDs + const defaultDiagram = defaultStaticState().diagram; + definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"]?.forEach((_, i) => { + const indexedDrd = computeIndexedDrd(definitions["@_namespace"], definitions, i); + const { externalNodesByNamespace, drgEdges, edgesFromExternalNodesByNamespace } = computeDiagramData( + defaultDiagram, + definitions, + __readonly_externalModelTypesByNamespace, + indexedDrd, + false + ); + + externalNodesByNamespace.get(deletedImport["@_namespace"])?.forEach((node) => { + deleteNode({ + definitions, + __readonly_drgEdges: drgEdges, + __readonly_drdIndex: 0, + __readonly_nodeNature: nodeNatures[node.type! as NodeType], + __readonly_dmnObjectId: node.data.dmnObject?.["@_id"], + __readonly_dmnObjectQName: node.data.dmnObjectQName, + __readonly_dmnObjectNamespace: node.data.dmnObjectNamespace!, + __readonly_externalModelTypesByNamespace, + mode: NodeDeletionMode.FROM_DRG_AND_ALL_DRDS, + }); + }); + + edgesFromExternalNodesByNamespace.get(deletedImport["@_namespace"])?.forEach((edge) => { + deleteEdge({ + definitions, + drdIndex: 0, + edge: { id: edge.id, dmnObject: edge.data!.dmnObject }, + mode: EdgeDeletionMode.FROM_DRG_AND_ALL_DRDS, + }); + }); + }); + if (namespaceName) { delete definitions[`@_xmlns:${namespaceName}`]; } diff --git a/packages/dmn-editor/src/mutations/deleteNode.ts b/packages/dmn-editor/src/mutations/deleteNode.ts index c7dc7d75889..5f4affe9fa4 100644 --- a/packages/dmn-editor/src/mutations/deleteNode.ts +++ b/packages/dmn-editor/src/mutations/deleteNode.ts @@ -30,6 +30,8 @@ import { EdgeDeletionMode, deleteEdge } from "./deleteEdge"; import { Computed } from "../store/Store"; import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts"; import { xmlHrefToQName } from "../xml/xmlHrefToQName"; +import { Normalized } from "../normalization/normalize"; +import { NodeDmnObjects } from "../diagram/nodes/Nodes"; export enum NodeDeletionMode { FROM_DRG_AND_ALL_DRDS, @@ -38,36 +40,36 @@ export enum NodeDeletionMode { export function deleteNode({ definitions, - drgEdges, - drdIndex, - nodeNature, - dmnObjectId, - dmnObjectQName, - dmnObjectNamespace, - externalDmnsIndex, + __readonly_drgEdges, + __readonly_drdIndex, + __readonly_nodeNature, + __readonly_dmnObjectId, + __readonly_dmnObjectNamespace, + __readonly_dmnObjectQName, + __readonly_externalModelTypesByNamespace, mode, }: { - definitions: DMN15__tDefinitions; - drgEdges: DrgEdge[]; - drdIndex: number; - nodeNature: NodeNature; - externalDmnsIndex: ReturnType["dmns"]; - dmnObjectNamespace: string; - dmnObjectId: string | undefined; - dmnObjectQName: XmlQName; + definitions: Normalized; + __readonly_drgEdges: DrgEdge[]; + __readonly_drdIndex: number; + __readonly_nodeNature: NodeNature; + __readonly_externalModelTypesByNamespace: ReturnType; + __readonly_dmnObjectId: string | undefined; + __readonly_dmnObjectNamespace: string; + __readonly_dmnObjectQName: XmlQName; mode: NodeDeletionMode; }): { - deletedDmnObject: Unpacked | undefined; - deletedDmnShapeOnCurrentDrd: DMNDI15__DMNShape | undefined; + deletedDmnObject: Unpacked["drgElement" | "artifact"]> | undefined; + deletedDmnShapeOnCurrentDrd: Normalized | undefined; } { if ( mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY && !canRemoveNodeFromDrdOnly({ definitions, - drdIndex, - dmnObjectNamespace, - dmnObjectId, - externalDmnsIndex, + __readonly_drdIndex, + __readonly_dmnObjectNamespace, + __readonly_dmnObjectId, + __readonly_externalDmnsIndex: __readonly_externalModelTypesByNamespace.dmns, }) ) { console.warn("DMN MUTATION: Cannot hide a Decision that's contained by a Decision Service from a DRD."); @@ -77,14 +79,18 @@ export function deleteNode({ if (mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) { // Delete Edges // A DRD doesn't necessarily renders all edges of the DRG, so we need to look for what DRG edges to delete when deleting a node from any DRD. - const nodeId = buildXmlHref({ namespace: dmnObjectNamespace, id: dmnObjectId! }); - for (let i = 0; i < drgEdges.length; i++) { - const drgEdge = drgEdges[i]; + const nodeId = buildXmlHref({ + namespace: + __readonly_dmnObjectNamespace === definitions["@_namespace"] ? undefined : __readonly_dmnObjectNamespace, + id: __readonly_dmnObjectId!, + }); + for (let i = 0; i < __readonly_drgEdges.length; i++) { + const drgEdge = __readonly_drgEdges[i]; // Only delete edges that end at or start from the node being deleted. if (drgEdge.sourceId === nodeId || drgEdge.targetId === nodeId) { deleteEdge({ definitions, - drdIndex, + drdIndex: __readonly_drdIndex, mode: EdgeDeletionMode.FROM_DRG_AND_ALL_DRDS, edge: { id: drgEdge.id, @@ -107,61 +113,61 @@ export function deleteNode({ } } - let dmnObject: Unpacked | undefined; + let deletedDmnObject: Unpacked["drgElement" | "artifact"]> | undefined; // External or unknown nodes don't have a dmnObject associated with it, just the shape.. - if (!dmnObjectQName.prefix) { + if (!__readonly_dmnObjectQName.prefix) { // Delete the dmnObject itself - if (nodeNature === NodeNature.ARTIFACT) { + if (__readonly_nodeNature === NodeNature.ARTIFACT) { if (mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) { - const nodeIndex = (definitions.artifact ?? []).findIndex((a) => a["@_id"] === dmnObjectId); - dmnObject = definitions.artifact?.splice(nodeIndex, 1)?.[0]; + const nodeIndex = (definitions.artifact ?? []).findIndex((a) => a["@_id"] === __readonly_dmnObjectId); + deletedDmnObject = definitions.artifact?.splice(nodeIndex, 1)?.[0]; } else { throw new Error(`DMN MUTATION: Can't hide an artifact node.`); } - } else if (nodeNature === NodeNature.DRG_ELEMENT) { - const nodeIndex = (definitions.drgElement ?? []).findIndex((d) => d["@_id"] === dmnObjectId); - dmnObject = + } else if (__readonly_nodeNature === NodeNature.DRG_ELEMENT) { + const nodeIndex = (definitions.drgElement ?? []).findIndex((d) => d["@_id"] === __readonly_dmnObjectId); + deletedDmnObject = mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS ? definitions.drgElement?.splice(nodeIndex, 1)?.[0] : definitions.drgElement?.[nodeIndex]; - } else if (nodeNature === NodeNature.UNKNOWN) { + } else if (__readonly_nodeNature === NodeNature.UNKNOWN) { // Ignore. There's no dmnObject here. } else { - throw new Error(`DMN MUTATION: Unknown node nature '${nodeNature}'.`); + throw new Error(`DMN MUTATION: Unknown node nature '${__readonly_nodeNature}'.`); } - if (!dmnObject && nodeNature !== NodeNature.UNKNOWN) { + if (!deletedDmnObject && __readonly_nodeNature !== NodeNature.UNKNOWN) { /** * We do not want to throw error in case of `nodeNature` equals to `NodeNature.UNKNOWN`. * In such scenario it is expected `dmnObject` is undefined as we can not pair `dmnObject` with the `DMNShape`. * However we are still able to delete at least the selected `DMNShape` from the diagram. */ - throw new Error(`DMN MUTATION: Can't delete DMN object that doesn't exist: ID=${dmnObjectId}`); + throw new Error(`DMN MUTATION: Can't delete DMN object that doesn't exist: ID=${__readonly_dmnObjectId}`); } } - const shapeDmnElementRef = buildXmlQName(dmnObjectQName); + const shapeDmnElementRef = buildXmlQName(__readonly_dmnObjectQName); // Deleting the DMNShape's - let deletedDmnShapeOnCurrentDrd: DMNDI15__DMNShape | undefined; + let deletedDmnShapeOnCurrentDrd: Normalized | undefined; - const deletedIdsOnDmnObjectTree = dmnObject + const deletedIdsOnDmnObjectTree = deletedDmnObject ? getNewDmnIdRandomizer() - .ack({ json: [dmnObject], type: "DMN15__tDefinitions", attr: "drgElement" }) + .ack({ json: [deletedDmnObject], type: "DMN15__tDefinitions", attr: "drgElement" }) .getOriginalIds() : new Set(); const drdCount = (definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? []).length; for (let i = 0; i < drdCount; i++) { - if (mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY && i !== drdIndex) { + if (mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY && i !== __readonly_drdIndex) { continue; } const { diagramElements, widthsExtension } = addOrGetDrd({ definitions, drdIndex: i }); const dmnShapeIndex = (diagramElements ?? []).findIndex((d) => d["@_dmnElementRef"] === shapeDmnElementRef); if (dmnShapeIndex >= 0) { - if (i === drdIndex) { + if (i === __readonly_drdIndex) { deletedDmnShapeOnCurrentDrd = diagramElements[dmnShapeIndex]; } @@ -177,40 +183,40 @@ export function deleteNode({ repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions }); return { - deletedDmnObject: mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS ? dmnObject : undefined, + deletedDmnObject: mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS ? deletedDmnObject : undefined, deletedDmnShapeOnCurrentDrd, }; } export function canRemoveNodeFromDrdOnly({ definitions, - drdIndex, - dmnObjectNamespace, - dmnObjectId, - externalDmnsIndex, + __readonly_drdIndex, + __readonly_dmnObjectNamespace, + __readonly_dmnObjectId, + __readonly_externalDmnsIndex, }: { - dmnObjectNamespace: string; - dmnObjectId: string | undefined; - definitions: DMN15__tDefinitions; - drdIndex: number; - externalDmnsIndex: ReturnType["dmns"]; + definitions: Normalized; + __readonly_dmnObjectNamespace: string; + __readonly_dmnObjectId: string | undefined; + __readonly_drdIndex: number; + __readonly_externalDmnsIndex: ReturnType["dmns"]; }) { - const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); + const { diagramElements } = addOrGetDrd({ definitions, drdIndex: __readonly_drdIndex }); const dmnObjectHref = buildXmlHref({ - namespace: dmnObjectNamespace === definitions["@_namespace"] ? "" : dmnObjectNamespace, - id: dmnObjectId!, + namespace: __readonly_dmnObjectNamespace === definitions["@_namespace"] ? undefined : __readonly_dmnObjectNamespace, + id: __readonly_dmnObjectId!, }); const drgElements = - definitions["@_namespace"] === dmnObjectNamespace + definitions["@_namespace"] === __readonly_dmnObjectNamespace ? definitions.drgElement ?? [] - : externalDmnsIndex.get(dmnObjectNamespace)?.model.definitions.drgElement ?? []; + : __readonly_externalDmnsIndex.get(__readonly_dmnObjectNamespace)?.model.definitions.drgElement ?? []; const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn = computeContainingDecisionServiceHrefsByDecisionHrefs({ thisDmnsNamespace: definitions["@_namespace"], - drgElementsNamespace: dmnObjectNamespace, + drgElementsNamespace: __readonly_dmnObjectNamespace, drgElements, }); diff --git a/packages/dmn-editor/src/mutations/renameImport.ts b/packages/dmn-editor/src/mutations/renameImport.ts index 08dc479d1f2..5b2821f18fd 100644 --- a/packages/dmn-editor/src/mutations/renameImport.ts +++ b/packages/dmn-editor/src/mutations/renameImport.ts @@ -31,6 +31,7 @@ import { buildFeelQName, parseFeelQName } from "../feel/parseFeelQName"; import { DataTypeIndex } from "../dataTypes/DataTypes"; import { DMN15__tContext } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; +import { Normalized } from "../normalization/normalize"; export function renameImport({ definitions, @@ -38,7 +39,7 @@ export function renameImport({ allTopLevelDataTypesByFeelName, index, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; allTopLevelDataTypesByFeelName: DataTypeIndex; newName: string; index: number; @@ -85,13 +86,15 @@ export function renameImport({ if (element.__$$element === "decision" || element.__$$element === "businessKnowledgeModel") { traverseExpressionsInExpressionHolders(element, (expression, __$$element) => { if (__$$element === "functionDefinition") { - const e = expression as DMN15__tFunctionDefinition; + const e = expression as Normalized; if (e["@_kind"] === "PMML") { - const pmmlDocument = (e.expression as DMN15__tContext).contextEntry?.find( + const pmmlDocument = (e.expression as Normalized).contextEntry?.find( ({ variable }) => variable?.["@_name"] === DMN15_SPEC.BOXED.FUNCTION.PMML.documentFieldName ); - const pmmlDocumentLiteralExpression = pmmlDocument?.expression as DMN15__tLiteralExpression | undefined; + const pmmlDocumentLiteralExpression = pmmlDocument?.expression as + | Normalized + | undefined; if (pmmlDocumentLiteralExpression?.text?.__$$text === _import["@_name"]) { pmmlDocumentLiteralExpression.text = { __$$text: trimmedNewName }; } diff --git a/packages/dmn-editor/src/mutations/renameItemDefinition.ts b/packages/dmn-editor/src/mutations/renameItemDefinition.ts index e18ce3df4a6..8de71e9be32 100644 --- a/packages/dmn-editor/src/mutations/renameItemDefinition.ts +++ b/packages/dmn-editor/src/mutations/renameItemDefinition.ts @@ -24,6 +24,7 @@ import { traverseTypeRefedInExpressionHolders, } from "../dataTypes/DataTypeSpec"; import { DataTypeIndex } from "../dataTypes/DataTypes"; +import { Normalized } from "../normalization/normalize"; export function renameItemDefinition({ definitions, @@ -31,7 +32,7 @@ export function renameItemDefinition({ allDataTypesById, itemDefinitionId, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; newName: string; itemDefinitionId: string; allDataTypesById: DataTypeIndex; diff --git a/packages/dmn-editor/src/mutations/renameNode.ts b/packages/dmn-editor/src/mutations/renameNode.ts index 8ca0465da43..bc15f5246c6 100644 --- a/packages/dmn-editor/src/mutations/renameNode.ts +++ b/packages/dmn-editor/src/mutations/renameNode.ts @@ -22,13 +22,15 @@ import { DMN15__tGroup, DMN15__tTextAnnotation, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function renameDrgElement({ definitions, newName, index, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; newName: string; index: number; }) { @@ -39,7 +41,7 @@ export function renameDrgElement({ drgElement["@_name"] = trimmedNewName; if (drgElement.__$$element !== "knowledgeSource") { - drgElement.variable ??= { "@_name": trimmedNewName }; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": trimmedNewName }; drgElement.variable!["@_name"] = trimmedNewName; } @@ -59,11 +61,11 @@ export function renameGroupNode({ newName, index, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; newName: string; index: number; }) { - (definitions.artifact![index] as DMN15__tGroup)["@_name"] = newName; + (definitions.artifact![index] as Normalized)["@_name"] = newName; } export function updateTextAnnotation({ @@ -71,9 +73,9 @@ export function updateTextAnnotation({ newText, index, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; newText: string; index: number; }) { - (definitions.artifact![index] as DMN15__tTextAnnotation).text = { __$$text: newText }; + (definitions.artifact![index] as Normalized).text = { __$$text: newText }; } diff --git a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts index c3fce874cd1..3b5bb781e1b 100644 --- a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts +++ b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts @@ -21,11 +21,12 @@ import { DMN15__tDecisionService, DMN15__tDefinitions, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; export function repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; }) { for (let i = 0; i < (definitions.drgElement ?? []).length; i++) { const drgElement = definitions.drgElement![i]; @@ -42,8 +43,8 @@ export function repopulateInputDataAndDecisionsOnDecisionService({ definitions, decisionService, }: { - definitions: DMN15__tDefinitions; - decisionService: DMN15__tDecisionService; + definitions: Normalized; + decisionService: Normalized; }) { // Save previous values to preserve order const inputDatas = new Set([...(decisionService.inputData ?? [])].map((e) => e["@_href"])); // Using Set for uniqueness diff --git a/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts index cceaa1377ac..c577b2f4926 100644 --- a/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts +++ b/packages/dmn-editor/src/mutations/repositionEdgeWaypoint.ts @@ -19,6 +19,7 @@ import { DC__Point, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { addOrGetDrd } from "./addOrGetDrd"; +import { Normalized } from "../normalization/normalize"; export function repositionEdgeWaypoint({ definitions, @@ -27,7 +28,7 @@ export function repositionEdgeWaypoint({ waypointIndex, waypoint, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; edgeIndex: number; waypointIndex: number; diff --git a/packages/dmn-editor/src/mutations/repositionNode.ts b/packages/dmn-editor/src/mutations/repositionNode.ts index bc66387cdc6..2e27f1497f8 100644 --- a/packages/dmn-editor/src/mutations/repositionNode.ts +++ b/packages/dmn-editor/src/mutations/repositionNode.ts @@ -27,6 +27,7 @@ import { NodeType } from "../diagram/connections/graphStructure"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { addOrGetDrd } from "./addOrGetDrd"; import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServiceDividerLine"; +import { Normalized } from "../normalization/normalize"; export function repositionNode({ definitions, @@ -39,7 +40,7 @@ export function repositionNode({ * This will make sure we only move edges once, even though they might be source/target edges for multiple nodes. */ controlWaypointsByEdge: Map>; - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; change: { nodeType: NodeType; @@ -60,7 +61,7 @@ export function repositionNode({ }) { const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); - const shape = diagramElements?.[change.shapeIndex] as DMNDI15__DMNShape | undefined; + const shape = diagramElements?.[change.shapeIndex] as Normalized | undefined; const shapeBounds = shape?.["dc:Bounds"]; if (!shapeBounds) { throw new Error("DMN MUTATION: Cannot reposition non-existent shape bounds"); @@ -84,7 +85,7 @@ export function repositionNode({ const offsetEdges = (args: { edgeIndexes: number[]; waypoint: "last" | "first" }) => { for (const edgeIndex of args.edgeIndexes) { - const edge = diagramElements[edgeIndex] as DMNDI15__DMNEdge | undefined; + const edge = diagramElements[edgeIndex] as Normalized | undefined; if (!edge || !edge["di:waypoint"]) { throw new Error("DMN MUTATION: Cannot reposition non-existent edge"); } diff --git a/packages/dmn-editor/src/mutations/resizeNode.ts b/packages/dmn-editor/src/mutations/resizeNode.ts index bd6e3cafe7d..ee991a1cc90 100644 --- a/packages/dmn-editor/src/mutations/resizeNode.ts +++ b/packages/dmn-editor/src/mutations/resizeNode.ts @@ -33,18 +33,24 @@ import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; import { SnapGrid } from "../store/Store"; import { addOrGetDrd } from "./addOrGetDrd"; import { DECISION_SERVICE_DIVIDER_LINE_PADDING } from "./updateDecisionServiceDividerLine"; +import { Normalized } from "../normalization/normalize"; +import { ExternalDmnsIndex } from "../DmnEditor"; export function resizeNode({ definitions, drdIndex, - dmnShapesByHref, + __readonly_dmnShapesByHref, + __readonly_dmnObjectNamespace, + __readonly_externalDmnsIndex, snapGrid, change, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; - dmnShapesByHref: Map; + __readonly_dmnShapesByHref: Map & { index: number }>; snapGrid: SnapGrid; + __readonly_dmnObjectNamespace: string | undefined; + __readonly_externalDmnsIndex: ExternalDmnsIndex; change: { nodeType: NodeType; isExternal: boolean; @@ -59,7 +65,7 @@ export function resizeNode({ const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); - const shape = diagramElements?.[change.shapeIndex] as DMNDI15__DMNShape | undefined; + const shape = diagramElements?.[change.shapeIndex] as Normalized | undefined; const shapeBounds = shape?.["dc:Bounds"]; if (!shapeBounds) { throw new Error("DMN MUTATION: Cannot resize non-existent shape bounds"); @@ -67,7 +73,15 @@ export function resizeNode({ const limit = { x: 0, y: 0 }; if (change.nodeType === NODE_TYPES.decisionService) { - const ds = definitions.drgElement![change.index] as DMN15__tDecisionService; + const externalDmn = __readonly_externalDmnsIndex.get(__readonly_dmnObjectNamespace ?? ""); + + const ds = + externalDmn === undefined + ? (definitions.drgElement![change.index] as Normalized) + : (externalDmn.model.definitions.drgElement![change.index] as Normalized); + if (!ds) { + throw new Error("DMN MUTATION: Cannot reposition divider line of non-existent Decision Service"); + } const dividerLineY = shape["dmndi:DMNDecisionServiceDividerLine"]?.["di:waypoint"]?.[0]?.["@_y"] ?? shapeBounds["@_y"]; @@ -76,7 +90,7 @@ export function resizeNode({ // We ignore handling the contents of the Decision Service when it is external if (!change.isExternal) { ds.encapsulatedDecision?.forEach((ed) => { - const edShape = dmnShapesByHref.get(ed["@_href"])!; + const edShape = __readonly_dmnShapesByHref.get(ed["@_href"])!; const dim = snapShapeDimensions(snapGrid, edShape, MIN_NODE_SIZES[NODE_TYPES.decision]({ snapGrid })); const pos = snapShapePosition(snapGrid, edShape); if (pos.x + dim.width > limit.x) { @@ -90,7 +104,7 @@ export function resizeNode({ // Output Decisions don't limit the resizing vertically, only horizontally. ds.outputDecision?.forEach((ed) => { - const edShape = dmnShapesByHref.get(ed["@_href"])!; + const edShape = __readonly_dmnShapesByHref.get(ed["@_href"])!; const dim = snapShapeDimensions(snapGrid, edShape, MIN_NODE_SIZES[NODE_TYPES.decision]({ snapGrid })); const pos = snapShapePosition(snapGrid, edShape); if (pos.x + dim.width > limit.x) { @@ -128,7 +142,7 @@ export function resizeNode({ edgeIndexesAlreadyUpdated.add(edgeIndex); - const edge = diagramElements[edgeIndex] as DMNDI15__DMNEdge | undefined; + const edge = diagramElements[edgeIndex] as Normalized | undefined; if (!edge || !edge["di:waypoint"]) { throw new Error("DMN MUTATION: Cannot reposition non-existent edge"); } diff --git a/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts b/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts index f3b7f56dd5c..d92ca3a67d1 100644 --- a/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts +++ b/packages/dmn-editor/src/mutations/updateDecisionServiceDividerLine.ts @@ -29,21 +29,29 @@ import { snapShapeDimensions, snapShapePosition } from "../diagram/SnapGrid"; import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { SnapGrid } from "../store/Store"; import { NODE_TYPES } from "../diagram/nodes/NodeTypes"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { addNamespaceToHref } from "../xml/xmlHrefs"; +import { ExternalDmnsIndex } from "../DmnEditor"; export const DECISION_SERVICE_DIVIDER_LINE_PADDING = 100; export function updateDecisionServiceDividerLine({ definitions, drdIndex, - dmnShapesByHref, + __readonly_dmnShapesByHref, + __readonly_dmnObjectNamespace, + __readonly_externalDmnsIndex, shapeIndex, localYPosition, drgElementIndex, snapGrid, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; - dmnShapesByHref: Map; + __readonly_dmnShapesByHref: Map & { index: number }>; + __readonly_dmnObjectNamespace: string | undefined; + __readonly_externalDmnsIndex: ExternalDmnsIndex; shapeIndex: number; localYPosition: number; drgElementIndex: number; @@ -51,13 +59,18 @@ export function updateDecisionServiceDividerLine({ }) { const { diagramElements } = addOrGetDrd({ definitions, drdIndex }); - const shape = diagramElements?.[shapeIndex] as DMNDI15__DMNShape | undefined; + const shape = diagramElements?.[shapeIndex] as Normalized | undefined; const shapeBounds = shape?.["dc:Bounds"]; if (!shapeBounds) { throw new Error("DMN MUTATION: Cannot reposition divider line of non-existent shape bounds"); } - const ds = definitions.drgElement![drgElementIndex] as DMN15__tDecisionService; + const externalDmn = __readonly_externalDmnsIndex.get(__readonly_dmnObjectNamespace ?? ""); + + const ds = + externalDmn === undefined + ? (definitions.drgElement![drgElementIndex] as Normalized) + : (externalDmn.model.definitions.drgElement![drgElementIndex] as Normalized); if (!ds) { throw new Error("DMN MUTATION: Cannot reposition divider line of non-existent Decision Service"); } @@ -69,14 +82,32 @@ export function updateDecisionServiceDividerLine({ const snappedDimensions = snapShapeDimensions(snapGrid, shape, decisionServiceMinSizes); const upperLimit = (ds.outputDecision ?? []).reduce((acc, od) => { + // For external Decision Services, the Output Decision will have the relative namespace. e.g. without namespace. + const href = + __readonly_dmnObjectNamespace !== undefined + ? addNamespaceToHref({ + href: od["@_href"], + namespace: + definitions["@_namespace"] === __readonly_dmnObjectNamespace ? undefined : __readonly_dmnObjectNamespace, + }) + : od["@_href"]; const v = - snapShapePosition(snapGrid, dmnShapesByHref.get(od["@_href"])!).y + - snapShapeDimensions(snapGrid, dmnShapesByHref.get(od["@_href"])!, decisionMinSizes).height; + snapShapePosition(snapGrid, __readonly_dmnShapesByHref.get(href)!).y + + snapShapeDimensions(snapGrid, __readonly_dmnShapesByHref.get(href)!, decisionMinSizes).height; return v > acc ? v : acc; }, snappedPosition.y + DECISION_SERVICE_DIVIDER_LINE_PADDING); const lowerLimit = (ds.encapsulatedDecision ?? []).reduce((acc, ed) => { - const v = snapShapePosition(snapGrid, dmnShapesByHref.get(ed["@_href"])!).y; + // For external Decision Services, the Encapsulated Decision will have the relative namespace. e.g. without namespace. + const href = + __readonly_dmnObjectNamespace !== undefined + ? addNamespaceToHref({ + href: ed["@_href"], + namespace: + definitions["@_namespace"] === __readonly_dmnObjectNamespace ? undefined : __readonly_dmnObjectNamespace, + }) + : ed["@_href"]; + const v = snapShapePosition(snapGrid, __readonly_dmnShapesByHref.get(href)!).y; return v < acc ? v : acc; }, snappedPosition.y + snappedDimensions.height - DECISION_SERVICE_DIVIDER_LINE_PADDING); @@ -87,8 +118,11 @@ export function updateDecisionServiceDividerLine({ shape["dmndi:DMNDecisionServiceDividerLine"]["di:waypoint"]![1]["@_y"] = newDividerLineYPosition; } -export function getCentralizedDecisionServiceDividerLine(bounds: DC__Bounds): DMNDI15__DMNDecisionServiceDividerLine { +export function getCentralizedDecisionServiceDividerLine( + bounds: DC__Bounds +): Normalized { return { + "@_id": generateUuid(), "di:waypoint": [ { "@_x": bounds["@_x"], "@_y": bounds["@_y"] + bounds["@_height"] / 2 }, { diff --git a/packages/dmn-editor/src/mutations/updateExpression.ts b/packages/dmn-editor/src/mutations/updateExpression.ts index 42e57febe92..f81bc318ed3 100644 --- a/packages/dmn-editor/src/mutations/updateExpression.ts +++ b/packages/dmn-editor/src/mutations/updateExpression.ts @@ -23,14 +23,15 @@ import { DMN15__tFunctionDefinition, } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { renameDrgElement } from "./renameNode"; +import { Normalized } from "../normalization/normalize"; export function updateExpression({ definitions, expression, drgElementIndex, }: { - definitions: DMN15__tDefinitions; - expression: BoxedExpression; + definitions: Normalized; + expression: Normalized; drgElementIndex: number; }): void { const drgElement = definitions.drgElement?.[drgElementIndex]; @@ -46,7 +47,7 @@ export function updateExpression({ if (drgElement?.__$$element === "decision") { drgElement.expression = expression; - drgElement.variable!["@_typeRef"] = expression?.["@_typeRef"] ?? drgElement.variable!["@_typeRef"]; + drgElement.variable!["@_typeRef"] = expression ? expression["@_typeRef"] : drgElement.variable!["@_typeRef"]; } else if (drgElement?.__$$element === "businessKnowledgeModel") { if (expression.__$$element !== "functionDefinition") { throw new Error("DMN MUTATION: Can't have an expression on a BKM that is not a Function."); @@ -58,7 +59,7 @@ export function updateExpression({ // We remove the __$$element here, because otherwise the "functionDefinition" element name will be used in the final XML. const { __$$element, ..._updateExpression } = expression; - drgElement.encapsulatedLogic = _updateExpression as DMN15__tFunctionDefinition; + drgElement.encapsulatedLogic = _updateExpression as Normalized; drgElement.variable!["@_typeRef"] = _updateExpression?.["@_typeRef"] ?? drgElement.variable!["@_typeRef"]; } else { throw new Error("DMN MUTATION: Can't update expression for drgElement that is not a Decision or a BKM."); diff --git a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts index ff7f8451b45..7e6fb2d3dce 100644 --- a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts +++ b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts @@ -19,13 +19,14 @@ import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { addOrGetDrd } from "./addOrGetDrd"; +import { Normalized } from "../normalization/normalize"; export function updateExpressionWidths({ definitions, drdIndex, widthsById, }: { - definitions: DMN15__tDefinitions; + definitions: Normalized; drdIndex: number; widthsById: Map; }): void { diff --git a/packages/dmn-editor/src/normalization/autoGenerateDrd.ts b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts new file mode 100644 index 00000000000..2053b0c7f9f --- /dev/null +++ b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts @@ -0,0 +1,211 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { ExternalDmnsIndex, ExternalModelsIndex, ExternalPmmlsIndex } from "../DmnEditor"; +import { computeDiagramData } from "../store/computed/computeDiagramData"; +import { State } from "../store/Store"; +import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; +import { getNodeTypeFromDmnObject } from "../diagram/maths/DmnMaths"; +import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; +import { parseXmlHref } from "../xml/xmlHrefs"; +import { computeIndexedDrd } from "../store/computed/computeIndexes"; +import { getDefaultDrdName } from "../mutations/addOrGetDrd"; +import { addShape } from "../mutations/addShape"; +import { addEdge } from "../mutations/addEdge"; +import { EdgeType, NodeType } from "../diagram/connections/graphStructure"; +import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles"; +import { Normalized } from "./normalize"; + +export async function autoGenerateDrd(args: { + model: State["dmn"]["model"]; + diagram: State["diagram"]; + externalModelsByNamespace: ExternalModelsIndex | undefined; + externalModelTypesByNamespace: { + dmns: ExternalDmnsIndex; + pmmls: ExternalPmmlsIndex; + }; +}) { + // Create DRD + args.model.definitions["dmndi:DMNDI"] = { + ...args.model.definitions["dmndi:DMNDI"], + "dmndi:DMNDiagram": [ + { + "@_id": generateUuid(), + "@_name": getDefaultDrdName({ drdIndex: 0 }), + "@_useAlternativeInputDataShape": false, + "dmndi:DMNDiagramElement": [], + "di:extension": { "kie:ComponentsWidthsExtension": { "kie:ComponentWidths": [{}] } }, + }, + ], + }; + + // 1. Add shapes from current DRG + args.model.definitions.drgElement?.forEach((drgElement) => { + const nodeType = getNodeTypeFromDmnObject(drgElement) ?? "node_unknown"; + const minNodeSize = MIN_NODE_SIZES[nodeType]({ + snapGrid: { + isEnabled: true, + x: 20, + y: 20, + }, + isAlternativeInputDataShape: false, + }); + + addShape({ + definitions: args.model.definitions, + drdIndex: 0, + nodeType: nodeType, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": drgElement["@_id"]!, + "dc:Bounds": { + "@_x": 0, + "@_y": 0, + ...minNodeSize, + }, + }, + }); + }); + + // 2. Add shapes from external models; + const definedNamespaces = new Map( + Object.keys(args.model.definitions) + .filter((keys: keyof Normalized) => String(keys).startsWith("@_xmlns:")) + .map((xmlnsKey: keyof Normalized) => [ + args.model.definitions[xmlnsKey], + xmlnsKey.split("@_xmlns:")[1], + ]) + ); + + const updateIndexedDrdWithNodes = computeIndexedDrd(args.model.definitions["@_namespace"], args.model.definitions, 0); + const { nodesById: updatedNodesByIdWithNodes, drgEdges: updatedDrgEdgesWithNodes } = computeDiagramData( + args.diagram, + args.model.definitions, + args.externalModelTypesByNamespace, + updateIndexedDrdWithNodes, + false + ); + + // Search on edges for any node that isn't on the nodesByIdMap; + // Only external nodes should be added to the externalNodesHref; + const externalNodesHref = updatedDrgEdgesWithNodes.reduce((acc, drgEdge) => { + if (!updatedNodesByIdWithNodes.has(drgEdge.sourceId)) { + acc.add(drgEdge.sourceId); + } + if (!updatedNodesByIdWithNodes.has(drgEdge.targetId)) { + acc.add(drgEdge.targetId); + } + return acc; + }, new Set()); + + // Add external shapes + externalNodesHref.forEach((href) => { + const { namespace, id } = parseXmlHref(href); + if (namespace) { + const externalModel = args.externalModelsByNamespace?.[namespace]; + if (externalModel && (externalModel.model as Normalized).definitions) { + const drgElements = (externalModel.model as Normalized).definitions.drgElement; + const drgElement = drgElements?.filter((drgElement) => drgElement["@_id"] === id); + + const nodeType = getNodeTypeFromDmnObject(drgElement![0]) ?? "node_unknown"; + const minNodeSize = MIN_NODE_SIZES[nodeType]({ + snapGrid: { + isEnabled: true, + x: 20, + y: 20, + }, + isAlternativeInputDataShape: false, + }); + + addShape({ + definitions: args.model.definitions, + drdIndex: 0, + nodeType: nodeType, + shape: { + "@_id": generateUuid(), + "@_dmnElementRef": `${definedNamespaces.get(namespace)}:${id}`, + "dc:Bounds": { + "@_x": 0, + "@_y": 0, + ...minNodeSize, + }, + }, + }); + } + } + }); + + // 3. Add edges + const updatedIndexedDrdWithExternalNodes = computeIndexedDrd( + args.model.definitions["@_namespace"], + args.model.definitions, + 0 + ); + const { + nodesById: updatedNodesByIdWithExternalNodes, + edgesById: updatedEdgesByIdWithExternalNodes, + drgEdges: updatedDrgEdgesWithExternalNodes, + } = computeDiagramData( + args.diagram, + args.model.definitions, + args.externalModelTypesByNamespace, + updatedIndexedDrdWithExternalNodes, + false + ); + + for (const drgEdge of updatedDrgEdgesWithExternalNodes) { + const edge = updatedEdgesByIdWithExternalNodes.get(drgEdge.id); + const sourceNode = updatedNodesByIdWithExternalNodes.get(drgEdge.sourceId); + const targetNode = updatedNodesByIdWithExternalNodes.get(drgEdge.targetId); + + // Avoid missing nodes. Possible cause is an external model which couldn't be found. + if (!edge || !sourceNode || !targetNode) { + continue; + } + + addEdge({ + definitions: args.model.definitions, + drdIndex: 0, + keepWaypoints: false, + edge: { + autoPositionedEdgeMarker: undefined, + type: edge.type as EdgeType, + targetHandle: PositionalNodeHandleId.Bottom, + sourceHandle: PositionalNodeHandleId.Top, + }, + sourceNode: { + type: sourceNode.type as NodeType, + href: sourceNode.id, + data: sourceNode.data, + bounds: sourceNode.data.shape["dc:Bounds"]!, + shapeId: sourceNode.data.shape["@_id"], + }, + targetNode: { + type: targetNode.type as NodeType, + href: targetNode.id, + data: targetNode.data, + bounds: targetNode.data.shape["dc:Bounds"]!, + index: targetNode.data.index, + shapeId: targetNode.data.shape["@_id"], + }, + }); + } +} diff --git a/packages/dmn-editor/src/normalization/normalize.ts b/packages/dmn-editor/src/normalization/normalize.ts index c3951676a50..92a6fb26aea 100644 --- a/packages/dmn-editor/src/normalization/normalize.ts +++ b/packages/dmn-editor/src/normalization/normalize.ts @@ -17,11 +17,22 @@ * under the License. */ +import { DmnLatestModel } from "@kie-tools/dmn-marshaller"; import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer"; import { addMissingImportNamespaces } from "../mutations/addMissingImportNamespaces"; import { State } from "../store/Store"; -export function normalize(model: State["dmn"]["model"]) { +export type Normalized = WithRequiredDeep; + +type WithRequiredDeep = T extends undefined + ? T + : T extends Array + ? Array> + : { [P in keyof T]: WithRequiredDeep } & (K extends keyof T + ? { [P in K]-?: NonNullable> } + : T); + +export function normalize(model: DmnLatestModel): State["dmn"]["model"] { getNewDmnIdRandomizer() .ack({ json: model.definitions.drgElement, @@ -50,7 +61,9 @@ export function normalize(model: State["dmn"]["model"]) { }) .randomize({ skipAlreadyAttributedIds: true }); - addMissingImportNamespaces(model.definitions); + const normalizedModel = model as Normalized; + + addMissingImportNamespaces(normalizedModel.definitions); - return model; + return normalizedModel; } diff --git a/packages/dmn-editor/src/overlaysPanel/OverlaysPanel.tsx b/packages/dmn-editor/src/overlaysPanel/OverlaysPanel.tsx index 63901c773d7..f66be9aa90a 100644 --- a/packages/dmn-editor/src/overlaysPanel/OverlaysPanel.tsx +++ b/packages/dmn-editor/src/overlaysPanel/OverlaysPanel.tsx @@ -23,17 +23,37 @@ import { Form, FormGroup } from "@patternfly/react-core/dist/js/components/Form" import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; import { Slider } from "@patternfly/react-core/dist/js/components/Slider"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; +import { useLayoutEffect, useRef } from "react"; const MIN_SNAP = 5; const MAX_SNAP = 50; const SNAP_STEP = 5; +const BOTTOM_MARGIN = 10; -export function OverlaysPanel() { +interface OverlaysPanelProps { + availableHeight?: number; +} + +export function OverlaysPanel({ availableHeight }: OverlaysPanelProps) { const diagram = useDmnEditorStore((s) => s.diagram); const dmnEditorStoreApi = useDmnEditorStoreApi(); + const overlayPanelContainer = useRef(null); + useLayoutEffect(() => { + if (overlayPanelContainer.current && availableHeight) { + const bounds = overlayPanelContainer.current.getBoundingClientRect(); + const currentHeight = bounds.height; + const yPos = bounds.y; + if (currentHeight + yPos >= availableHeight) { + overlayPanelContainer.current.style.height = availableHeight - BOTTOM_MARGIN + "px"; + overlayPanelContainer.current.style.overflowY = "scroll"; + } else { + overlayPanelContainer.current.style.overflowY = "visible"; + } + } + }); return ( - <> +
e.stopPropagation()} // Prevent ReactFlow KeyboardShortcuts from triggering when editing stuff on Overlays Panel > @@ -140,6 +160,6 @@ export function OverlaysPanel() { />
- +
); } diff --git a/packages/dmn-editor/src/pmml/pmml.ts b/packages/dmn-editor/src/pmml/pmml.ts index e07e4e3d977..5fed0e6df35 100644 --- a/packages/dmn-editor/src/pmml/pmml.ts +++ b/packages/dmn-editor/src/pmml/pmml.ts @@ -20,6 +20,7 @@ import { DMN15__tImport } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { buildXmlHref } from "../xml/xmlHrefs"; import * as __path from "path"; +import { Normalized } from "../normalization/normalize"; export const KIE_PMML_NAMESPACE = "https://kie.org/pmml"; @@ -56,7 +57,7 @@ export function getPmmlNamespace({ return buildXmlHref({ namespace: KIE_PMML_NAMESPACE, id: normalizedPosixPathRelativeToTheOpenFile }); } -export function getPmmlNamespaceFromDmnImport({ dmnImport }: { dmnImport: DMN15__tImport }) { +export function getPmmlNamespaceFromDmnImport({ dmnImport }: { dmnImport: Normalized }) { return dmnImport["@_locationURI"] ? getPmmlNamespace({ // We need to normalize the path here because they're always stored as explicit relative paths starting with `./` or `../` diff --git a/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx b/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx index a8c9d9aacb8..9a8466cfa18 100644 --- a/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BkmProperties.tsx @@ -30,13 +30,15 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function BkmProperties({ bkm, namespace, index, }: { - bkm: DMN15__tBusinessKnowledgeModel; + bkm: Normalized; namespace: string | undefined; index: number; }) { @@ -80,8 +82,10 @@ export function BkmProperties({ isDisabled={isReadonly} onChange={(newTypeRef) => { setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tBusinessKnowledgeModel; - drgElement.variable ??= { "@_name": bkm["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![ + index + ] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": bkm["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }} @@ -96,7 +100,9 @@ export function BkmProperties({ value={bkm.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tBusinessKnowledgeModel).description = { + ( + state.dmn.model.definitions.drgElement![index] as Normalized + ).description = { __$$text: newDescription, }; }); @@ -118,7 +124,9 @@ export function BkmProperties({ values={bkm.extensionElements?.["kie:attachment"]} onChange={(newExtensionElements) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tBusinessKnowledgeModel).extensionElements = { + ( + state.dmn.model.definitions.drgElement![index] as Normalized + ).extensionElements = { "kie:attachment": newExtensionElements, }; }); diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx index db4821eef99..4bde233ac7d 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ContextInformationItemCell.tsx @@ -24,6 +24,7 @@ import { DMN15__tContext, DMN15__tInformationItem } from "@kie-tools/dmn-marshal import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; import { useDmnEditorStore } from "../../store/StoreContext"; +import { Normalized } from "../../normalization/normalize"; export function ContextInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -44,8 +45,10 @@ export function ContextInformationItemCell(props: { [cellPath?.root, props.boxedExpressionIndex] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); - const rootExpressionUpdater = useBoxedExpressionUpdater(rootPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); + const rootExpressionUpdater = useBoxedExpressionUpdater>(rootPath ?? []); return ( <> @@ -68,7 +71,7 @@ export function ContextInformationItemCell(props: { }); rootExpressionUpdater((dmnObject) => { if (cellPath?.type === "context") { - const expression = (dmnObject as DMN15__tContext).contextEntry![cellPath.row ?? 0].expression; + const expression = (dmnObject as Normalized).contextEntry![cellPath.row ?? 0].expression; if (expression) { expression["@_typeRef"] = newTypeRef; } diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx index 1256d589102..32d617bd96b 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputHeaderCell.tsx @@ -24,7 +24,7 @@ import { ContentField, DescriptionField, ExpressionLanguageField, NameField, Typ import { FormGroup, FormSection } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tInputClause } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { useDmnEditor } from "../../DmnEditorContext"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; +import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { PropertiesPanelHeader } from "../PropertiesPanelHeader"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; @@ -32,6 +32,7 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; +import { Normalized } from "../../normalization/normalize"; export function DecisionTableInputHeaderCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -46,9 +47,9 @@ export function DecisionTableInputHeaderCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>(selectedObjectInfos?.expressionPath ?? []); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tInputClause, [selectedObjectInfos?.cell]); + const cell = useMemo(() => selectedObjectInfos?.cell as Normalized, [selectedObjectInfos?.cell]); const inputExpression = useMemo(() => cell.inputExpression, [cell.inputExpression]); const inputValues = useMemo(() => cell.inputValues, [cell.inputValues]); @@ -101,7 +102,7 @@ export function DecisionTableInputHeaderCell(props: { getAllUniqueNames={getAllUniqueNames} onChange={(newName) => updater((dmnObject) => { - dmnObject.inputExpression ??= {}; + dmnObject.inputExpression ??= { "@_id": generateUuid() }; dmnObject.inputExpression.text ??= { __$$text: "" }; dmnObject.inputExpression.text.__$$text = newName; }) @@ -110,12 +111,12 @@ export function DecisionTableInputHeaderCell(props: { updater((dmnObject) => { - dmnObject.inputExpression ??= {}; + dmnObject.inputExpression ??= { "@_id": generateUuid() }; dmnObject.inputExpression["@_typeRef"] = newTypeRef; - dmnObject.inputValues ??= { text: { __$$text: "" } }; + dmnObject.inputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.inputValues["@_typeRef"] = newTypeRef; }) } @@ -137,7 +138,7 @@ export function DecisionTableInputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newExpressionLanguage) => updater((dmnObject) => { - dmnObject.inputExpression ??= {}; + dmnObject.inputExpression ??= { "@_id": generateUuid() }; dmnObject.inputExpression["@_expressionLanguage"] = newExpressionLanguage; }) } @@ -148,7 +149,7 @@ export function DecisionTableInputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newDescription) => updater((dmnObject) => { - dmnObject.inputExpression ??= {}; + dmnObject.inputExpression ??= { "@_id": generateUuid() }; dmnObject.inputExpression.description ??= { __$$text: "" }; dmnObject.inputExpression.description.__$$text = newDescription; }) @@ -173,7 +174,7 @@ export function DecisionTableInputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newExpressionLanguage) => updater((dmnObject) => { - dmnObject.inputValues ??= { text: { __$$text: "" } }; + dmnObject.inputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.inputValues["@_expressionLanguage"] = newExpressionLanguage; }) } @@ -184,7 +185,7 @@ export function DecisionTableInputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newText) => updater((dmnObject) => { - dmnObject.inputValues ??= { text: { __$$text: "" } }; + dmnObject.inputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.inputValues.text ??= { __$$text: "" }; dmnObject.inputValues.text.__$$text = newText; }) @@ -196,7 +197,7 @@ export function DecisionTableInputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newDescription: string) => updater((dmnObject) => { - dmnObject.inputValues ??= { text: { __$$text: "" } }; + dmnObject.inputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.inputValues.description ??= { __$$text: "" }; dmnObject.inputValues.description.__$$text = newDescription; }) diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx index 6fa40b414ea..c7660b75687 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableInputRuleCell.tsx @@ -30,6 +30,7 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditor } from "../../DmnEditorContext"; import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../../normalization/normalize"; export function DecisionTableInputRule(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadonly: boolean }) { const dmnEditorStoreApi = useDmnEditorStoreApi(); @@ -56,16 +57,18 @@ export function DecisionTableInputRule(props: { boxedExpressionIndex?: BoxedExpr .getDataTypes(externalModelsByNamespace); const typeRef = allTopLevelItemDefinitionUniqueNames.get( - (root?.cell as DMN15__tDecisionTable)?.input?.[cellPath.column ?? 0].inputExpression["@_typeRef"] ?? "" + (root?.cell as Normalized)?.input?.[cellPath.column ?? 0].inputExpression[ + "@_typeRef" + ] ?? "" ) ?? DmnBuiltInDataType.Undefined; return { typeRef, itemDefinition: allDataTypesById.get(typeRef)?.itemDefinition }; } } }, [dmnEditorStoreApi, externalModelsByNamespace, props.boxedExpressionIndex, selectedObjectInfos?.expressionPath]); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>(selectedObjectInfos?.expressionPath ?? []); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tUnaryTests, [selectedObjectInfos?.cell]); + const cell = useMemo(() => selectedObjectInfos?.cell as Normalized, [selectedObjectInfos?.cell]); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx index 68a51490169..026712b619e 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputHeaderCell.tsx @@ -24,7 +24,7 @@ import { ContentField, DescriptionField, ExpressionLanguageField, NameField, Typ import { FormGroup, FormSection } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tOutputClause } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { PropertiesPanelHeader } from "../PropertiesPanelHeader"; -import { BoxedDecisionTable, DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; +import { BoxedDecisionTable, DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; import { useDmnEditor } from "../../DmnEditorContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; @@ -32,6 +32,7 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; +import { Normalized } from "../../normalization/normalize"; export function DecisionTableOutputHeaderCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -47,9 +48,14 @@ export function DecisionTableOutputHeaderCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tOutputClause, [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized, + [selectedObjectInfos?.cell] + ); const defaultOutputEntry = useMemo(() => cell.defaultOutputEntry, [cell.defaultOutputEntry]); const outputValues = useMemo(() => cell.outputValues, [cell.outputValues]); @@ -66,7 +72,7 @@ export function DecisionTableOutputHeaderCell(props: { () => props.boxedExpressionIndex?.get( selectedObjectInfos?.expressionPath[selectedObjectInfos?.expressionPath.length - 1]?.root ?? "" - )?.cell as BoxedDecisionTable | undefined, + )?.cell as Normalized | undefined, [props.boxedExpressionIndex, selectedObjectInfos?.expressionPath] ); @@ -119,7 +125,7 @@ export function DecisionTableOutputHeaderCell(props: { alternativeFieldName={`${alternativeFieldName} Type`} isReadonly={true} dmnEditorRootElementRef={dmnEditorRootElementRef} - typeRef={root?.["@_typeRef"] ?? DmnBuiltInDataType.Undefined} + typeRef={root?.["@_typeRef"]} /> )} @@ -139,7 +145,7 @@ export function DecisionTableOutputHeaderCell(props: { alternativeFieldName={root?.output.length === 1 ? "Column Type" : undefined} isReadonly={props.isReadonly} dmnEditorRootElementRef={dmnEditorRootElementRef} - typeRef={cell?.["@_typeRef"] ?? DmnBuiltInDataType.Undefined} + typeRef={cell?.["@_typeRef"]} onChange={(newTypeRef) => updater((dmnObject) => { dmnObject["@_typeRef"] = newTypeRef; @@ -184,7 +190,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newExpressionLanguage) => updater((dmnObject) => { - dmnObject.defaultOutputEntry ??= {}; + dmnObject.defaultOutputEntry ??= { "@_id": generateUuid() }; dmnObject.defaultOutputEntry["@_expressionLanguage"] = newExpressionLanguage; }) } @@ -195,7 +201,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newText) => updater((dmnObject) => { - dmnObject.defaultOutputEntry ??= { text: { __$$text: "" } }; + dmnObject.defaultOutputEntry ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.defaultOutputEntry.text ??= { __$$text: "" }; dmnObject.defaultOutputEntry.text.__$$text = newText; }) @@ -207,7 +213,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newDescription) => updater((dmnObject) => { - dmnObject.defaultOutputEntry ??= { description: { __$$text: "" } }; + dmnObject.defaultOutputEntry ??= { "@_id": generateUuid(), description: { __$$text: "" } }; dmnObject.defaultOutputEntry.description ??= { __$$text: "" }; dmnObject.defaultOutputEntry.description.__$$text = newDescription; }) @@ -232,7 +238,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newExpressionLanguage) => updater((dmnObject) => { - dmnObject.outputValues ??= { text: { __$$text: "" } }; + dmnObject.outputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.outputValues["@_expressionLanguage"] = newExpressionLanguage; }) } @@ -243,7 +249,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newText) => updater((dmnObject) => { - dmnObject.outputValues ??= { text: { __$$text: "" } }; + dmnObject.outputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.outputValues.text.__$$text = newText; }) } @@ -254,7 +260,7 @@ export function DecisionTableOutputHeaderCell(props: { expressionPath={selectedObjectInfos?.expressionPath ?? []} onChange={(newDescription: string) => updater((dmnObject) => { - dmnObject.outputValues ??= { text: { __$$text: "" } }; + dmnObject.outputValues ??= { "@_id": generateUuid(), text: { __$$text: "" } }; dmnObject.outputValues.description ??= { __$$text: "" }; dmnObject.outputValues.description.__$$text = newDescription; }) diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx index 069526dfde9..e062b8833bf 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableOutputRuleCell.tsx @@ -33,6 +33,7 @@ import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/a import { useDmnEditor } from "../../DmnEditorContext"; import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../../normalization/normalize"; export function DecisionTableOutputRuleCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -61,16 +62,21 @@ export function DecisionTableOutputRuleCell(props: { ) { const typeRef = allTopLevelItemDefinitionUniqueNames.get( - (root?.cell as DMN15__tDecisionTable)?.output?.[cellPath.column ?? 0]["@_typeRef"] ?? "" + (root?.cell as Normalized)?.output?.[cellPath.column ?? 0]["@_typeRef"] ?? "" ) ?? DmnBuiltInDataType.Undefined; return { typeRef, itemDefinition: allDataTypesById.get(typeRef)?.itemDefinition }; } } }, [dmnEditorStoreApi, externalModelsByNamespace, props.boxedExpressionIndex, selectedObjectInfos?.expressionPath]); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tLiteralExpression, [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized, + [selectedObjectInfos?.cell] + ); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx index 906e6e7f0e8..a85fbd273ba 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/DecisionTableRootCell.tsx @@ -26,10 +26,11 @@ import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { useDmnEditorStore } from "../../store/StoreContext"; +import { Normalized } from "../../normalization/normalize"; type DecisionTableRoot = Pick< - DMN15__tDecisionTable, - "@_label" | "description" | "@_typeRef" | "@_outputLabel" | "@_aggregation" | "@_hitPolicy" + Normalized, + "@_label" | "description" | "@_typeRef" | "@_outputLabel" | "@_aggregation" | "@_hitPolicy" | "@_id" >; export function DecisionTableRootCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadonly: boolean }) { diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ExpressionRootCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ExpressionRootCell.tsx index 5aeace5c2cc..bcf99fb1dae 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ExpressionRootCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/ExpressionRootCell.tsx @@ -27,7 +27,7 @@ import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/Clipboa import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { useDmnEditorStore } from "../../store/StoreContext"; -type ExpressionRoot = Pick; +type ExpressionRoot = Pick; export function ExpressionRootCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadonly: boolean }) { const selectedObjectId = useDmnEditorStore((s) => s.boxedExpressionEditor.selectedObjectId); diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/Fields.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/Fields.tsx index f38004f7f21..46dc505c15a 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/Fields.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/Fields.tsx @@ -91,7 +91,7 @@ export function NameField(props: { export function TypeRefField(props: { alternativeFieldName?: string; - typeRef: string; + typeRef?: string; isReadonly: boolean; dmnEditorRootElementRef: React.RefObject; onChange?: (newTypeRef: string) => void; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx index f1c66238126..f5c3a2d3ecc 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionParametersCell.tsx @@ -21,7 +21,6 @@ import * as React from "react"; import { useCallback, useMemo, useState } from "react"; import { DescriptionField, NameField, TypeRefField } from "./Fields"; import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionIndex"; -import { DmnBuiltInDataType } from "@kie-tools/boxed-expression-component/dist/api"; import { useDmnEditor } from "../../DmnEditorContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; @@ -36,6 +35,8 @@ import { ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constrai import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContext"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; +import { Normalized } from "../../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function FunctionDefinitionParameterCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -48,9 +49,14 @@ export function FunctionDefinitionParameterCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tInformationItem[], [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized[], + [selectedObjectInfos?.cell] + ); const [isParameterExpanded, setParameterExpaded] = useState([]); const getAllUniqueNames = useCallback((s: State) => new Map(), []); @@ -96,7 +102,7 @@ export function FunctionDefinitionParameterCell(props: { onChange={(newName: string) => { updater((dmnObject) => { dmnObject.formalParameter ??= []; - dmnObject.formalParameter[i] ??= { "@_name": "" }; + dmnObject.formalParameter[i] ??= { "@_id": generateUuid(), "@_name": "" }; dmnObject.formalParameter[i]["@_name"] = newName; }); }} @@ -107,7 +113,7 @@ export function FunctionDefinitionParameterCell(props: { onTypeRefChange={(newTypeRef) => updater((dmnObject) => { dmnObject.formalParameter ??= []; - dmnObject.formalParameter[i] ??= { "@_name": "" }; + dmnObject.formalParameter[i] ??= { "@_id": generateUuid(), "@_name": "" }; dmnObject.formalParameter[i]["@_typeRef"] = newTypeRef; }) } @@ -119,7 +125,11 @@ export function FunctionDefinitionParameterCell(props: { onChange={(newDescription: string) => { updater((dmnObject) => { dmnObject.formalParameter ??= []; - dmnObject.formalParameter[i] ??= { "@_name": "", description: { __$$text: "" } }; + dmnObject.formalParameter[i] ??= { + "@_id": generateUuid(), + "@_name": "", + description: { __$$text: "" }, + }; dmnObject.formalParameter[i].description ??= { __$$text: "" }; dmnObject.formalParameter[i].description!.__$$text = newDescription; }); @@ -134,7 +144,7 @@ export function FunctionDefinitionParameterCell(props: { } function FunctionDefinitionParameterTypeRef(props: { - parameter: DMN15__tInformationItem; + parameter: Normalized; isReadonly: boolean; onTypeRefChange: (newTypeRef: string) => void; }) { @@ -156,7 +166,7 @@ function FunctionDefinitionParameterTypeRef(props: { {itemDefinition && ( diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx index b86bf3f2f69..9c8f50e509b 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/FunctionDefinitionRootCell.tsx @@ -26,8 +26,12 @@ import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/Clipboa import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; import { DMN15__tFunctionDefinition } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; import { useDmnEditorStore } from "../../store/StoreContext"; +import { Normalized } from "../../normalization/normalize"; -type FunctionDefinitionRoot = Pick; +type FunctionDefinitionRoot = Pick< + Normalized, + "@_kind" | "@_typeRef" | "description" | "@_id" +>; export function FunctionDefinitionRootCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx index 8cc221a2232..3df915f947a 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InformationItemCell.tsx @@ -30,6 +30,7 @@ import { useDmnEditor } from "../../DmnEditorContext"; import { Constraints, ConstraintsFromTypeConstraintAttribute } from "../../dataTypes/Constraints"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; import { State } from "../../store/Store"; +import { Normalized } from "../../normalization/normalize"; export function InformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -47,7 +48,10 @@ export function InformationItemCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tInformationItem, [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized, + [selectedObjectInfos?.cell] + ); const itemDefinition = useMemo(() => { const { allDataTypesById, allTopLevelItemDefinitionUniqueNames } = dmnEditorStoreApi @@ -76,7 +80,7 @@ export function InformationItemCell(props: { /> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx index 736e4f4ba4d..f9001c60852 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationFunctionCallCell.tsx @@ -24,6 +24,7 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { DMN15__tLiteralExpression } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../../normalization/normalize"; export function InvocationFunctionCallCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -35,9 +36,14 @@ export function InvocationFunctionCallCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tLiteralExpression, [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized, + [selectedObjectInfos?.cell] + ); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx index 66aeacb05a5..7d9b62c6771 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/InvocationInformationItemCell.tsx @@ -27,6 +27,7 @@ import { import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; +import { Normalized } from "../../normalization/normalize"; export function InvocationInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -47,8 +48,10 @@ export function InvocationInformationItemCell(props: { [cellPath?.root, props.boxedExpressionIndex] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); - const rootExpressionUpdater = useBoxedExpressionUpdater(rootPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); + const rootExpressionUpdater = useBoxedExpressionUpdater>(rootPath ?? []); return ( <> @@ -71,7 +74,7 @@ export function InvocationInformationItemCell(props: { }); rootExpressionUpdater((dmnObject) => { if (cellPath?.type === "invocation") { - const expression = (dmnObject as DMN15__tInvocation).binding![cellPath.row ?? 0].expression; + const expression = (dmnObject as Normalized).binding![cellPath.row ?? 0].expression; if (expression) { expression["@_typeRef"] = newTypeRef; } diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx index 2860e49cce5..0b621cc218e 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/IteratorVariableCell.tsx @@ -24,6 +24,7 @@ import { BoxedExpressionIndex } from "../../boxedExpressions/boxedExpressionInde import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { DMN15__tIterator } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types"; +import { Normalized } from "../../normalization/normalize"; export function IteratorVariableCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; isReadonly: boolean }) { const selectedObjectId = useDmnEditorStore((s) => s.boxedExpressionEditor.selectedObjectId); @@ -32,9 +33,9 @@ export function IteratorVariableCell(props: { boxedExpressionIndex?: BoxedExpres [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>(selectedObjectInfos?.expressionPath ?? []); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tIterator, [selectedObjectInfos?.cell]); + const cell = useMemo(() => selectedObjectInfos?.cell as Normalized, [selectedObjectInfos?.cell]); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx index 4dd5ba09a72..1ced038ecc9 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/LiteralExpressionContentCell.tsx @@ -26,6 +26,7 @@ import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy"; import { FormGroup } from "@patternfly/react-core/dist/js/components/Form"; +import { Normalized } from "../../normalization/normalize"; export function LiteralExpressionContentCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -37,9 +38,14 @@ export function LiteralExpressionContentCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); - const cell = useMemo(() => selectedObjectInfos?.cell as DMN15__tLiteralExpression, [selectedObjectInfos?.cell]); + const cell = useMemo( + () => selectedObjectInfos?.cell as Normalized, + [selectedObjectInfos?.cell] + ); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx index de835fb77d9..3eecf1da257 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/RelationInformationItemCell.tsx @@ -24,6 +24,7 @@ import { DMN15__tInformationItem } from "@kie-tools/dmn-marshaller/dist/schemas/ import { useDmnEditorStore } from "../../store/StoreContext"; import { useBoxedExpressionUpdater } from "./useBoxedExpressionUpdater"; import { InformationItemCell } from "./InformationItemCell"; +import { Normalized } from "../../normalization/normalize"; export function RelationInformationItemCell(props: { boxedExpressionIndex?: BoxedExpressionIndex; @@ -35,7 +36,9 @@ export function RelationInformationItemCell(props: { [props.boxedExpressionIndex, selectedObjectId] ); - const updater = useBoxedExpressionUpdater(selectedObjectInfos?.expressionPath ?? []); + const updater = useBoxedExpressionUpdater>( + selectedObjectInfos?.expressionPath ?? [] + ); return ( <> diff --git a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts index bd12efde335..1b4ab772cba 100644 --- a/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts +++ b/packages/dmn-editor/src/propertiesPanel/BoxedExpressionPropertiesPanelComponents/useBoxedExpressionUpdater.ts @@ -27,6 +27,7 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from "../../store/StoreContex import { buildXmlHref } from "../../xml/xmlHrefs"; import { AllExpressionsWithoutTypes } from "../../dataTypes/DataTypeSpec"; import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../../normalization/normalize"; export function useBoxedExpressionUpdater( expressionPath: ExpressionPath[] | undefined @@ -49,15 +50,19 @@ export function useBoxedExpressionUpdater( if (state.dmn.model.definitions.drgElement?.[node?.data.index ?? 0]?.__$$element === "businessKnowledgeModel") { const dmnObject = getDmnObjectByPath( expressionPath ?? [], - (state.dmn.model.definitions.drgElement?.[node?.data.index ?? 0] as DMN15__tBusinessKnowledgeModel) - ?.encapsulatedLogic + ( + state.dmn.model.definitions.drgElement?.[ + node?.data.index ?? 0 + ] as Normalized + )?.encapsulatedLogic ); dmnObject && consumer(dmnObject as T); } if (state.dmn.model.definitions.drgElement?.[node?.data.index ?? 0]?.__$$element === "decision") { const dmnObject = getDmnObjectByPath( expressionPath ?? [], - (state.dmn.model.definitions.drgElement?.[node?.data.index ?? 0] as DMN15__tDecision)?.expression + (state.dmn.model.definitions.drgElement?.[node?.data.index ?? 0] as Normalized) + ?.expression ); dmnObject && consumer(dmnObject as T); } diff --git a/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx b/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx index a51e9d40ed9..7a4fda0e62b 100644 --- a/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/DecisionProperties.tsx @@ -30,13 +30,15 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function DecisionProperties({ decision, namespace, index, }: { - decision: DMN15__tDecision; + decision: Normalized; namespace: string | undefined; index: number; }) { @@ -80,8 +82,8 @@ export function DecisionProperties({ isDisabled={isReadonly} onChange={(newTypeRef) => { setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tDecision; - drgElement.variable ??= { "@_name": decision["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": decision["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }} @@ -96,7 +98,7 @@ export function DecisionProperties({ value={decision.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecision).description = { + (state.dmn.model.definitions.drgElement![index] as Normalized).description = { __$$text: newDescription, }; }); @@ -121,7 +123,9 @@ export function DecisionProperties({ value={decision.question?.__$$text} onChange={(newQuestion) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecision).question = { __$$text: newQuestion }; + (state.dmn.model.definitions.drgElement![index] as Normalized).question = { + __$$text: newQuestion, + }; }); }} placeholder={"Enter a question..."} @@ -138,7 +142,7 @@ export function DecisionProperties({ value={decision.allowedAnswers?.__$$text} onChange={(newAllowedAnswers) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecision).allowedAnswers = { + (state.dmn.model.definitions.drgElement![index] as Normalized).allowedAnswers = { __$$text: newAllowedAnswers, }; }); @@ -154,7 +158,7 @@ export function DecisionProperties({ values={decision.extensionElements?.["kie:attachment"]} onChange={(newExtensionElements) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecision).extensionElements = { + (state.dmn.model.definitions.drgElement![index] as Normalized).extensionElements = { "kie:attachment": newExtensionElements, }; }); diff --git a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx index 803bf9cf870..76adad60526 100644 --- a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx @@ -42,10 +42,13 @@ import { useExternalModels } from "../includedModels/DmnEditorDependenciesContex import { DragAndDrop, Draggable } from "../draggable/Draggable"; import { buildFeelQNameFromNamespace } from "../feel/buildFeelQName"; import { Alert, AlertVariant } from "@patternfly/react-core/dist/js/components/Alert/Alert"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export type AllKnownDrgElementsByHref = Map< string, - ({ __$$element: "decision" } & DMN15__tDecision) | ({ __$$element: "inputData" } & DMN15__tInputData) + | ({ __$$element: "decision" } & Normalized) + | ({ __$$element: "inputData" } & Normalized) >; export function DecisionServiceProperties({ @@ -53,7 +56,7 @@ export function DecisionServiceProperties({ namespace, index, }: { - decisionService: DMN15__tDecisionService; + decisionService: Normalized; namespace: string | undefined; index: number; }) { @@ -125,8 +128,8 @@ export function DecisionServiceProperties({ isDisabled={isReadonly} onChange={(newTypeRef) => { setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tDecisionService; - drgElement.variable ??= { "@_name": decisionService["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": decisionService["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }} @@ -141,7 +144,7 @@ export function DecisionServiceProperties({ value={decisionService.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecisionService).description = { + (state.dmn.model.definitions.drgElement![index] as Normalized).description = { __$$text: newDescription, }; }); @@ -181,7 +184,7 @@ export function DecisionServiceProperties({ allDrgElementsByHref={allDrgElementsByHref} onChange={(newInputDecisions) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecisionService).inputDecision = + (state.dmn.model.definitions.drgElement![index] as Normalized).inputDecision = newInputDecisions; }); }} @@ -195,7 +198,8 @@ export function DecisionServiceProperties({ allDrgElementsByHref={allDrgElementsByHref} onChange={(newInputData) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecisionService).inputData = newInputData; + (state.dmn.model.definitions.drgElement![index] as Normalized).inputData = + newInputData; }); }} isDisabled={isReadonly} @@ -213,9 +217,10 @@ export function DecisionServiceProperties({ values={decisionService.extensionElements?.["kie:attachment"]} onChange={(newExtensionElements) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tDecisionService).extensionElements = { - "kie:attachment": newExtensionElements, - }; + (state.dmn.model.definitions.drgElement![index] as Normalized).extensionElements = + { + "kie:attachment": newExtensionElements, + }; }); }} /> @@ -229,7 +234,7 @@ export function DecisionServiceElementList({ allDrgElementsByHref, }: { decisionServiceNamespace: string | undefined; - elements: DMN15__tDecisionService["outputDecision"]; + elements: Normalized["outputDecision"]; allDrgElementsByHref: AllKnownDrgElementsByHref; }) { const thisDmnsNamespace = useDmnEditorStore((s) => s.dmn.model.definitions["@_namespace"]); @@ -282,9 +287,9 @@ export function DraggableDecisionServiceElementList({ isDisabled, }: { decisionServiceNamespace: string | undefined; - elements: DMN15__tDecisionService["outputDecision"]; + elements: Normalized["outputDecision"]; allDrgElementsByHref: AllKnownDrgElementsByHref; - onChange: (hrefs: DMN15__tDMNElementReference[] | undefined) => void; + onChange: (hrefs: Normalized[] | undefined) => void; isDisabled: boolean; }) { const thisDmnsNamespace = useDmnEditorStore((s) => s.dmn.model.definitions["@_namespace"]); @@ -310,7 +315,7 @@ export function DraggableDecisionServiceElementList({ }, []); const draggableItem = useCallback( - (element: DMN15__tDMNElementReference, index: number) => { + (element: Normalized, index: number) => { const localHref = parseXmlHref(element["@_href"]); // If the localHref has a namespace, then that's the one to use, as it can be that an external node is pointing to another external node in their perspective @@ -374,7 +379,7 @@ function DecisionServiceEquivalentFunction({ allDrgElementsByHref, decisionServiceNamespace, }: { - decisionService: DMN15__tDecisionService; + decisionService: Normalized; allDrgElementsByHref: AllKnownDrgElementsByHref; decisionServiceNamespace: string | undefined; }) { @@ -413,7 +418,10 @@ function DecisionServiceEquivalentFunction({ ); const buildFunctionArgList = useCallback( - (inputDecisions?: DMN15__tDMNElementReference[], inputData?: DMN15__tDMNElementReference[]) => { + ( + inputDecisions?: Normalized[], + inputData?: Normalized[] + ) => { const inputDecisionNodeNames = inputDecisions?.map((ide) => getNodeNameByHref(ide["@_href"])); const inputDataNodeNames = inputData?.map((ida) => getNodeNameByHref(ida["@_href"])); diff --git a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx index fabeac4a0fc..e63da7c1ffd 100644 --- a/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx +++ b/packages/dmn-editor/src/propertiesPanel/FontOptions.tsx @@ -35,6 +35,8 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { ColorPicker } from "./ColorPicker"; import { PropertiesPanelHeader } from "./PropertiesPanelHeader"; import "./FontOptions.css"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; +import { Normalized } from "../normalization/normalize"; // https://www.w3schools.com/cssref/css_websafe_fonts.php // Array of [name, family] @@ -86,7 +88,7 @@ export function FontOptions({ startExpanded, nodeIds }: { startExpanded: boolean const [isStyleSectionExpanded, setStyleSectionExpanded] = useState(startExpanded); const setShapeStyles = useCallback( - (callback: (shape: DMNDI15__DMNShape[], state: State) => void) => { + (callback: (shape: Normalized[], state: State) => void) => { dmnEditorStoreApi.setState((s) => { const { diagramElements } = addOrGetDrd({ definitions: s.dmn.model.definitions, @@ -103,7 +105,7 @@ export function FontOptions({ startExpanded, nodeIds }: { startExpanded: boolean }); for (const shape of shapes) { - shape["di:Style"] ??= { __$$element: "dmndi:DMNStyle" }; + shape["di:Style"] ??= { "@_id": generateUuid(), __$$element: "dmndi:DMNStyle" }; } callback(shapes, s); diff --git a/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx b/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx index 3e4f20bded7..5b6625120f6 100644 --- a/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/GroupProperties.tsx @@ -25,8 +25,9 @@ import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput"; import { useDmnEditorStoreApi } from "../store/StoreContext"; import { renameGroupNode } from "../mutations/renameNode"; +import { Normalized } from "../normalization/normalize"; -export function GroupProperties({ group, index }: { group: DMN15__tGroup; index: number }) { +export function GroupProperties({ group, index }: { group: Normalized; index: number }) { const { setState } = useDmnEditorStoreApi(); return ( @@ -58,7 +59,7 @@ export function GroupProperties({ group, index }: { group: DMN15__tGroup; index: value={group.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.artifact![index] as DMN15__tGroup).description = { + (state.dmn.model.definitions.artifact![index] as Normalized).description = { __$$text: newDescription, }; }); diff --git a/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx b/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx index eddba2809a6..76d36a1e611 100644 --- a/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/InputDataProperties.tsx @@ -30,13 +30,15 @@ import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useDmnEditor } from "../DmnEditorContext"; import { useResolvedTypeRef } from "../dataTypes/useResolvedTypeRef"; import { useCallback } from "react"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; export function InputDataProperties({ inputData, namespace, index, }: { - inputData: DMN15__tInputData; + inputData: Normalized; namespace: string | undefined; index: number; }) { @@ -79,8 +81,8 @@ export function InputDataProperties({ isDisabled={isReadonly} onChange={(newTypeRef) => { setState((state) => { - const drgElement = state.dmn.model.definitions.drgElement![index] as DMN15__tInputData; - drgElement.variable ??= { "@_name": inputData["@_name"] }; + const drgElement = state.dmn.model.definitions.drgElement![index] as Normalized; + drgElement.variable ??= { "@_id": generateUuid(), "@_name": inputData["@_name"] }; drgElement.variable["@_typeRef"] = newTypeRef; }); }} @@ -94,7 +96,7 @@ export function InputDataProperties({ value={inputData.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tInputData).description = { + (state.dmn.model.definitions.drgElement![index] as Normalized).description = { __$$text: newDescription, }; }); @@ -116,7 +118,7 @@ export function InputDataProperties({ values={inputData.extensionElements?.["kie:attachment"]} onChange={(newExtensionElements) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tInputData).extensionElements = { + (state.dmn.model.definitions.drgElement![index] as Normalized).extensionElements = { "kie:attachment": newExtensionElements, }; }); diff --git a/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx b/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx index 36af3c30a17..4c43b83be96 100644 --- a/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/KnowledgeSourceProperties.tsx @@ -28,13 +28,14 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from "../store/StoreContext"; import { renameDrgElement } from "../mutations/renameNode"; import { InlineFeelNameInput } from "../feel/InlineFeelNameInput"; import { useCallback } from "react"; +import { Normalized } from "../normalization/normalize"; export function KnowledgeSourceProperties({ knowledgeSource, namespace, index, }: { - knowledgeSource: DMN15__tKnowledgeSource; + knowledgeSource: Normalized; namespace: string | undefined; index: number; }) { @@ -75,7 +76,7 @@ export function KnowledgeSourceProperties({ value={knowledgeSource.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tKnowledgeSource).description = { + (state.dmn.model.definitions.drgElement![index] as Normalized).description = { __$$text: newDescription, }; }); @@ -100,7 +101,9 @@ export function KnowledgeSourceProperties({ value={knowledgeSource.type?.__$$text} onChange={(newType) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tKnowledgeSource).type = { __$$text: newType }; + (state.dmn.model.definitions.drgElement![index] as Normalized).type = { + __$$text: newType, + }; }); }} placeholder={"Enter source type..."} @@ -115,7 +118,7 @@ export function KnowledgeSourceProperties({ value={knowledgeSource["@_locationURI"]} onChange={(newLocationUri) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tKnowledgeSource)["@_locationURI"] = + (state.dmn.model.definitions.drgElement![index] as Normalized)["@_locationURI"] = newLocationUri; }); }} @@ -128,9 +131,10 @@ export function KnowledgeSourceProperties({ values={knowledgeSource.extensionElements?.["kie:attachment"]} onChange={(newExtensionElements) => { setState((state) => { - (state.dmn.model.definitions.drgElement![index] as DMN15__tKnowledgeSource).extensionElements = { - "kie:attachment": newExtensionElements, - }; + (state.dmn.model.definitions.drgElement![index] as Normalized).extensionElements = + { + "kie:attachment": newExtensionElements, + }; }); }} /> diff --git a/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx b/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx index bf3f81c8e09..e144015f510 100644 --- a/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx +++ b/packages/dmn-editor/src/propertiesPanel/ShapeOptions.tsx @@ -39,6 +39,8 @@ import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes"; import { NodeType } from "../diagram/connections/graphStructure"; import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components/Button"; import { DC__Dimension } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_2/ts-gen/types"; +import { Normalized } from "../normalization/normalize"; +import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api"; const DEFAULT_FILL_COLOR = { "@_blue": 255, "@_green": 255, "@_red": 255 }; const DEFAULT_STROKE_COLOR = { "@_blue": 0, "@_green": 0, "@_red": 0 }; @@ -202,7 +204,7 @@ export function ShapeOptions({ const setShapeStyles = useCallback( ( callback: ( - shapesWithMinNodeSize: { shape: DMNDI15__DMNShape; minNodeSize: DC__Dimension }[], + shapesWithMinNodeSize: { shape: Normalized; minNodeSize: DC__Dimension }[], state: State ) => void ) => { @@ -234,7 +236,7 @@ export function ShapeOptions({ throw new Error(`DMN Element with index ${i++} is not a DMNShape.`); } - shape["di:Style"] ??= { __$$element: "dmndi:DMNStyle" }; + shape["di:Style"] ??= { "@_id": generateUuid(), __$$element: "dmndi:DMNStyle" }; } callback(shapesWithMinNodeSize, s); @@ -318,6 +320,7 @@ export function ShapeOptions({ shapeWithNodes.forEach(({ shape, minNodeSize }) => { shape["di:Style"] ??= { __$$element: "dmndi:DMNStyle", + "@_id": generateUuid(), "dmndi:FillColor": { ...DEFAULT_FILL_COLOR }, "dmndi:StrokeColor": { ...DEFAULT_STROKE_COLOR }, }; diff --git a/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx b/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx index 5c36c900ba6..2be84cd41d7 100644 --- a/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/SingleNodeProperties.tsx @@ -50,6 +50,7 @@ import { PropertiesPanelHeader } from "./PropertiesPanelHeader"; import { UnknownProperties } from "./UnknownProperties"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; import "./SingleNodeProperties.css"; +import { Normalized } from "../normalization/normalize"; export function SingleNodeProperties({ nodeId }: { nodeId: string }) { const dmnEditorStoreApi = useDmnEditorStoreApi(); @@ -133,7 +134,7 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.inputData: return ( } namespace={node.data.dmnObjectNamespace} index={node.data.index} /> @@ -141,7 +142,7 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.decision: return ( } namespace={node.data.dmnObjectNamespace} index={node.data.index} /> @@ -149,7 +150,7 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.bkm: return ( } namespace={node.data.dmnObjectNamespace} index={node.data.index} /> @@ -157,7 +158,7 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.decisionService: return ( } namespace={node.data.dmnObjectNamespace} index={node.data.index} /> @@ -165,7 +166,7 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.knowledgeSource: return ( } namespace={node.data.dmnObjectNamespace} index={node.data.index} /> @@ -173,12 +174,17 @@ export function SingleNodeProperties({ nodeId }: { nodeId: string }) { case NODE_TYPES.textAnnotation: return ( } index={node.data.index} /> ); case NODE_TYPES.group: - return ; + return ( + } + index={node.data.index} + /> + ); case NODE_TYPES.unknown: return ; default: diff --git a/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx b/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx index 574ab6c6733..a232f87e8e7 100644 --- a/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/TextAnnotationProperties.tsx @@ -25,12 +25,13 @@ import { TextArea } from "@patternfly/react-core/dist/js/components/TextArea"; import { TextInput } from "@patternfly/react-core/dist/js/components/TextInput"; import { useDmnEditorStoreApi } from "../store/StoreContext"; import { updateTextAnnotation } from "../mutations/renameNode"; +import { Normalized } from "../normalization/normalize"; export function TextAnnotationProperties({ textAnnotation, index, }: { - textAnnotation: DMN15__tTextAnnotation; + textAnnotation: Normalized; index: number; }) { const { setState } = useDmnEditorStoreApi(); @@ -46,7 +47,8 @@ export function TextAnnotationProperties({ placeholder={"Enter a text format..."} onChange={(newTextFormat) => { setState((state) => { - (state.dmn.model.definitions.artifact![index] as DMN15__tTextAnnotation)["@_textFormat"] = newTextFormat; + (state.dmn.model.definitions.artifact![index] as Normalized)["@_textFormat"] = + newTextFormat; }); }} /> @@ -81,7 +83,7 @@ export function TextAnnotationProperties({ value={textAnnotation.description?.__$$text} onChange={(newDescription) => { setState((state) => { - (state.dmn.model.definitions.artifact![index] as DMN15__tTextAnnotation).description = { + (state.dmn.model.definitions.artifact![index] as Normalized).description = { __$$text: newDescription, }; }); diff --git a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx index a94148e4c3b..83dfedb4ab0 100644 --- a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx @@ -28,8 +28,9 @@ import { Button, ButtonVariant } from "@patternfly/react-core/dist/js/components import { useDmnEditor } from "../DmnEditorContext"; import { Divider } from "@patternfly/react-core/dist/js/components/Divider"; import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext"; +import { Normalized } from "../normalization/normalize"; -export function UnknownProperties(props: { shape: DMNDI15__DMNShape; dmnElementRefQName: XmlQName }) { +export function UnknownProperties(props: { shape: Normalized; dmnElementRefQName: XmlQName }) { const thisDmn = useDmnEditorStore((s) => s.dmn); const { externalModelsByNamespace } = useExternalModels(); const externalDmnsByNamespace = useDmnEditorStore( @@ -53,7 +54,7 @@ export function UnknownProperties(props: { shape: DMNDI15__DMNShape; dmnElementR const externalDrgElementsById = (externalDmn.model.definitions.drgElement ?? []).reduce( (acc, e, index) => acc.set(e["@_id"]!, { element: e, index }), - new Map }>() + new Map["drgElement"]> }>() ); const externalDrgElement = externalDrgElementsById.get(props.dmnElementRefQName.localPart); diff --git a/packages/dmn-editor/src/store/Store.ts b/packages/dmn-editor/src/store/Store.ts index 99ccdb6b8cd..21f04b3bf74 100644 --- a/packages/dmn-editor/src/store/Store.ts +++ b/packages/dmn-editor/src/store/Store.ts @@ -25,7 +25,7 @@ import { create } from "zustand"; import { immer } from "zustand/middleware/immer"; import { ExternalModelsIndex } from "../DmnEditor"; import { DmnDiagramNodeData } from "../diagram/nodes/Nodes"; -import { normalize } from "../normalization/normalize"; +import { Normalized, normalize } from "../normalization/normalize"; import { ComputedStateCache } from "./ComputedStateCache"; import { computeAllFeelVariableUniqueNames } from "./computed/computeAllFeelVariableUniqueNames"; import { computeDataTypes } from "./computed/computeDataTypes"; @@ -69,7 +69,7 @@ export type DropTargetNode = undefined | RF.Node; export interface State { dispatch: (s: State) => Dispatch; computed: (s: State) => Computed; - dmn: { model: DmnLatestModel }; + dmn: { model: Normalized }; focus: { consumableId: string | undefined; }; @@ -88,6 +88,9 @@ export interface State { tab: DmnEditorTab; }; diagram: { + autoLayout: { + canAutoGenerateDrd: boolean; + }; __unsafeDrdIndex: number; edgeIdBeingUpdated: string | undefined; dropTargetNode: DropTargetNode; @@ -187,6 +190,9 @@ export const defaultStaticState = (): Omit) { +export function createDmnEditorStore(model: DmnLatestModel, computedCache: ComputedStateCache) { + const { diagram, ...defaultState } = defaultStaticState(); return create( immer(() => ({ dmn: { model: normalize(model), }, - ...defaultStaticState(), + ...defaultState, + diagram: { + ...diagram, + // A model without DRD and with DRG element can be auto generated + autoLayout: { + canAutoGenerateDrd: + model.definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] === undefined && + model.definitions.drgElement !== undefined, + }, + }, dispatch(s: State) { return { dmn: { diff --git a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts index 1c579853d9f..6365fa7fb88 100644 --- a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts +++ b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts @@ -31,7 +31,7 @@ export function computeContainingDecisionServiceHrefsByDecisionHrefs({ drgElements: State["dmn"]["model"]["definitions"]["drgElement"]; }) { drgElements ??= []; - const decisionServiecHrefsByDecisionHrefs = new Map(); + const decisionServiceHrefsByDecisionHrefs = new Map(); for (const drgElement of drgElements) { const drgElementHref = buildXmlHref({ @@ -41,9 +41,9 @@ export function computeContainingDecisionServiceHrefsByDecisionHrefs({ // Decision if (drgElement.__$$element === "decision") { - decisionServiecHrefsByDecisionHrefs.set( + decisionServiceHrefsByDecisionHrefs.set( drgElementHref, - decisionServiecHrefsByDecisionHrefs.get(drgElementHref) ?? [] + decisionServiceHrefsByDecisionHrefs.get(drgElementHref) ?? [] ); } // DS @@ -55,8 +55,8 @@ export function computeContainingDecisionServiceHrefsByDecisionHrefs({ }); for (const containedDecisionHref of containedDecisionHrefsRelativeToThisDmn) { - decisionServiecHrefsByDecisionHrefs.set(containedDecisionHref, [ - ...(decisionServiecHrefsByDecisionHrefs.get(containedDecisionHref) ?? []), + decisionServiceHrefsByDecisionHrefs.set(containedDecisionHref, [ + ...(decisionServiceHrefsByDecisionHrefs.get(containedDecisionHref) ?? []), drgElementHref, ]); } @@ -65,5 +65,5 @@ export function computeContainingDecisionServiceHrefsByDecisionHrefs({ } } - return decisionServiecHrefsByDecisionHrefs; + return decisionServiceHrefsByDecisionHrefs; } diff --git a/packages/dmn-editor/src/store/computed/computeDataTypes.ts b/packages/dmn-editor/src/store/computed/computeDataTypes.ts index 1851d584e7b..baa3c388179 100644 --- a/packages/dmn-editor/src/store/computed/computeDataTypes.ts +++ b/packages/dmn-editor/src/store/computed/computeDataTypes.ts @@ -24,6 +24,7 @@ import { DataType, DataTypeIndex } from "../../dataTypes/DataTypes"; import { buildFeelQNameFromNamespace } from "../../feel/buildFeelQName"; import { TypeOrReturnType } from "../ComputedStateCache"; import { Computed, State } from "../Store"; +import { Normalized } from "../../normalization/normalize"; export function computeDataTypes( namespace: State["dmn"]["model"]["definitions"]["@_namespace"], @@ -79,7 +80,7 @@ export function computeDataTypes( } export function buildDataTypesTree( - items: DMN15__tItemDefinition[], + items: Normalized[], importsByNamespace: Map, allDataTypesById: DataTypeIndex, allTopLevelDataTypesByFeelName: DataTypeIndex, diff --git a/packages/dmn-editor/src/store/computed/computeDiagramData.ts b/packages/dmn-editor/src/store/computed/computeDiagramData.ts index a5cd4e36b93..69552fa0412 100644 --- a/packages/dmn-editor/src/store/computed/computeDiagramData.ts +++ b/packages/dmn-editor/src/store/computed/computeDiagramData.ts @@ -36,6 +36,8 @@ import { buildXmlHref, parseXmlHref } from "../../xml/xmlHrefs"; import { TypeOrReturnType } from "../ComputedStateCache"; import { Computed, State } from "../Store"; import { getDecisionServicePropertiesRelativeToThisDmn } from "../../mutations/addExistingDecisionServiceToDrd"; +import { Normalized } from "../../normalization/normalize"; +import { KIE_UNKNOWN_NAMESPACE } from "../../kie/kie"; export const NODE_LAYERS = { GROUP_NODE: 0, @@ -50,6 +52,7 @@ type AckEdge = (args: { type: EdgeType; source: string; target: string; + sourceNamespace: string | undefined; }) => RF.Edge; type AckNode = ( @@ -77,6 +80,8 @@ export function computeDiagramData( const nodesById = new Map>(); const edgesById = new Map>(); const parentIdsById = new Map(); + const externalNodesByNamespace = new Map>>(); + const edgesFromExternalNodesByNamespace = new Map>>(); const { selectedNodes, draggingNodes, resizingNodes, selectedEdges } = { selectedNodes: new Set(diagram._selectedNodes), @@ -91,7 +96,7 @@ export function computeDiagramData( const drgEdges: DrgEdge[] = []; const drgAdjacencyList: DrgAdjacencyList = new Map(); - const ackEdge: AckEdge = ({ id, type, dmnObject, source, target }) => { + const ackEdge: AckEdge = ({ id, type, dmnObject, source, target, sourceNamespace }) => { const data = { dmnObject, dmnEdge: id ? indexedDrd.dmnEdgesByDmnElementRef.get(id) : undefined, @@ -108,6 +113,13 @@ export function computeDiagramData( selected: selectedEdges.has(id), }; + if (sourceNamespace && sourceNamespace !== KIE_UNKNOWN_NAMESPACE) { + edgesFromExternalNodesByNamespace.set(sourceNamespace, [ + ...(edgesFromExternalNodesByNamespace.get(sourceNamespace) ?? []), + edge, + ]); + } + edgesById.set(edge.id, edge); if (edge.selected) { selectedEdgesById.set(edge.id, edge); @@ -148,6 +160,7 @@ export function computeDiagramData( type: EDGE_TYPES.association, source: dmnObject.sourceRef?.["@_href"], target: dmnObject.targetRef?.["@_href"], + sourceNamespace: undefined, // association are always from the current namespace }); }); @@ -223,6 +236,13 @@ export function computeDiagramData( } } + if (dmnObjectNamespace && dmnObjectNamespace !== KIE_UNKNOWN_NAMESPACE) { + externalNodesByNamespace.set(dmnObjectNamespace, [ + ...(externalNodesByNamespace.get(dmnObjectNamespace) ?? []), + newNode, + ]); + } + nodesById.set(newNode.id, newNode); if (newNode.selected) { selectedNodesById.set(newNode.id, newNode); @@ -260,11 +280,11 @@ export function computeDiagramData( namespace, (externalDmn.model.definitions.drgElement ?? []).reduce( (acc, e, index) => acc.set(e["@_id"]!, { element: e, index }), - new Map }>() + new Map["drgElement"]> }>() ) ); }, - new Map }>>() + new Map["drgElement"]> }>>() ); const externalNodes = [...indexedDrd.dmnShapesByHref.entries()].flatMap(([href, shape]) => { @@ -359,6 +379,8 @@ export function computeDiagramData( nodes: sortedNodes, edges: sortedEdges, edgesById, + externalNodesByNamespace, + edgesFromExternalNodesByNamespace, nodesById, selectedNodeTypes, selectedNodesById, @@ -370,7 +392,7 @@ export function computeDiagramData( function ackRequirementEdges( thisDmnsNamespace: string, drgElementsNamespace: string, - drgElements: DMN15__tDefinitions["drgElement"], + drgElements: Normalized["drgElement"], ackEdge: AckEdge ) { const namespace = drgElementsNamespace === thisDmnsNamespace ? "" : drgElementsNamespace; @@ -392,6 +414,7 @@ function ackRequirementEdges( type: EDGE_TYPES.informationRequirement, source: buildXmlHref({ namespace: irHref.namespace ?? namespace, id: irHref.id }), target: buildXmlHref({ namespace, id: dmnObject["@_id"]! }), + sourceNamespace: irHref.namespace ?? namespace, }); }); } @@ -411,6 +434,7 @@ function ackRequirementEdges( type: EDGE_TYPES.knowledgeRequirement, source: buildXmlHref({ namespace: krHref.namespace ?? namespace, id: krHref.id }), target: buildXmlHref({ namespace, id: dmnObject["@_id"]! }), + sourceNamespace: krHref.namespace ?? namespace, }); }); } @@ -434,6 +458,7 @@ function ackRequirementEdges( type: EDGE_TYPES.authorityRequirement, source: buildXmlHref({ namespace: arHref.namespace ?? namespace, id: arHref.id }), target: buildXmlHref({ namespace, id: dmnObject["@_id"]! }), + sourceNamespace: arHref.namespace ?? namespace, }); }); } diff --git a/packages/dmn-editor/src/store/computed/computeIndexes.ts b/packages/dmn-editor/src/store/computed/computeIndexes.ts index 56ac9bac6fd..de381e762ce 100644 --- a/packages/dmn-editor/src/store/computed/computeIndexes.ts +++ b/packages/dmn-editor/src/store/computed/computeIndexes.ts @@ -22,14 +22,18 @@ import { XmlQName, parseXmlQName } from "@kie-tools/xml-parser-ts/dist/qNames"; import { KIE_DMN_UNKNOWN_NAMESPACE } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec"; import { buildXmlHref } from "../../xml/xmlHrefs"; import { Computed, State } from "../Store"; +import { Normalized } from "../../normalization/normalize"; export function computeIndexedDrd( thisDmnsNamespace: string, definitions: State["dmn"]["model"]["definitions"], drdIndex: ReturnType ) { - const dmnEdgesByDmnElementRef = new Map(); - const dmnShapesByHref = new Map(); + const dmnEdgesByDmnElementRef = new Map & { index: number }>(); + const dmnShapesByHref = new Map< + string, + Normalized & { index: number; dmnElementRefQName: XmlQName } + >(); const hrefsOfDmnElementRefsOfShapesPointingToExternalDmnObjects = new Set(); const diagramElements = diff --git a/packages/dmn-editor/src/xml/xmlHrefs.ts b/packages/dmn-editor/src/xml/xmlHrefs.ts index 2419b86a930..4fa05444828 100644 --- a/packages/dmn-editor/src/xml/xmlHrefs.ts +++ b/packages/dmn-editor/src/xml/xmlHrefs.ts @@ -39,3 +39,24 @@ export function parseXmlHref(href: string): XmlHref { return { namespace: split[0] ? split[0] : undefined, id: split[1] }; } + +/** + * This function adds a `namespace` to an HREF. This operation will only succed if + * the provided HREF doesn't have a `namespace`. + * + * In case the provided `namespace` is `undefined`, this function will return the HREF. + * + * In case the provided HREF already have an `namespace`, this function will return the HREF. + */ +export function addNamespaceToHref({ href, namespace }: { href: string; namespace: string | undefined }) { + if (namespace === undefined) { + return href; + } + + const { namespace: hrefNamespace, id } = parseXmlHref(href); + if (hrefNamespace !== undefined) { + return href; + } + + return buildXmlHref({ namespace, id }); +} diff --git a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx index ce39e136bb0..262231b2523 100644 --- a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx +++ b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx @@ -24,12 +24,14 @@ import "@patternfly/react-core/dist/styles/base.css"; import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex"; import { Page, PageSection } from "@patternfly/react-core/dist/js/components/Page"; import { DmnLatestModel, getMarshaller, DmnMarshaller } from "@kie-tools/dmn-marshaller"; +import { Normalized, normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize"; import { availableModelsByPath, modelsByNamespace } from "./availableModelsToInclude"; import { generateEmptyDmn15 } from "../misc/empty/Empty.stories"; import { loanPreQualificationDmn } from "../useCases/loanPreQualification/LoanPreQualification.stories"; import { DmnEditorWrapper } from "../dmnEditorStoriesWrapper"; import { DmnEditorProps, + DmnEditorRef, ExternalModelsIndex, OnDmnModelChange, OnRequestExternalModelByPath, @@ -39,12 +41,40 @@ import { const initialModel = generateEmptyDmn15(); +const emptyDrd = ` + + + + + + + + + + + + + + + + + + + + + +`; + function DevWebApp(args: DmnEditorProps) { - const [state, setState] = useState<{ marshaller: DmnMarshaller; stack: DmnLatestModel[]; pointer: number }>(() => { + const [state, setState] = useState<{ + marshaller: DmnMarshaller; + stack: Normalized[]; + pointer: number; + }>(() => { const initialDmnMarshaller = getMarshaller(initialModel, { upgradeTo: "latest" }); return { marshaller: initialDmnMarshaller, - stack: [initialDmnMarshaller.parser.parse()], + stack: [normalize(initialDmnMarshaller.parser.parse())], pointer: 0, }; }); @@ -61,7 +91,7 @@ function DevWebApp(args: DmnEditorProps) { const reader = new FileReader(); reader.addEventListener("load", ({ target }) => { const marshaller = getMarshaller(target?.result as string, { upgradeTo: "latest" }); - setState({ marshaller, stack: [marshaller.parser.parse()], pointer: 0 }); + setState({ marshaller, stack: [normalize(marshaller.parser.parse())], pointer: 0 }); }); reader.readAsText(item.getAsFile() as any); } @@ -77,7 +107,7 @@ function DevWebApp(args: DmnEditorProps) { const marshaller = getMarshaller(generateEmptyDmn15(), { upgradeTo: "latest" }); setState({ marshaller, - stack: [marshaller.parser.parse()], + stack: [normalize(marshaller.parser.parse())], pointer: 0, }); }, []); @@ -119,7 +149,7 @@ function DevWebApp(args: DmnEditorProps) { const onSelectModel = useCallback( (newModel) => { - onModelChange(getMarshaller(newModel, { upgradeTo: "latest" }).parser.parse()); + onModelChange(normalize(getMarshaller(newModel, { upgradeTo: "latest" }).parser.parse())); }, [onModelChange] ); @@ -163,6 +193,8 @@ function DevWebApp(args: DmnEditorProps) {     +     +     |    
{selectedNode && ( diff --git a/packages/runtime-tools-process-enveloped-components/src/processDetails/envelope/components/ProcessDetailsTimelinePanel/ProcessDetailsTimelinePanel.tsx b/packages/runtime-tools-process-enveloped-components/src/processDetails/envelope/components/ProcessDetailsTimelinePanel/ProcessDetailsTimelinePanel.tsx index dd3f11b6ba3..e733ff3364e 100755 --- a/packages/runtime-tools-process-enveloped-components/src/processDetails/envelope/components/ProcessDetailsTimelinePanel/ProcessDetailsTimelinePanel.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/processDetails/envelope/components/ProcessDetailsTimelinePanel/ProcessDetailsTimelinePanel.tsx @@ -124,7 +124,12 @@ const ProcessDetailsTimelinePanel: React.FC = ({ setSelectedJob(job); }; - const handleJobReschedule = async (repeatInterval, repeatLimit, scheduleDate): Promise => { + const handleJobReschedule = async ( + _job: Job, + repeatInterval: string | number, + repeatLimit: string | number, + scheduleDate: Date + ): Promise => { await handleJobRescheduleUtil( repeatInterval, repeatLimit, diff --git a/packages/runtime-tools-process-enveloped-components/src/processDetails/utils/Utils.tsx b/packages/runtime-tools-process-enveloped-components/src/processDetails/utils/Utils.tsx index 582867afd95..39260ab6250 100644 --- a/packages/runtime-tools-process-enveloped-components/src/processDetails/utils/Utils.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/processDetails/utils/Utils.tsx @@ -132,7 +132,7 @@ export const handleNodeInstanceCancel = ( export const jobCancel = async ( drive: ProcessDetailsDriver, - job: Pick, + job: Job, setModalTitle: (title: JSX.Element) => void, setModalContent: (content: string) => void ) => { @@ -142,9 +142,9 @@ export const jobCancel = async ( }; export const handleJobRescheduleUtil = async ( - repeatInterval, - repeatLimit, - scheduleDate, + repeatInterval: string | number, + repeatLimit: string | number, + scheduleDate: Date, selectedJob: Job, handleRescheduleAction: () => void, driver: ProcessDetailsDriver, @@ -154,7 +154,6 @@ export const handleJobRescheduleUtil = async ( if (response && response.modalTitle === "success") { handleRescheduleAction(); } else if (response && response.modalTitle === "failure") { - handleRescheduleAction(); setRescheduleError(response.modalContent); } }; diff --git a/packages/runtime-tools-process-gateway-api/README.md b/packages/runtime-tools-process-gateway-api/README.md new file mode 100644 index 00000000000..97fdeb7e902 --- /dev/null +++ b/packages/runtime-tools-process-gateway-api/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-process-gateway-api + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-process-gateway-api/codegen.config.ts b/packages/runtime-tools-process-gateway-api/codegen.config.ts new file mode 100644 index 00000000000..2525a9efa93 --- /dev/null +++ b/packages/runtime-tools-process-gateway-api/codegen.config.ts @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CodegenConfig } from "@graphql-codegen/cli"; +import { env } from "./env"; + +const gatewayApiEnv: any = env; + +const config: CodegenConfig = { + overwrite: true, + schema: gatewayApiEnv.runtimeToolsProcessGatewayApi.graphqlCodegen.dataIndexUrl, + documents: ["src/graphql/queries.tsx"], + emitLegacyCommonJSImports: false, + generates: { + "./src/graphql/types.tsx": { + plugins: [ + { + add: { + content: ["/* eslint-disable */"], + }, + }, + { + add: { + content: ["", "export namespace GraphQL {"], + }, + }, + { + add: { + placement: "append", + content: "}", + }, + }, + "typescript", + "typescript-operations", + "typescript-react-apollo", + ], + config: { + withHOC: false, + withHooks: true, + withComponent: false, + apolloReactHooksImportFrom: "@apollo/react-hooks", + apolloReactCommonImportFrom: "@apollo/react-common", + gqlImport: "graphql-tag", + }, + }, + "./src/graphql/graphql.schema.json": { + plugins: ["introspection"], + }, + }, +}; + +export default config; diff --git a/packages/runtime-tools-process-gateway-api/env/index.js b/packages/runtime-tools-process-gateway-api/env/index.js index 61bc742bd66..8d232356ba2 100644 --- a/packages/runtime-tools-process-gateway-api/env/index.js +++ b/packages/runtime-tools-process-gateway-api/env/index.js @@ -17,11 +17,27 @@ * under the License. */ -const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); +const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); module.exports = composeEnv([require("@kie-tools/root-env/env")], { - vars: varsWithName({}), + vars: varsWithName({ + RUNTIME_TOOLS_PROCESS_GATEWAY_API_graphqlCodegenEnabled: { + default: true, + description: "Enable the Grapqhl Codegen schema updates", + }, + RUNTIME_TOOLS_PROCESS_GATEWAY_API_graphqlCodegenDataIndexUrl: { + default: "http://localhost:8180/graphql", + description: "URL for the Data Index service", + }, + }), get env() { - return {}; + return { + runtimeToolsProcessGatewayApi: { + graphqlCodegen: { + enabled: getOrDefault(this.vars.RUNTIME_TOOLS_PROCESS_GATEWAY_API_graphqlCodegenEnabled), + dataIndexUrl: getOrDefault(this.vars.RUNTIME_TOOLS_PROCESS_GATEWAY_API_graphqlCodegenDataIndexUrl), + }, + }, + }; }, }); diff --git a/packages/runtime-tools-process-gateway-api/package.json b/packages/runtime-tools-process-gateway-api/package.json index 0220fa85655..97e213a12fc 100644 --- a/packages/runtime-tools-process-gateway-api/package.json +++ b/packages/runtime-tools-process-gateway-api/package.json @@ -20,6 +20,7 @@ "scripts": { "build:dev": "rimraf dist && tsc -p tsconfig.json", "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", + "graphql:codegen": "run-script-if --bool \"$(build-env runtimeToolsProcessGatewayApi.graphqlCodegen.enabled)\" --then \"graphql-codegen --config codegen.config.ts\"", "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" }, @@ -27,7 +28,7 @@ "@apidevtools/swagger-parser": "^10.1.0", "@kie-tools/runtime-tools-shared-gateway-api": "workspace:*", "apollo-client": "2.6.10", - "axios": "^1.6.4", + "axios": "^1.6.8", "gql-query-builder": "3.1.3", "graphql": "14.3.1", "graphql-tag": "2.0.0", diff --git a/packages/runtime-tools-process-gateway-api/src/gatewayApi/QueryUtils.ts b/packages/runtime-tools-process-gateway-api/src/gatewayApi/QueryUtils.ts index 0390652f042..b6a681b66b8 100644 --- a/packages/runtime-tools-process-gateway-api/src/gatewayApi/QueryUtils.ts +++ b/packages/runtime-tools-process-gateway-api/src/gatewayApi/QueryUtils.ts @@ -17,7 +17,7 @@ * under the License. */ -import { ProcessDefinition, ProcessInstanceFilter } from "../types"; +import { ProcessInstanceFilter } from "../types"; const formatSearchWords = (searchWords: string[]) => { const tempSearchWordsArray: any[] = []; diff --git a/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx b/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx index 1c072885319..17c52c84882 100644 --- a/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx +++ b/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx @@ -19,7 +19,7 @@ import { GraphQL } from "../graphql"; import { - JobCancel, + JobOperationResult, JobStatus, Job, JobsSortBy, @@ -92,44 +92,38 @@ export const getChildProcessInstances = async ( //Rest Api to Cancel multiple Jobs export const performMultipleCancel = async ( - jobsToBeActioned: (GraphQL.Job & { errorMessage?: string })[], + jobsToBeActioned: (Job & { errorMessage?: string })[], client: ApolloClient ): Promise => { - const multipleCancel: Promise[] = []; - for (const job of jobsToBeActioned) { - multipleCancel.push( - new Promise((resolve, reject) => { - client - .mutate({ - mutation: GraphQL.JobCancelDocument, - variables: { - jobId: job.id, - }, - fetchPolicy: "no-cache", - }) - .then((value) => { - resolve({ successJob: job }); - }) - .catch((reason) => { - job.errorMessage = JSON.stringify(reason.message); - reject({ failedJob: job }); - }); - }) - ); - } + const multipleCancel: Promise[] = jobsToBeActioned.map((job) => { + return new Promise((resolve, reject) => { + client + .mutate({ + mutation: GraphQL.JobCancelDocument, + variables: { + jobId: job.id, + }, + fetchPolicy: "no-cache", + }) + .then((value) => { + resolve({ successJob: job }); + }) + .catch((reason) => { + job.errorMessage = JSON.stringify(reason.message); + reject({ failedJob: job }); + }); + }); + }); return Promise.all(multipleCancel.map((mc) => mc.catch((error) => error))).then((result) => { return Promise.resolve(result); }); }; //Rest Api to Cancel a Job -export const jobCancel = async ( - job: Pick, - client: ApolloClient -): Promise => { +export const jobCancel = async (job: Job, client: ApolloClient): Promise => { let modalTitle: string; let modalContent: string; - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { client .mutate({ mutation: GraphQL.JobCancelDocument, @@ -174,7 +168,7 @@ export const handleJobReschedule = async ( }; } - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { client .mutate({ mutation: GraphQL.HandleJobRescheduleDocument, @@ -305,7 +299,7 @@ export const handleNodeTrigger = async ( mutation: GraphQL.HandleNodeTriggerDocument, variables: { processId: processInstance.id, - nodeId: node.nodeDefinitionId, + nodeId: node.id, }, fetchPolicy: "no-cache", }) @@ -442,14 +436,14 @@ export const getTriggerableNodes = async ( ): Promise => { return client .query({ - query: GraphQL.GetProcessInstanceNodeDefinitionsDocument, + query: GraphQL.GetProcessDefinitionNodesDocument, variables: { - processId: processInstance.id, + processId: processInstance.processId, }, fetchPolicy: "no-cache", }) .then((value) => { - return value.data.ProcessInstances[0].nodeDefinitions; + return value.data.ProcessDefinitions[0].nodes; }) .catch((reason) => { return reason; @@ -517,39 +511,28 @@ export const saveFormContent = (formName: string, content: FormContent): Promise }); }; -export const createProcessDefinitionList = (processDefinitionObjs: any, url: string): ProcessDefinition[] => { - const processDefinitionList: ProcessDefinition[] = []; - processDefinitionObjs.forEach((processDefObj: any) => { - const processName = Object.keys(processDefObj)[0].split("/")[1]; - const endpoint = `${url}/${processName}`; - processDefinitionList.push({ - processName, - endpoint, - }); - }); - return processDefinitionList; -}; - -export const getProcessDefinitionList = (kogitoAppUrl: string, openApiPath: string): Promise => { - return new Promise((resolve, reject) => { - SwaggerParser.parse(`${kogitoAppUrl}/${openApiPath.replace(/^\//, "")}`) - .then((response) => { - const processDefinitionObjs: any = []; - const paths = response.paths; - const regexPattern = /^\/[^\n/]+\/schema/; - Object.getOwnPropertyNames(paths) - .filter((path) => regexPattern.test(path.toString())) - .forEach((url) => { - let processArray = url.split("/"); - processArray = processArray.filter((name) => name.length !== 0); - /* istanbul ignore else*/ - if (Object.prototype.hasOwnProperty.call(paths[`/${processArray[0]}`], "post")) { - processDefinitionObjs.push({ [url]: paths[url] }); - } - }); - resolve(createProcessDefinitionList(processDefinitionObjs, kogitoAppUrl)); - }) - .catch((err) => reject(err)); +export const getProcessDefinitions = (client: ApolloClient): Promise => { + return new Promise((resolve, reject) => { + client + .query({ + query: GraphQL.GetProcessDefinitionsDocument, + fetchPolicy: "network-only", + errorPolicy: "all", + }) + .then((value) => { + const processDefinitions = value.data.ProcessDefinitions; + resolve( + value.data.ProcessDefinitions.map((item: { id: string; endpoint: string }) => { + return { + processName: item.id, + endpoint: item.endpoint, + }; + }) + ); + }) + .catch((reason) => { + reject({ errorMessage: JSON.stringify(reason) }); + }); }); }; diff --git a/packages/runtime-tools-process-gateway-api/src/graphql/graphql.schema.json b/packages/runtime-tools-process-gateway-api/src/graphql/graphql.schema.json index e622e9b4fad..055cce17b9d 100644 --- a/packages/runtime-tools-process-gateway-api/src/graphql/graphql.schema.json +++ b/packages/runtime-tools-process-gateway-api/src/graphql/graphql.schema.json @@ -12,35 +12,50 @@ "types": [ { "kind": "OBJECT", - "name": "Attachment", + "name": "Query", "description": null, "fields": [ { - "name": "content", + "name": "Jobs", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + }, + "defaultValue": null } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Job", "ofType": null } }, @@ -48,15 +63,46 @@ "deprecationReason": null }, { - "name": "name", + "name": "ProcessDefinitions", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "ProcessDefinition", "ofType": null } }, @@ -64,15 +110,46 @@ "deprecationReason": null }, { - "name": "updatedAt", + "name": "ProcessInstances", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "OBJECT", + "name": "ProcessInstance", "ofType": null } }, @@ -80,15 +157,46 @@ "deprecationReason": null }, { - "name": "updatedBy", + "name": "UserTaskInstances", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "UserTaskInstance", "ofType": null } }, @@ -103,165 +211,193 @@ }, { "kind": "INPUT_OBJECT", - "name": "AttachmentArgument", + "name": "JobOrderBy", "description": null, "fields": null, "inputFields": [ { - "name": "id", + "name": "executionCounter", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "expirationTime", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "BooleanArgument", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "equal", + "name": "lastUpdate", "description": null, "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isNull", + "name": "priority", "description": null, "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Comment", - "description": null, - "fields": [ + "defaultValue": null + }, { - "name": "content", + "name": "processId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "retries", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "updatedAt", + "name": "rootProcessId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "updatedBy", + "name": "status", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderBy", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESC", + "description": null, "isDeprecated": false, "deprecationReason": null } ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "limit", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "offset", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "CommentArgument", + "name": "JobArgument", "description": null, "fields": null, "inputFields": [ + { + "name": "and", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "expirationTime", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, { "name": "id", "description": null, @@ -270,21 +406,125 @@ "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "not", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "or", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "priority", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "NumericArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null + }, + { + "name": "processInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "scheduledId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobStatusArgument", + "ofType": null + }, + "defaultValue": null } ], "interfaces": null, @@ -305,9 +545,7 @@ "name": "DateRange", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "equal", @@ -317,9 +555,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "greaterThan", @@ -329,9 +565,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "greaterThanEqual", @@ -341,9 +575,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "isNull", @@ -353,9 +585,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "lessThan", @@ -365,9 +595,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "lessThanEqual", @@ -377,9 +605,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -404,9 +630,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "to", @@ -420,9 +644,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -439,6 +661,16 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "The `Boolean` scalar type represents `true` or `false`.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "IdArgument", @@ -453,9 +685,7 @@ "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "in", @@ -473,9 +703,7 @@ } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "isNull", @@ -485,9 +713,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -496,8 +722,8 @@ }, { "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "name": "String", + "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "fields": null, "inputFields": null, "interfaces": null, @@ -505,212 +731,223 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "Job", + "kind": "INPUT_OBJECT", + "name": "NumericArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "callbackEndpoint", + "name": "between", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "NumericRange", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "executionCounter", + "name": "greaterThan", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "expirationTime", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "in", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } } }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "lastUpdate", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodeInstanceId", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "priority", + "name": "lessThan", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "lessThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "NumericRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "processInstanceId", + "name": "from", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "repeatInterval", + "name": "to", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "repeatLimit", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "retries", + "name": "in", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessId", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessInstanceId", + "name": "like", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "JobStatusArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "scheduledId", + "name": "equal", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "JobStatus", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "status", + "name": "in", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "ENUM", @@ -718,391 +955,312 @@ "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "ENUM", + "name": "JobStatus", "description": null, "fields": null, - "inputFields": [ + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "and", + "name": "CANCELED", "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", - "ofType": null - } - } - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "expirationTime", + "name": "ERROR", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "EXECUTED", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "RETRY", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeInstanceId", + "name": "SCHEDULED", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Job", + "description": null, + "fields": [ { - "name": "not", + "name": "callbackEndpoint", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "or", + "name": "endpoint", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "executionCounter", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "NumericArgument", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "expirationTime", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processInstanceId", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "nodeInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "scheduledId", + "name": "priority", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "status", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "JobStatusArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "JobOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "executionCounter", + "name": "processInstanceId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "expirationTime", + "name": "repeatInterval", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "repeatLimit", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "retries", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "retries", + "name": "rootProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "scheduledId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { "name": "status", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatus", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "JobStatus", + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionOrderBy", "description": null, "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "CANCELED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ERROR", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "EXECUTED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "inputFields": [ { - "name": "RETRY", + "name": "id", "description": null, - "isDeprecated": false, - "deprecationReason": null + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "SCHEDULED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "JobStatusArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", + "name": "name", "description": null, "type": { "kind": "ENUM", - "name": "JobStatus", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "in", + "name": "version", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "JobStatus", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -1110,128 +1268,86 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "KogitoMetadata", + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "lastUpdate", + "name": "and", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processInstances", + "name": "id", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstanceMeta", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "userTasks", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstanceMeta", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "KogitoMetadataArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "lastUpdate", + "name": "name", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processInstances", + "name": "not", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceMetaArgument", + "name": "ProcessDefinitionArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "userTasks", + "name": "or", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceMetaArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "KogitoMetadataOrderBy", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "lastUpdate", + "name": "version", "description": null, "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -1240,31 +1356,35 @@ }, { "kind": "OBJECT", - "name": "Milestone", + "name": "ProcessDefinition", "description": null, "fields": [ { - "name": "id", + "name": "addons", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "annotations", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "SCALAR", @@ -1276,337 +1396,273 @@ "deprecationReason": null }, { - "name": "status", + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endpoint", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "MilestoneStatus", + "kind": "SCALAR", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "MilestoneArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "id", + "name": "metadata", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "JSON", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { "name": "name", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "status", + "name": "nodes", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "MilestoneStatusArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Node", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "MilestoneStatus", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + }, { - "name": "ACTIVE", + "name": "roles", "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "AVAILABLE", + "name": "serviceUrl", "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "COMPLETED", + "name": "source", "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "MilestoneStatusArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "equal", + "name": "type", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "MilestoneStatus", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "version", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "MilestoneStatus", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "JSON", + "description": "A JSON scalar", + "fields": null, + "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Mutation", + "name": "Node", "description": null, "fields": [ { - "name": "JobCancel", + "name": "id", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "JobReschedule", + "name": "metadata", "description": null, - "args": [ - { - "name": "data", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "NodeMetadata", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceCancel", + "name": "name", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeInstanceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceRetrigger", + "name": "type", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeInstanceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceTrigger", + "name": "uniqueId", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "NodeMetadata", + "description": null, + "fields": [ { - "name": "ProcessInstanceAbort", + "name": "action", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1616,22 +1672,9 @@ "deprecationReason": null }, { - "name": "ProcessInstanceRetry", + "name": "branch", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1641,22 +1684,9 @@ "deprecationReason": null }, { - "name": "ProcessInstanceSkip", + "name": "state", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1666,625 +1696,821 @@ "deprecationReason": null }, { - "name": "ProcessInstanceUpdateVariables", + "name": "UniqueId", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "variables", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "businessKey", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentCreate", + "name": "createdBy", "description": null, - "args": [ - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uri", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentDelete", + "name": "end", "description": null, - "args": [ - { - "name": "attachmentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentUpdate", + "name": "error", "description": null, - "args": [ - { - "name": "attachmentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uri", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorOrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceCommentCreate", + "name": "lastUpdate", "description": null, - "args": [ - { - "name": "comment", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceCommentDelete", + "name": "processId", "description": null, - "args": [ - { - "name": "commentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "updatedBy", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeDefinitionId", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addons", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "and", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "businessKey", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "createdBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "end", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "endpoint", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "error", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "milestones", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "MilestoneArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodes", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "NodeInstanceArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "not", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "or", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "parentProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "roles", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "updatedBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "contains", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "containsAll", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "containsAny", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], + }, + "defaultValue": null + }, + { + "name": "isNull", + "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeDefinitionId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MilestoneArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "MilestoneStatusArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MilestoneStatusArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "equal", + "description": null, + "type": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MilestoneStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AVAILABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COMPLETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "NodeInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "definitionId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "enter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "exit", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "equal", + "description": null, + "type": { + "kind": "ENUM", + "name": "ProcessInstanceState", "ofType": null }, + "defaultValue": null + }, + { + "name": "in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProcessInstanceState", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ABORTED", + "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "UserTaskInstanceCommentUpdate", + "name": "ACTIVE", "description": null, - "args": [ - { - "name": "comment", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "commentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "UserTaskInstanceUpdate", + "name": "COMPLETED", "description": null, - "args": [ - { - "name": "actualOwner", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminGroups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "excludedUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputParams", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "priority", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUSPENDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProcessInstance", + "description": null, + "fields": [ + { + "name": "addons", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "businessKey", + "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -2292,111 +2518,77 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Node", - "description": null, - "fields": [ + }, { - "name": "id", + "name": "childProcessInstances", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "createdBy", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "definition", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessDefinition", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "diagram", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "uniqueId", + "name": "end", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "NodeInstance", - "description": null, - "fields": [ + }, { - "name": "definitionId", + "name": "endpoint", "description": null, "args": [], "type": { @@ -2412,7 +2604,19 @@ "deprecationReason": null }, { - "name": "enter", + "name": "error", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProcessInstanceError", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", "description": null, "args": [], "type": { @@ -2420,7 +2624,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null } }, @@ -2428,19 +2632,19 @@ "deprecationReason": null }, { - "name": "exit", + "name": "identity", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "lastUpdate", "description": null, "args": [], "type": { @@ -2448,7 +2652,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "DateTime", "ofType": null } }, @@ -2456,631 +2660,618 @@ "deprecationReason": null }, { - "name": "name", + "name": "milestones", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeId", + "name": "nodeDefinitions", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Node", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "nodes", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "NodeInstance", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "NodeInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "definitionId", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "enter", + "name": "parentProcessInstance", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "OBJECT", + "name": "ProcessInstance", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "exit", + "name": "parentProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "processName", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeId", + "name": "roles", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "NumericArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "between", + "name": "rootProcessInstanceId", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "NumericRange", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "equal", + "name": "serviceUrl", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "greaterThan", + "name": "source", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "greaterThanEqual", + "name": "start", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "state", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "updatedBy", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lessThan", + "name": "variables", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "JSON", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lessThanEqual", + "name": "version", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "NumericRange", + "kind": "OBJECT", + "name": "ProcessInstanceError", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "from", + "name": "message", "description": null, + "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "to", + "name": "nodeDefinitionId", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "OrderBy", + "kind": "OBJECT", + "name": "Milestone", "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + "fields": [ { - "name": "ASC", + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "DESC", + "name": "status", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "OBJECT", + "name": "NodeInstance", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "limit", + "name": "definitionId", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "offset", + "name": "enter", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exit", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstance", - "description": null, - "fields": [ + }, { - "name": "addons", + "name": "id", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "businessKey", + "name": "name", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "childProcessInstances", + "name": "nodeId", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "diagram", + "name": "type", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "actualOwner", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "end", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "description", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "error", + "name": "lastUpdate", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "ProcessInstanceError", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "name", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "priority", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "milestones", + "name": "processId", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Milestone", - "ofType": null - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodeDefinitions", + "name": "referenceName", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Node", - "ofType": null - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodes", + "name": "started", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "NodeInstance", - "ofType": null - } - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "parentProcessInstance", + "name": "state", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "ProcessInstance", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "parentProcessInstanceId", + "name": "actualOwner", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "adminGroups", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processName", + "name": "adminUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "roles", + "name": "and", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, @@ -3088,133 +3279,106 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessId", + "name": "attachments", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "AttachmentArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessInstanceId", + "name": "comments", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "CommentArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "serviceUrl", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "DateArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "source", + "name": "description", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "start", + "name": "excludedUsers", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "state", + "name": "id", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "variables", + "name": "name", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "addons", + "name": "not", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "name": "UserTaskInstanceArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "and", + "name": "or", "description": null, "type": { "kind": "LIST", @@ -3224,251 +3388,283 @@ "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", + "name": "UserTaskInstanceArgument", "ofType": null } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "businessKey", + "name": "potentialGroups", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "StringArgument", + "name": "StringArrayArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "end", + "name": "potentialUsers", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArrayArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "priority", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "error", + "name": "processId", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "processInstanceId", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "referenceName", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "milestones", + "name": "started", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "MilestoneArgument", + "name": "DateArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodes", + "name": "state", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "NodeInstanceArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttachmentArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "not", + "name": "id", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", + "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "or", + "name": "name", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "ofType": null - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CommentArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "parentProcessInstanceId", + "name": "id", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "name", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserTaskInstance", + "description": null, + "fields": [ + { + "name": "actualOwner", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "processName", + "name": "adminGroups", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "roles", + "name": "adminUsers", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "attachments", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attachment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "comments", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "start", + "name": "completed", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "description", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstanceError", - "description": null, - "fields": [ + }, { - "name": "message", + "name": "endpoint", "description": null, "args": [], "type": { @@ -3480,104 +3676,71 @@ "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "excludedUsers", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "message", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "message", + "name": "inputs", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstanceMeta", - "description": null, - "fields": [ + }, { - "name": "businessKey", + "name": "name", "description": null, "args": [], "type": { @@ -3589,67 +3752,71 @@ "deprecationReason": null }, { - "name": "end", + "name": "outputs", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "endpoint", + "name": "potentialGroups", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "potentialUsers", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "priority", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "parentProcessInstanceId", + "name": "processId", "description": null, "args": [], "type": { @@ -3661,7 +3828,7 @@ "deprecationReason": null }, { - "name": "processId", + "name": "processInstanceId", "description": null, "args": [], "type": { @@ -3677,7 +3844,7 @@ "deprecationReason": null }, { - "name": "processName", + "name": "referenceName", "description": null, "args": [], "type": { @@ -3688,26 +3855,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "roles", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "rootProcessId", "description": null, @@ -3733,9 +3880,34 @@ "deprecationReason": null }, { - "name": "serviceUrl", + "name": "schema", "description": null, - "args": [], + "args": [ + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { "kind": "SCALAR", "name": "String", @@ -3745,17 +3917,13 @@ "deprecationReason": null }, { - "name": "start", + "name": "started", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -3765,13 +3933,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -3783,525 +3947,948 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceMetaArgument", + "kind": "OBJECT", + "name": "Attachment", "description": null, - "fields": null, - "inputFields": [ - { - "name": "businessKey", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": [ { - "name": "end", + "name": "content", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "endpoint", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "name", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "parentProcessInstanceId", + "name": "updatedAt", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Comment", + "description": null, + "fields": [ { - "name": "processName", + "name": "content", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "roles", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "updatedAt", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Mutation", + "description": null, + "fields": [ { - "name": "start", + "name": "JobCancel", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "JobReschedule", "description": null, + "args": [ + { + "name": "data", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "businessKey", + "name": "NodeInstanceCancel", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "end", + "name": "NodeInstanceRetrigger", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "error", + "name": "NodeInstanceTrigger", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "ProcessInstanceAbort", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "ProcessInstanceRetry", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processName", + "name": "ProcessInstanceSkip", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "ProcessInstanceUpdateVariables", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "variables", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "start", + "name": "UserTaskInstanceAttachmentCreate", "description": null, + "args": [ + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "taskId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "uri", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "UserTaskInstanceAttachmentDelete", "description": null, + "args": [ + { + "name": "attachmentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "ProcessInstanceState", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "ABORTED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ACTIVE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "COMPLETED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ERROR", - "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "PENDING", + "name": "UserTaskInstanceAttachmentUpdate", "description": null, + "args": [ + { + "name": "attachmentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "uri", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "SUSPENDED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", + "name": "UserTaskInstanceCommentCreate", "description": null, + "args": [ + { + "name": "comment", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "taskId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "ProcessInstanceState", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "UserTaskInstanceCommentDelete", "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null + "args": [ + { + "name": "commentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ + }, { - "name": "Jobs", + "name": "UserTaskInstanceCommentUpdate", "description": null, "args": [ { - "name": "orderBy", + "name": "comment", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "JobOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "commentId", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "groups", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Job", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstances", + "name": "UserTaskInstanceUpdate", "description": null, "args": [ { - "name": "orderBy", + "name": "actualOwner", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "adminGroups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "adminUsers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "description", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "excludedUsers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "inputParams", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "potentialGroups", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "potentialUsers", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UserTaskInstances", - "description": null, - "args": [ + "defaultValue": null + }, { - "name": "orderBy", + "name": "priority", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "taskId", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "user", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4313,172 +4900,151 @@ "possibleTypes": null }, { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "OBJECT", + "name": "Subscription", "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": [ { - "name": "in", + "name": "JobAdded", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "Job", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "JobUpdated", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Job", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "like", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "contains", + "name": "ProcessInstanceAdded", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "containsAll", + "name": "ProcessInstanceUpdated", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "containsAny", + "name": "UserTaskInstanceAdded", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "UserTaskInstance", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "UserTaskInstanceUpdated", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserTaskInstance", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Subscription", - "description": null, + "name": "__Schema", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", "fields": [ { - "name": "JobAdded", - "description": null, + "name": "types", + "description": "A list of all types supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "description": "The type that query operations will be rooted at.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "Job", + "name": "__Type", "ofType": null } }, @@ -4486,63 +5052,74 @@ "deprecationReason": null }, { - "name": "JobUpdated", - "description": null, + "name": "mutationType", + "description": "If this server supports mutation, the type that mutation operations will be rooted at.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Job", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstanceAdded", - "description": null, + "name": "subscriptionType", + "description": "If this server support subscription, the type that subscription operations will be rooted at.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstanceUpdated", - "description": null, + "name": "directives", + "description": "A list of all directives supported by this server.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Directive", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields": [ { - "name": "UserTaskInstanceAdded", + "name": "kind", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", + "kind": "ENUM", + "name": "__TypeKind", "ofType": null } }, @@ -4550,34 +5127,19 @@ "deprecationReason": null }, { - "name": "UserTaskInstanceUpdated", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "UserTaskInstance", - "description": null, - "fields": [ + }, { - "name": "actualOwner", + "name": "description", "description": null, "args": [], "type": { @@ -4589,9 +5151,20 @@ "deprecationReason": null }, { - "name": "adminGroups", + "name": "fields", "description": null, - "args": [], + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], "type": { "kind": "LIST", "name": null, @@ -4599,8 +5172,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__Field", "ofType": null } } @@ -4609,7 +5182,7 @@ "deprecationReason": null }, { - "name": "adminUsers", + "name": "interfaces", "description": null, "args": [], "type": { @@ -4619,8 +5192,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__Type", "ofType": null } } @@ -4629,7 +5202,7 @@ "deprecationReason": null }, { - "name": "attachments", + "name": "possibleTypes", "description": null, "args": [], "type": { @@ -4640,7 +5213,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Attachment", + "name": "__Type", "ofType": null } } @@ -4649,7 +5222,38 @@ "deprecationReason": null }, { - "name": "comments", + "name": "enumValues", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__EnumValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", "description": null, "args": [], "type": { @@ -4660,7 +5264,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Comment", + "name": "__InputValue", "ofType": null } } @@ -4669,16 +5273,102 @@ "deprecationReason": null }, { - "name": "completed", + "name": "ofType", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "OBJECT", + "name": "__Type", "ofType": null }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "description": "An enum describing what kind of type a given `__Type` is.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "description": "Indicates this type is a scalar.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "description": "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "description": "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null }, { "name": "description", @@ -4693,39 +5383,47 @@ "deprecationReason": null }, { - "name": "endpoint", + "name": "args", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", + "name": "type", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "isDeprecated", "description": null, "args": [], "type": { @@ -4733,7 +5431,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -4741,7 +5439,7 @@ "deprecationReason": null }, { - "name": "inputs", + "name": "deprecationReason", "description": null, "args": [], "type": { @@ -4751,9 +5449,20 @@ }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields": [ { - "name": "lastUpdate", + "name": "name", "description": null, "args": [], "type": { @@ -4761,7 +5470,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null } }, @@ -4769,7 +5478,7 @@ "deprecationReason": null }, { - "name": "name", + "name": "description", "description": null, "args": [], "type": { @@ -4781,59 +5490,62 @@ "deprecationReason": null }, { - "name": "outputs", + "name": "type", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialGroups", - "description": null, + "name": "defaultValue", + "description": "A GraphQL-formatted string representing the default value for this input value.", "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields": [ { - "name": "potentialUsers", + "name": "name", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "description", "description": null, "args": [], "type": { @@ -4845,7 +5557,7 @@ "deprecationReason": null }, { - "name": "processId", + "name": "isDeprecated", "description": null, "args": [], "type": { @@ -4853,7 +5565,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -4861,7 +5573,30 @@ "deprecationReason": null }, { - "name": "processInstanceId", + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Directive", + "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields": [ + { + "name": "name", "description": null, "args": [], "type": { @@ -4877,7 +5612,7 @@ "deprecationReason": null }, { - "name": "referenceName", + "name": "description", "description": null, "args": [], "type": { @@ -4889,280 +5624,242 @@ "deprecationReason": null }, { - "name": "rootProcessId", + "name": "locations", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "args", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "schema", - "description": null, - "args": [ - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__InputValue", "ofType": null } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "description": "Location adjacent to a query operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "description": "Location adjacent to a mutation operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIPTION", + "description": "Location adjacent to a subscription operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "description": "Location adjacent to a field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "description": "Location adjacent to a fragment definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "description": "Location adjacent to a fragment spread.", + "isDeprecated": false, + "deprecationReason": null }, { - "name": "started", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } - }, + "name": "INLINE_FRAGMENT", + "description": "Location adjacent to an inline fragment.", "isDeprecated": false, "deprecationReason": null }, { - "name": "state", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, + "name": "VARIABLE_DEFINITION", + "description": "Location adjacent to a variable definition.", "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "actualOwner", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, + "name": "SCHEMA", + "description": "Location adjacent to a schema definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "adminGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "SCALAR", + "description": "Location adjacent to a scalar definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "adminUsers", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "OBJECT", + "description": "Location adjacent to an object type definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "and", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", - "ofType": null - } - } - }, - "defaultValue": null, + "name": "FIELD_DEFINITION", + "description": "Location adjacent to a field definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "attachments", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "AttachmentArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ARGUMENT_DEFINITION", + "description": "Location adjacent to an argument definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "comments", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "CommentArgument", - "ofType": null - }, - "defaultValue": null, + "name": "INTERFACE", + "description": "Location adjacent to an interface definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "completed", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, + "name": "UNION", + "description": "Location adjacent to a union definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "description", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ENUM", + "description": "Location adjacent to an enum definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ENUM_VALUE", + "description": "Location adjacent to an enum value definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "INPUT_OBJECT", + "description": "Location adjacent to an input object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "description": "Location adjacent to an input object field definition.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "BigDecimal", + "description": "An arbitrary precision signed decimal", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BigDecimalArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "between", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "IdArgument", + "name": "BigDecimalRange", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "equal", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "greaterThan", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "not", + "name": "greaterThanEqual", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "or", + "name": "in", "description": null, "type": { "kind": "LIST", @@ -5171,111 +5868,113 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "potentialUsers", + "name": "isNull", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "priority", + "name": "lessThan", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "lessThanEqual", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BigDecimalRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "processInstanceId", + "name": "from", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigDecimal", + "ofType": null + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "referenceName", + "name": "to", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigDecimal", + "ofType": null + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BooleanArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "started", + "name": "equal", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "state", + "name": "isNull", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -5283,86 +5982,64 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "UserTaskInstanceMeta", + "kind": "SCALAR", + "name": "Float", + "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). ", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FloatArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "actualOwner", + "name": "between", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "FloatRange", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "adminGroups", + "name": "equal", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "adminUsers", + "name": "greaterThan", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "attachments", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Attachment", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "comments", + "name": "in", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, @@ -5370,75 +6047,93 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Comment", + "kind": "SCALAR", + "name": "Float", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "completed", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "lessThan", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Float", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "excludedUsers", + "name": "lessThanEqual", "description": null, - "args": [], "type": { - "kind": "LIST", + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FloatRange", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "from", + "description": null, + "type": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "to", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Float", "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "KogitoMetadata", + "description": null, + "fields": [ { "name": "lastUpdate", "description": null, @@ -5456,87 +6151,62 @@ "deprecationReason": null }, { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", + "name": "processInstances", "description": null, "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessInstanceMeta", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialUsers", + "name": "userTasks", "description": null, "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "UserTaskInstanceMeta", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProcessInstanceMeta", + "description": null, + "fields": [ { - "name": "priority", + "name": "businessKey", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processInstanceId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "createdBy", "description": null, "args": [], "type": { @@ -5548,23 +6218,19 @@ "deprecationReason": null }, { - "name": "started", + "name": "end", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "endpoint", "description": null, "args": [], "type": { @@ -5578,342 +6244,340 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceMetaArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "actualOwner", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "adminUsers", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "completed", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "parentProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "processName", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "roles", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialGroups", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialUsers", + "name": "rootProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "serviceUrl", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processInstanceId", + "name": "start", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "state", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "started", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "version", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceOrderBy", + "kind": "OBJECT", + "name": "UserTaskInstanceMeta", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { "name": "actualOwner", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "completed", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "adminGroups", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "adminUsers", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "attachments", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attachment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "comments", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "completed", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "description", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "started", + "name": "excludedUsers", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", + "name": "id", "description": null, "args": [], "type": { @@ -5929,51 +6593,47 @@ "deprecationReason": null }, { - "name": "description", + "name": "lastUpdate", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "isRepeatable", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "locations", + "name": "potentialGroups", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } } }, @@ -5981,180 +6641,39 @@ "deprecationReason": null }, { - "name": "args", + "name": "potentialUsers", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", + "name": "processInstanceId", "description": null, "args": [], "type": { @@ -6170,7 +6689,7 @@ "deprecationReason": null }, { - "name": "description", + "name": "referenceName", "description": null, "args": [], "type": { @@ -6182,7 +6701,7 @@ "deprecationReason": null }, { - "name": "isDeprecated", + "name": "started", "description": null, "args": [], "type": { @@ -6190,7 +6709,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "DateTime", "ofType": null } }, @@ -6198,13 +6717,17 @@ "deprecationReason": null }, { - "name": "deprecationReason", + "name": "state", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -6216,405 +6739,438 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ + "kind": "INPUT_OBJECT", + "name": "KogitoMetadataArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "name", + "name": "lastUpdate", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "processInstances", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceMetaArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "args", + "name": "userTasks", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceMetaArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceMetaArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "businessKey", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "createdBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "end", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "endpoint", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "parentProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "roles", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "ofType": null + }, + "defaultValue": null }, { - "name": "type", + "name": "updatedBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceMetaArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "actualOwner", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isDeprecated", + "name": "adminGroups", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "deprecationReason", + "name": "adminUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ + "defaultValue": null + }, { - "name": "name", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "description", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "type", + "name": "excludedUsers", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], + "name": "id", + "description": null, "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "IdArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isDeprecated", + "name": "name", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "deprecationReason", + "name": "potentialGroups", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ + "defaultValue": null + }, { - "name": "description", + "name": "potentialUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], + "name": "priority", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], + "name": "processInstanceId", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], + "name": "referenceName", + "description": null, "type": { - "kind": "OBJECT", - "name": "__Type", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], + "name": "started", + "description": null, "type": { - "kind": "OBJECT", - "name": "__Type", + "kind": "INPUT_OBJECT", + "name": "DateArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], + "name": "state", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "KogitoMetadataOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Long", + "description": "A 64-bit signed integer", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ + "kind": "INPUT_OBJECT", + "name": "LongArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "kind", + "name": "between", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "LongRange", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "greaterThan", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "specifiedByUrl", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "fields", + "name": "in", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { "kind": "LIST", "name": null, @@ -6622,224 +7178,110 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "__Field", + "kind": "SCALAR", + "name": "Long", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "interfaces", + "name": "isNull", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "possibleTypes", + "name": "lessThan", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "enumValues", + "name": "lessThanEqual", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "LongRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "inputFields", + "name": "from", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } + "kind": "SCALAR", + "name": "Long", + "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "ofType", + "name": "to", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], + "enumValues": null, "possibleTypes": null } ], "directives": [ { "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "isRepeatable": false, + "description": "Marks the field, argument, input field or enum value as deprecated", "locations": ["ARGUMENT_DEFINITION", "ENUM_VALUE", "FIELD_DEFINITION", "INPUT_FIELD_DEFINITION"], "args": [ { "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + "description": "The reason for the deprecation", "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": "\"No longer supported\"", - "isDeprecated": false, - "deprecationReason": null + "defaultValue": "\"No longer supported\"" } ] }, { "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "isRepeatable": false, + "description": "Directs the executor to include this field or fragment only when the `if` argument is true", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { @@ -6854,16 +7296,13 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] }, { "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "isRepeatable": false, "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { @@ -6878,16 +7317,13 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] }, { "name": "specifiedBy", "description": "Exposes a URL that specifies the behaviour of this scalar.", - "isRepeatable": false, "locations": ["SCALAR"], "args": [ { @@ -6902,9 +7338,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] } diff --git a/packages/runtime-tools-process-gateway-api/src/graphql/queries.tsx b/packages/runtime-tools-process-gateway-api/src/graphql/queries.tsx index 7ee7dd26891..cae532f1b52 100644 --- a/packages/runtime-tools-process-gateway-api/src/graphql/queries.tsx +++ b/packages/runtime-tools-process-gateway-api/src/graphql/queries.tsx @@ -400,15 +400,13 @@ export const GET_PROCESS_INSTANCE_SVG = gql` } `; -export const GET_PROCESS_INSTANCE_NODES = gql` - query getProcessInstanceNodeDefinitions($processId: String) { - ProcessInstances(where: { id: { equal: $processId } }) { - nodeDefinitions { +export const GET_PROCESS_DEFINITION_NODES = gql` + query getProcessDefinitionNodes($processId: String) { + ProcessDefinitions(where: { id: { equal: $processId } }) { + nodes { id name type - uniqueId - nodeDefinitionId } } } diff --git a/packages/runtime-tools-process-gateway-api/src/graphql/types.tsx b/packages/runtime-tools-process-gateway-api/src/graphql/types.tsx index 95548dac4ed..609a31320fa 100644 --- a/packages/runtime-tools-process-gateway-api/src/graphql/types.tsx +++ b/packages/runtime-tools-process-gateway-api/src/graphql/types.tsx @@ -21,20 +21,13 @@ import gql from "graphql-tag"; import * as ApolloReactCommon from "@apollo/react-common"; import * as ApolloReactHooks from "@apollo/react-hooks"; - export namespace GraphQL { export type Maybe = T | null; export type InputMaybe = Maybe; - export type Exact = { - [K in keyof T]: T[K]; - }; - export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; - }; - export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; - }; - const defaultOptions = {}; + export type Exact = { [K in keyof T]: T[K] }; + export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; + export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; + const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; @@ -42,40 +35,80 @@ export namespace GraphQL { Boolean: boolean; Int: number; Float: number; - /** An ISO-8601 compliant DateTime Scalar */ DateTime: any; + JSON: any; + BigDecimal: any; + Long: any; }; - export type Attachment = { - __typename?: "Attachment"; - content: Scalars["String"]; - id: Scalars["String"]; - name: Scalars["String"]; - updatedAt: Scalars["DateTime"]; - updatedBy: Scalars["String"]; + export type Query = { + __typename?: "Query"; + Jobs?: Maybe>>; + ProcessDefinitions?: Maybe>>; + ProcessInstances?: Maybe>>; + UserTaskInstances?: Maybe>>; }; - export type AttachmentArgument = { - id?: InputMaybe; - name?: InputMaybe; + export type QueryJobsArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type BooleanArgument = { - equal?: InputMaybe; - isNull?: InputMaybe; + export type QueryProcessDefinitionsArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type Comment = { - __typename?: "Comment"; - content: Scalars["String"]; - id: Scalars["String"]; - updatedAt: Scalars["DateTime"]; - updatedBy: Scalars["String"]; + export type QueryProcessInstancesArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type CommentArgument = { + export type QueryUserTaskInstancesArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; + }; + + export type JobOrderBy = { + executionCounter?: InputMaybe; + expirationTime?: InputMaybe; + lastUpdate?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + retries?: InputMaybe; + rootProcessId?: InputMaybe; + status?: InputMaybe; + }; + + export enum OrderBy { + Asc = "ASC", + Desc = "DESC", + } + + export type Pagination = { + limit?: InputMaybe; + offset?: InputMaybe; + }; + + export type JobArgument = { + and?: InputMaybe>; + expirationTime?: InputMaybe; id?: InputMaybe; - name?: InputMaybe; + lastUpdate?: InputMaybe; + nodeInstanceId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + priority?: InputMaybe; + processId?: InputMaybe; + processInstanceId?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + scheduledId?: InputMaybe; + status?: InputMaybe; }; export type DateArgument = { @@ -99,6 +132,42 @@ export namespace GraphQL { isNull?: InputMaybe; }; + export type NumericArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type NumericRange = { + from: Scalars["Int"]; + to: Scalars["Int"]; + }; + + export type StringArgument = { + equal?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + like?: InputMaybe; + }; + + export type JobStatusArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + + export enum JobStatus { + Canceled = "CANCELED", + Error = "ERROR", + Executed = "EXECUTED", + Retry = "RETRY", + Scheduled = "SCHEDULED", + } + export type Job = { __typename?: "Job"; callbackEndpoint?: Maybe; @@ -120,69 +189,109 @@ export namespace GraphQL { status: JobStatus; }; - export type JobArgument = { - and?: InputMaybe>; - expirationTime?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - nodeInstanceId?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - priority?: InputMaybe; - processId?: InputMaybe; - processInstanceId?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - scheduledId?: InputMaybe; - status?: InputMaybe; + export type ProcessDefinitionOrderBy = { + id?: InputMaybe; + name?: InputMaybe; + version?: InputMaybe; }; - export type JobOrderBy = { - executionCounter?: InputMaybe; - expirationTime?: InputMaybe; - lastUpdate?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - retries?: InputMaybe; - rootProcessId?: InputMaybe; - status?: InputMaybe; + export type ProcessDefinitionArgument = { + and?: InputMaybe>; + id?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + version?: InputMaybe; }; - export enum JobStatus { - Canceled = "CANCELED", - Error = "ERROR", - Executed = "EXECUTED", - Retry = "RETRY", - Scheduled = "SCHEDULED", - } + export type ProcessDefinition = { + __typename?: "ProcessDefinition"; + addons?: Maybe>; + annotations?: Maybe>>; + description?: Maybe; + endpoint?: Maybe; + id: Scalars["String"]; + metadata?: Maybe; + name?: Maybe; + nodes?: Maybe>; + roles?: Maybe>; + serviceUrl?: Maybe; + source?: Maybe; + type?: Maybe; + version?: Maybe; + }; - export type JobStatusArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; + export type Node = { + __typename?: "Node"; + id: Scalars["String"]; + metadata: NodeMetadata; + name: Scalars["String"]; + type: Scalars["String"]; + uniqueId: Scalars["String"]; }; - export type KogitoMetadata = { - __typename?: "KogitoMetadata"; - lastUpdate: Scalars["DateTime"]; - processInstances?: Maybe>>; - userTasks?: Maybe>>; + export type NodeMetadata = { + __typename?: "NodeMetadata"; + action?: Maybe; + branch?: Maybe; + state?: Maybe; + UniqueId: Scalars["String"]; }; - export type KogitoMetadataArgument = { + export type ProcessInstanceOrderBy = { + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + error?: InputMaybe; + lastUpdate?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + rootProcessId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; + }; + + export type ProcessInstanceErrorOrderBy = { + message?: InputMaybe; + nodeDefinitionId?: InputMaybe; + }; + + export type ProcessInstanceArgument = { + addons?: InputMaybe; + and?: InputMaybe>; + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + endpoint?: InputMaybe; + error?: InputMaybe; + id?: InputMaybe; lastUpdate?: InputMaybe; - processInstances?: InputMaybe; - userTasks?: InputMaybe; + milestones?: InputMaybe; + nodes?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + parentProcessInstanceId?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + roles?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; }; - export type KogitoMetadataOrderBy = { - lastUpdate?: InputMaybe; + export type StringArrayArgument = { + contains?: InputMaybe; + containsAll?: InputMaybe>; + containsAny?: InputMaybe>; + isNull?: InputMaybe; }; - export type Milestone = { - __typename?: "Milestone"; - id: Scalars["String"]; - name: Scalars["String"]; - status: MilestoneStatus; + export type ProcessInstanceErrorArgument = { + message?: InputMaybe; + nodeDefinitionId?: InputMaybe; }; export type MilestoneArgument = { @@ -191,30 +300,210 @@ export namespace GraphQL { status?: InputMaybe; }; + export type MilestoneStatusArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + export enum MilestoneStatus { Active = "ACTIVE", Available = "AVAILABLE", Completed = "COMPLETED", } - export type MilestoneStatusArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; + export type NodeInstanceArgument = { + definitionId?: InputMaybe; + enter?: InputMaybe; + exit?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + nodeId?: InputMaybe; + type?: InputMaybe; }; - export type Mutation = { - __typename?: "Mutation"; - JobCancel?: Maybe; - JobReschedule?: Maybe; - NodeInstanceCancel?: Maybe; - NodeInstanceRetrigger?: Maybe; - NodeInstanceTrigger?: Maybe; - ProcessInstanceAbort?: Maybe; - ProcessInstanceRetry?: Maybe; - ProcessInstanceSkip?: Maybe; - ProcessInstanceUpdateVariables?: Maybe; - UserTaskInstanceAttachmentCreate?: Maybe; - UserTaskInstanceAttachmentDelete?: Maybe; + export type ProcessInstanceStateArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + + export enum ProcessInstanceState { + Aborted = "ABORTED", + Active = "ACTIVE", + Completed = "COMPLETED", + Error = "ERROR", + Pending = "PENDING", + Suspended = "SUSPENDED", + } + + export type ProcessInstance = { + __typename?: "ProcessInstance"; + addons?: Maybe>; + businessKey?: Maybe; + childProcessInstances?: Maybe>; + createdBy?: Maybe; + definition?: Maybe; + diagram?: Maybe; + end?: Maybe; + endpoint: Scalars["String"]; + error?: Maybe; + id: Scalars["String"]; + identity?: Maybe; + lastUpdate: Scalars["DateTime"]; + milestones?: Maybe>; + nodeDefinitions?: Maybe>; + nodes?: Maybe>; + parentProcessInstance?: Maybe; + parentProcessInstanceId?: Maybe; + processId: Scalars["String"]; + processName?: Maybe; + roles?: Maybe>; + rootProcessId?: Maybe; + rootProcessInstanceId?: Maybe; + serviceUrl?: Maybe; + source?: Maybe; + start?: Maybe; + state?: Maybe; + updatedBy?: Maybe; + variables?: Maybe; + version?: Maybe; + }; + + export type ProcessInstanceError = { + __typename?: "ProcessInstanceError"; + message?: Maybe; + nodeDefinitionId: Scalars["String"]; + }; + + export type Milestone = { + __typename?: "Milestone"; + id: Scalars["String"]; + name: Scalars["String"]; + status: MilestoneStatus; + }; + + export type NodeInstance = { + __typename?: "NodeInstance"; + definitionId: Scalars["String"]; + enter: Scalars["DateTime"]; + exit?: Maybe; + id: Scalars["String"]; + name: Scalars["String"]; + nodeId: Scalars["String"]; + type: Scalars["String"]; + }; + + export type UserTaskInstanceOrderBy = { + actualOwner?: InputMaybe; + completed?: InputMaybe; + description?: InputMaybe; + lastUpdate?: InputMaybe; + name?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + referenceName?: InputMaybe; + started?: InputMaybe; + state?: InputMaybe; + }; + + export type UserTaskInstanceArgument = { + actualOwner?: InputMaybe; + adminGroups?: InputMaybe; + adminUsers?: InputMaybe; + and?: InputMaybe>; + attachments?: InputMaybe; + comments?: InputMaybe; + completed?: InputMaybe; + description?: InputMaybe; + excludedUsers?: InputMaybe; + id?: InputMaybe; + lastUpdate?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + potentialGroups?: InputMaybe; + potentialUsers?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + processInstanceId?: InputMaybe; + referenceName?: InputMaybe; + started?: InputMaybe; + state?: InputMaybe; + }; + + export type AttachmentArgument = { + id?: InputMaybe; + name?: InputMaybe; + }; + + export type CommentArgument = { + id?: InputMaybe; + name?: InputMaybe; + }; + + export type UserTaskInstance = { + __typename?: "UserTaskInstance"; + actualOwner?: Maybe; + adminGroups?: Maybe>; + adminUsers?: Maybe>; + attachments?: Maybe>; + comments?: Maybe>; + completed?: Maybe; + description?: Maybe; + endpoint?: Maybe; + excludedUsers?: Maybe>; + id: Scalars["String"]; + inputs?: Maybe; + lastUpdate: Scalars["DateTime"]; + name?: Maybe; + outputs?: Maybe; + potentialGroups?: Maybe>; + potentialUsers?: Maybe>; + priority?: Maybe; + processId?: Maybe; + processInstanceId: Scalars["String"]; + referenceName?: Maybe; + rootProcessId?: Maybe; + rootProcessInstanceId?: Maybe; + schema?: Maybe; + started?: Maybe; + state?: Maybe; + }; + + export type UserTaskInstanceSchemaArgs = { + groups?: InputMaybe>>; + user?: InputMaybe; + }; + + export type Attachment = { + __typename?: "Attachment"; + content: Scalars["String"]; + id: Scalars["String"]; + name: Scalars["String"]; + updatedAt: Scalars["DateTime"]; + updatedBy: Scalars["String"]; + }; + + export type Comment = { + __typename?: "Comment"; + content: Scalars["String"]; + id: Scalars["String"]; + updatedAt: Scalars["DateTime"]; + updatedBy: Scalars["String"]; + }; + + export type Mutation = { + __typename?: "Mutation"; + JobCancel?: Maybe; + JobReschedule?: Maybe; + NodeInstanceCancel?: Maybe; + NodeInstanceRetrigger?: Maybe; + NodeInstanceTrigger?: Maybe; + ProcessInstanceAbort?: Maybe; + ProcessInstanceRetry?: Maybe; + ProcessInstanceSkip?: Maybe; + ProcessInstanceUpdateVariables?: Maybe; + UserTaskInstanceAttachmentCreate?: Maybe; + UserTaskInstanceAttachmentDelete?: Maybe; UserTaskInstanceAttachmentUpdate?: Maybe; UserTaskInstanceCommentCreate?: Maybe; UserTaskInstanceCommentDelete?: Maybe; @@ -271,274 +560,53 @@ export namespace GraphQL { user?: InputMaybe; }; - export type MutationUserTaskInstanceAttachmentDeleteArgs = { - attachmentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceAttachmentUpdateArgs = { - attachmentId?: InputMaybe; - groups?: InputMaybe>>; - name?: InputMaybe; - uri?: InputMaybe; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentCreateArgs = { - comment?: InputMaybe; - groups?: InputMaybe>>; - taskId?: InputMaybe; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentDeleteArgs = { - commentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentUpdateArgs = { - comment?: InputMaybe; - commentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceUpdateArgs = { - actualOwner?: InputMaybe; - adminGroups?: InputMaybe>; - adminUsers?: InputMaybe>; - description?: InputMaybe; - excludedUsers?: InputMaybe>; - groups?: InputMaybe>>; - inputParams?: InputMaybe; - potentialGroups?: InputMaybe>; - potentialUsers?: InputMaybe>; - priority?: InputMaybe; - taskId?: InputMaybe; - user?: InputMaybe; - }; - - export type Node = { - __typename?: "Node"; - id: Scalars["String"]; - name: Scalars["String"]; - nodeDefinitionId: Scalars["String"]; - type: Scalars["String"]; - uniqueId: Scalars["String"]; - }; - - export type NodeInstance = { - __typename?: "NodeInstance"; - definitionId: Scalars["String"]; - enter: Scalars["DateTime"]; - exit?: Maybe; - id: Scalars["String"]; - name: Scalars["String"]; - nodeId: Scalars["String"]; - type: Scalars["String"]; - }; - - export type NodeInstanceArgument = { - definitionId?: InputMaybe; - enter?: InputMaybe; - exit?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - nodeId?: InputMaybe; - type?: InputMaybe; - }; - - export type NumericArgument = { - between?: InputMaybe; - equal?: InputMaybe; - greaterThan?: InputMaybe; - greaterThanEqual?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - lessThan?: InputMaybe; - lessThanEqual?: InputMaybe; - }; - - export type NumericRange = { - from: Scalars["Int"]; - to: Scalars["Int"]; - }; - - export enum OrderBy { - Asc = "ASC", - Desc = "DESC", - } - - export type Pagination = { - limit?: InputMaybe; - offset?: InputMaybe; - }; - - export type ProcessInstance = { - __typename?: "ProcessInstance"; - addons?: Maybe>; - businessKey?: Maybe; - childProcessInstances?: Maybe>; - diagram?: Maybe; - end?: Maybe; - endpoint: Scalars["String"]; - error?: Maybe; - id: Scalars["String"]; - lastUpdate: Scalars["DateTime"]; - milestones?: Maybe>; - nodeDefinitions?: Maybe>; - nodes: Array; - parentProcessInstance?: Maybe; - parentProcessInstanceId?: Maybe; - processId: Scalars["String"]; - processName?: Maybe; - roles?: Maybe>; - rootProcessId?: Maybe; - rootProcessInstanceId?: Maybe; - serviceUrl?: Maybe; - source?: Maybe; - start: Scalars["DateTime"]; - state: ProcessInstanceState; - variables?: Maybe; - }; - - export type ProcessInstanceArgument = { - addons?: InputMaybe; - and?: InputMaybe>; - businessKey?: InputMaybe; - end?: InputMaybe; - endpoint?: InputMaybe; - error?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - milestones?: InputMaybe; - nodes?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - parentProcessInstanceId?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - roles?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export type ProcessInstanceError = { - __typename?: "ProcessInstanceError"; - message?: Maybe; - nodeDefinitionId: Scalars["String"]; - }; - - export type ProcessInstanceErrorArgument = { - message?: InputMaybe; - nodeDefinitionId?: InputMaybe; - }; - - export type ProcessInstanceErrorOrderBy = { - message?: InputMaybe; - nodeDefinitionId?: InputMaybe; - }; - - export type ProcessInstanceMeta = { - __typename?: "ProcessInstanceMeta"; - businessKey?: Maybe; - end?: Maybe; - endpoint: Scalars["String"]; - id: Scalars["String"]; - lastUpdate: Scalars["DateTime"]; - parentProcessInstanceId?: Maybe; - processId: Scalars["String"]; - processName?: Maybe; - roles?: Maybe>; - rootProcessId?: Maybe; - rootProcessInstanceId?: Maybe; - serviceUrl?: Maybe; - start: Scalars["DateTime"]; - state: ProcessInstanceState; - }; - - export type ProcessInstanceMetaArgument = { - businessKey?: InputMaybe; - end?: InputMaybe; - endpoint?: InputMaybe; - id?: InputMaybe; - parentProcessInstanceId?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - roles?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export type ProcessInstanceOrderBy = { - businessKey?: InputMaybe; - end?: InputMaybe; - error?: InputMaybe; - lastUpdate?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - rootProcessId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export enum ProcessInstanceState { - Aborted = "ABORTED", - Active = "ACTIVE", - Completed = "COMPLETED", - Error = "ERROR", - Pending = "PENDING", - Suspended = "SUSPENDED", - } - - export type ProcessInstanceStateArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; - }; - - export type Query = { - __typename?: "Query"; - Jobs?: Maybe>>; - ProcessInstances?: Maybe>>; - UserTaskInstances?: Maybe>>; - }; - - export type QueryJobsArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceAttachmentDeleteArgs = { + attachmentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; }; - export type QueryProcessInstancesArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceAttachmentUpdateArgs = { + attachmentId?: InputMaybe; + groups?: InputMaybe>>; + name?: InputMaybe; + uri?: InputMaybe; + user?: InputMaybe; }; - export type QueryUserTaskInstancesArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceCommentCreateArgs = { + comment?: InputMaybe; + groups?: InputMaybe>>; + taskId?: InputMaybe; + user?: InputMaybe; }; - export type StringArgument = { - equal?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - like?: InputMaybe; + export type MutationUserTaskInstanceCommentDeleteArgs = { + commentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; }; - export type StringArrayArgument = { - contains?: InputMaybe; - containsAll?: InputMaybe>; - containsAny?: InputMaybe>; - isNull?: InputMaybe; + export type MutationUserTaskInstanceCommentUpdateArgs = { + comment?: InputMaybe; + commentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; + }; + + export type MutationUserTaskInstanceUpdateArgs = { + actualOwner?: InputMaybe; + adminGroups?: InputMaybe>; + adminUsers?: InputMaybe>; + description?: InputMaybe; + excludedUsers?: InputMaybe>; + groups?: InputMaybe>>; + inputParams?: InputMaybe; + potentialGroups?: InputMaybe>; + potentialUsers?: InputMaybe>; + priority?: InputMaybe; + taskId?: InputMaybe; + user?: InputMaybe; }; export type Subscription = { @@ -551,63 +619,69 @@ export namespace GraphQL { UserTaskInstanceUpdated: UserTaskInstance; }; - export type UserTaskInstance = { - __typename?: "UserTaskInstance"; - actualOwner?: Maybe; - adminGroups?: Maybe>; - adminUsers?: Maybe>; - attachments?: Maybe>; - comments?: Maybe>; - completed?: Maybe; - description?: Maybe; - endpoint?: Maybe; - excludedUsers?: Maybe>; + export type BigDecimalArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type BigDecimalRange = { + from: Scalars["BigDecimal"]; + to: Scalars["BigDecimal"]; + }; + + export type BooleanArgument = { + equal?: InputMaybe; + isNull?: InputMaybe; + }; + + export type FloatArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type FloatRange = { + from: Scalars["Float"]; + to: Scalars["Float"]; + }; + + export type KogitoMetadata = { + __typename?: "KogitoMetadata"; + lastUpdate: Scalars["DateTime"]; + processInstances?: Maybe>>; + userTasks?: Maybe>>; + }; + + export type ProcessInstanceMeta = { + __typename?: "ProcessInstanceMeta"; + businessKey?: Maybe; + createdBy?: Maybe; + end?: Maybe; + endpoint: Scalars["String"]; id: Scalars["String"]; - inputs?: Maybe; lastUpdate: Scalars["DateTime"]; - name?: Maybe; - outputs?: Maybe; - potentialGroups?: Maybe>; - potentialUsers?: Maybe>; - priority?: Maybe; + parentProcessInstanceId?: Maybe; processId: Scalars["String"]; - processInstanceId: Scalars["String"]; - referenceName?: Maybe; + processName?: Maybe; + roles?: Maybe>; rootProcessId?: Maybe; rootProcessInstanceId?: Maybe; - schema?: Maybe; - started: Scalars["DateTime"]; - state: Scalars["String"]; - }; - - export type UserTaskInstanceSchemaArgs = { - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type UserTaskInstanceArgument = { - actualOwner?: InputMaybe; - adminGroups?: InputMaybe; - adminUsers?: InputMaybe; - and?: InputMaybe>; - attachments?: InputMaybe; - comments?: InputMaybe; - completed?: InputMaybe; - description?: InputMaybe; - excludedUsers?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - name?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - potentialGroups?: InputMaybe; - potentialUsers?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - processInstanceId?: InputMaybe; - referenceName?: InputMaybe; - started?: InputMaybe; - state?: InputMaybe; + serviceUrl?: Maybe; + start: Scalars["DateTime"]; + state: ProcessInstanceState; + updatedBy?: Maybe; + version?: Maybe; }; export type UserTaskInstanceMeta = { @@ -632,6 +706,29 @@ export namespace GraphQL { state: Scalars["String"]; }; + export type KogitoMetadataArgument = { + lastUpdate?: InputMaybe; + processInstances?: InputMaybe; + userTasks?: InputMaybe; + }; + + export type ProcessInstanceMetaArgument = { + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + endpoint?: InputMaybe; + id?: InputMaybe; + parentProcessInstanceId?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + roles?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; + }; + export type UserTaskInstanceMetaArgument = { actualOwner?: InputMaybe; adminGroups?: InputMaybe; @@ -650,43 +747,46 @@ export namespace GraphQL { state?: InputMaybe; }; - export type UserTaskInstanceOrderBy = { - actualOwner?: InputMaybe; - completed?: InputMaybe; - description?: InputMaybe; + export type KogitoMetadataOrderBy = { lastUpdate?: InputMaybe; - name?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - referenceName?: InputMaybe; - started?: InputMaybe; - state?: InputMaybe; + }; + + export type LongArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type LongRange = { + from: Scalars["Long"]; + to: Scalars["Long"]; }; /** * A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. * - * In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor. + * In some cases, you need to provide options to alter GraphQL's execution behavior + * in ways field arguments will not suffice, such as conditionally including or + * skipping a field. Directives provide this by describing additional information + * to the executor. */ export type __Directive = { __typename?: "__Directive"; name: Scalars["String"]; description?: Maybe; - isRepeatable: Scalars["Boolean"]; locations: Array<__DirectiveLocation>; args: Array<__InputValue>; }; /** - * A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. - * - * In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor. + * A Directive can be adjacent to many parts of the GraphQL language, a + * __DirectiveLocation describes one such possible adjacencies. */ - export type __DirectiveArgsArgs = { - includeDeprecated?: InputMaybe; - }; - - /** A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies. */ export enum __DirectiveLocation { /** Location adjacent to a query operation. */ Query = "QUERY", @@ -728,7 +828,11 @@ export namespace GraphQL { InputFieldDefinition = "INPUT_FIELD_DEFINITION", } - /** One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string. */ + /** + * One possible value for a given Enum. Enum values are unique values, not a + * placeholder for a string or numeric value. However an Enum value is returned in + * a JSON response as a string. + */ export type __EnumValue = { __typename?: "__EnumValue"; name: Scalars["String"]; @@ -737,7 +841,10 @@ export namespace GraphQL { deprecationReason?: Maybe; }; - /** Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. */ + /** + * Object and Interface types are described by a list of Fields, each of which has + * a name, potentially a list of arguments, and a return type. + */ export type __Field = { __typename?: "__Field"; name: Scalars["String"]; @@ -748,12 +855,11 @@ export namespace GraphQL { deprecationReason?: Maybe; }; - /** Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. */ - export type __FieldArgsArgs = { - includeDeprecated?: InputMaybe; - }; - - /** Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value. */ + /** + * Arguments provided to Fields or Directives and the input fields of an + * InputObject are represented as Input Values which describe their type and + * optionally a default value. + */ export type __InputValue = { __typename?: "__InputValue"; name: Scalars["String"]; @@ -761,14 +867,15 @@ export namespace GraphQL { type: __Type; /** A GraphQL-formatted string representing the default value for this input value. */ defaultValue?: Maybe; - isDeprecated: Scalars["Boolean"]; - deprecationReason?: Maybe; }; - /** A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations. */ + /** + * A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all + * available types and directives on the server, as well as the entry points for + * query, mutation, and subscription operations. + */ export type __Schema = { __typename?: "__Schema"; - description?: Maybe; /** A list of all types supported by this server. */ types: Array<__Type>; /** The type that query operations will be rooted at. */ @@ -782,16 +889,20 @@ export namespace GraphQL { }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __Type = { __typename?: "__Type"; kind: __TypeKind; name?: Maybe; description?: Maybe; - specifiedByUrl?: Maybe; fields?: Maybe>; interfaces?: Maybe>; possibleTypes?: Maybe>; @@ -801,39 +912,40 @@ export namespace GraphQL { }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __TypeFieldsArgs = { includeDeprecated?: InputMaybe; }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __TypeEnumValuesArgs = { includeDeprecated?: InputMaybe; }; - /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. - */ - export type __TypeInputFieldsArgs = { - includeDeprecated?: InputMaybe; - }; - /** An enum describing what kind of type a given `__Type` is. */ export enum __TypeKind { /** Indicates this type is a scalar. */ Scalar = "SCALAR", /** Indicates this type is an object. `fields` and `interfaces` are valid fields. */ Object = "OBJECT", - /** Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields. */ + /** Indicates this type is an interface. `fields` and `possibleTypes` are valid fields. */ Interface = "INTERFACE", /** Indicates this type is a union. `possibleTypes` is a valid field. */ Union = "UNION", @@ -856,36 +968,22 @@ export namespace GraphQL { export type GetProcessInstancesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - rootProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - addons?: Array | null | undefined; - businessKey?: string | null | undefined; - serviceUrl?: string | null | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + parentProcessInstanceId?: string | null; + rootProcessInstanceId?: string | null; + roles?: Array | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + addons?: Array | null; + businessKey?: string | null; + serviceUrl?: string | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + } | null> | null; }; export type GetChildInstancesQueryVariables = Exact<{ @@ -894,36 +992,22 @@ export namespace GraphQL { export type GetChildInstancesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - rootProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - serviceUrl?: string | null | undefined; - addons?: Array | null | undefined; - businessKey?: string | null | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + parentProcessInstanceId?: string | null; + rootProcessInstanceId?: string | null; + roles?: Array | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + serviceUrl?: string | null; + addons?: Array | null; + businessKey?: string | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + } | null> | null; }; export type GetProcessInstanceByIdQueryVariables = Exact<{ @@ -932,76 +1016,48 @@ export namespace GraphQL { export type GetProcessInstanceByIdQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - variables?: string | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - end?: any | null | undefined; - addons?: Array | null | undefined; - endpoint: string; - serviceUrl?: string | null | undefined; - source?: string | null | undefined; - parentProcessInstance?: - | { - __typename?: "ProcessInstance"; - id: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - } - | null - | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - childProcessInstances?: - | Array<{ - __typename?: "ProcessInstance"; - id: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - }> - | null - | undefined; - nodes: Array<{ - __typename?: "NodeInstance"; - id: string; - nodeId: string; - name: string; - enter: any; - exit?: any | null | undefined; - type: string; - definitionId: string; - }>; - milestones?: - | Array<{ - __typename?: "Milestone"; - id: string; - name: string; - status: MilestoneStatus; - }> - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + businessKey?: string | null; + parentProcessInstanceId?: string | null; + roles?: Array | null; + variables?: any | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + end?: any | null; + addons?: Array | null; + endpoint: string; + serviceUrl?: string | null; + source?: string | null; + parentProcessInstance?: { + __typename?: "ProcessInstance"; + id: string; + processName?: string | null; + businessKey?: string | null; + } | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + childProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processName?: string | null; + businessKey?: string | null; + }> | null; + nodes?: Array<{ + __typename?: "NodeInstance"; + id: string; + nodeId: string; + name: string; + enter: any; + exit?: any | null; + type: string; + definitionId: string; + }> | null; + milestones?: Array<{ __typename?: "Milestone"; id: string; name: string; status: MilestoneStatus }> | null; + } | null> | null; }; export type GetColumnPickerAttributesQueryVariables = Exact<{ @@ -1010,37 +1066,24 @@ export namespace GraphQL { export type GetColumnPickerAttributesQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; + }; + }> | null; + } | null; }; export type GetQueryTypesQueryVariables = Exact<{ [key: string]: never }>; @@ -1051,32 +1094,18 @@ export namespace GraphQL { __typename?: "__Schema"; queryType: Array<{ __typename?: "__Type"; - name?: string | null | undefined; + name?: string | null; kind: __TypeKind; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; }>; }; }; @@ -1085,39 +1114,20 @@ export namespace GraphQL { export type GetQueryFieldsQuery = { __typename?: "Query"; - __type?: - | { - __typename?: "__Type"; - name?: string | null | undefined; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - args: Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - kind: __TypeKind; - name?: string | null | undefined; - }; - }>; - type: { - __typename?: "__Type"; - ofType?: - | { - __typename?: "__Type"; - name?: string | null | undefined; - } - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + __type?: { + __typename?: "__Type"; + name?: string | null; + fields?: Array<{ + __typename?: "__Field"; + name: string; + args: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; kind: __TypeKind; name?: string | null }; + }>; + type: { __typename?: "__Type"; ofType?: { __typename?: "__Type"; name?: string | null } | null }; + }> | null; + } | null; }; export type GetInputFieldsFromQueryQueryVariables = Exact<{ @@ -1126,36 +1136,24 @@ export namespace GraphQL { export type GetInputFieldsFromQueryQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - }; - }> - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; name?: string | null }; + }> | null; + }; + }> | null; + } | null; }; export type GetInputFieldsFromTypeQueryVariables = Exact<{ @@ -1164,35 +1162,26 @@ export namespace GraphQL { export type GetInputFieldsFromTypeQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null | undefined; - ofType?: - | { - __typename?: "__Type"; - kind: __TypeKind; - name?: string | null | undefined; - enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null | undefined; - } - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null; + ofType?: { + __typename?: "__Type"; + kind: __TypeKind; + name?: string | null; + enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null; + } | null; + }; + }> | null; + } | null; }; export type GetUserTasksByStatesQueryVariables = Exact<{ @@ -1202,37 +1191,30 @@ export namespace GraphQL { export type GetUserTasksByStatesQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - name?: string | null | undefined; - referenceName?: string | null | undefined; - description?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - endpoint?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + name?: string | null; + referenceName?: string | null; + description?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + endpoint?: string | null; + } | null> | null; }; export type GetUserTaskByIdQueryVariables = Exact<{ @@ -1241,38 +1223,31 @@ export namespace GraphQL { export type GetUserTaskByIdQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - description?: string | null | undefined; - name?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - referenceName?: string | null | undefined; - endpoint?: string | null | undefined; - lastUpdate: any; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + description?: string | null; + name?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + referenceName?: string | null; + endpoint?: string | null; + lastUpdate: any; + } | null> | null; }; export type GetTasksForUserQueryVariables = Exact<{ @@ -1284,38 +1259,31 @@ export namespace GraphQL { export type GetTasksForUserQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - name?: string | null | undefined; - referenceName?: string | null | undefined; - description?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - lastUpdate: any; - endpoint?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + name?: string | null; + referenceName?: string | null; + description?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + lastUpdate: any; + endpoint?: string | null; + } | null> | null; }; export type GetJobsByProcessInstanceIdQueryVariables = Exact<{ @@ -1324,32 +1292,25 @@ export namespace GraphQL { export type GetJobsByProcessInstanceIdQuery = { __typename?: "Query"; - Jobs?: - | Array< - | { - __typename?: "Job"; - id: string; - processId?: string | null | undefined; - processInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - status: JobStatus; - expirationTime?: any | null | undefined; - priority?: number | null | undefined; - callbackEndpoint?: string | null | undefined; - repeatInterval?: number | null | undefined; - repeatLimit?: number | null | undefined; - scheduledId?: string | null | undefined; - retries?: number | null | undefined; - lastUpdate?: any | null | undefined; - endpoint?: string | null | undefined; - nodeInstanceId?: string | null | undefined; - executionCounter?: number | null | undefined; - } - | null - | undefined - > - | null - | undefined; + Jobs?: Array<{ + __typename?: "Job"; + id: string; + processId?: string | null; + processInstanceId?: string | null; + rootProcessId?: string | null; + status: JobStatus; + expirationTime?: any | null; + priority?: number | null; + callbackEndpoint?: string | null; + repeatInterval?: number | null; + repeatLimit?: number | null; + scheduledId?: string | null; + retries?: number | null; + lastUpdate?: any | null; + endpoint?: string | null; + nodeInstanceId?: string | null; + executionCounter?: number | null; + } | null> | null; }; export type GetJobsWithFiltersQueryVariables = Exact<{ @@ -1361,59 +1322,43 @@ export namespace GraphQL { export type GetJobsWithFiltersQuery = { __typename?: "Query"; - Jobs?: - | Array< - | { - __typename?: "Job"; - id: string; - processId?: string | null | undefined; - processInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - status: JobStatus; - expirationTime?: any | null | undefined; - priority?: number | null | undefined; - callbackEndpoint?: string | null | undefined; - repeatInterval?: number | null | undefined; - repeatLimit?: number | null | undefined; - scheduledId?: string | null | undefined; - retries?: number | null | undefined; - lastUpdate?: any | null | undefined; - endpoint?: string | null | undefined; - executionCounter?: number | null | undefined; - } - | null - | undefined - > - | null - | undefined; + Jobs?: Array<{ + __typename?: "Job"; + id: string; + processId?: string | null; + processInstanceId?: string | null; + rootProcessId?: string | null; + status: JobStatus; + expirationTime?: any | null; + priority?: number | null; + callbackEndpoint?: string | null; + repeatInterval?: number | null; + repeatLimit?: number | null; + scheduledId?: string | null; + retries?: number | null; + lastUpdate?: any | null; + endpoint?: string | null; + executionCounter?: number | null; + } | null> | null; }; export type AbortProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type AbortProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceAbort?: string | null | undefined; - }; + export type AbortProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceAbort?: string | null }; export type SkipProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type SkipProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceSkip?: string | null | undefined; - }; + export type SkipProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceSkip?: string | null }; export type RetryProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type RetryProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceRetry?: string | null | undefined; - }; + export type RetryProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceRetry?: string | null }; export type GetProcessInstanceSvgQueryVariables = Exact<{ processId?: InputMaybe; @@ -1421,46 +1366,19 @@ export namespace GraphQL { export type GetProcessInstanceSvgQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - diagram?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ __typename?: "ProcessInstance"; diagram?: string | null } | null> | null; }; - export type GetProcessInstanceNodeDefinitionsQueryVariables = Exact<{ + export type GetProcessDefinitionNodesQueryVariables = Exact<{ processId?: InputMaybe; }>; - export type GetProcessInstanceNodeDefinitionsQuery = { + export type GetProcessDefinitionNodesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - nodeDefinitions?: - | Array<{ - __typename?: "Node"; - id: string; - name: string; - type: string; - uniqueId: string; - nodeDefinitionId: string; - }> - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessDefinitions?: Array<{ + __typename?: "ProcessDefinition"; + nodes?: Array<{ __typename?: "Node"; id: string; name: string; type: string }> | null; + } | null> | null; }; export type HandleNodeTriggerMutationVariables = Exact<{ @@ -1468,30 +1386,21 @@ export namespace GraphQL { nodeId?: InputMaybe; }>; - export type HandleNodeTriggerMutation = { - __typename?: "Mutation"; - NodeInstanceTrigger?: string | null | undefined; - }; + export type HandleNodeTriggerMutation = { __typename?: "Mutation"; NodeInstanceTrigger?: string | null }; export type HandleNodeInstanceCancelMutationVariables = Exact<{ processId?: InputMaybe; nodeInstanceId?: InputMaybe; }>; - export type HandleNodeInstanceCancelMutation = { - __typename?: "Mutation"; - NodeInstanceCancel?: string | null | undefined; - }; + export type HandleNodeInstanceCancelMutation = { __typename?: "Mutation"; NodeInstanceCancel?: string | null }; export type HandleNodeInstanceRetriggerMutationVariables = Exact<{ processId?: InputMaybe; nodeInstanceId?: InputMaybe; }>; - export type HandleNodeInstanceRetriggerMutation = { - __typename?: "Mutation"; - NodeInstanceRetrigger?: string | null | undefined; - }; + export type HandleNodeInstanceRetriggerMutation = { __typename?: "Mutation"; NodeInstanceRetrigger?: string | null }; export type HandleProcessVariableUpdateMutationVariables = Exact<{ processId?: InputMaybe; @@ -1500,27 +1409,30 @@ export namespace GraphQL { export type HandleProcessVariableUpdateMutation = { __typename?: "Mutation"; - ProcessInstanceUpdateVariables?: string | null | undefined; + ProcessInstanceUpdateVariables?: string | null; }; export type JobCancelMutationVariables = Exact<{ jobId?: InputMaybe; }>; - export type JobCancelMutation = { - __typename?: "Mutation"; - JobCancel?: string | null | undefined; - }; + export type JobCancelMutation = { __typename?: "Mutation"; JobCancel?: string | null }; export type HandleJobRescheduleMutationVariables = Exact<{ jobId?: InputMaybe; data?: InputMaybe; }>; - export type HandleJobRescheduleMutation = { - __typename?: "Mutation"; - JobReschedule?: string | null | undefined; - }; + export type HandleJobRescheduleMutation = { __typename?: "Mutation"; JobReschedule?: string | null }; + + export const GetProcessDefinitionsDocument = gql` + query getProcessDefinitions { + ProcessDefinitions { + id + endpoint + } + } + `; export const GetProcessInstancesDocument = gql` query getProcessInstances( @@ -2604,69 +2516,63 @@ export namespace GraphQL { GetProcessInstanceSvgQuery, GetProcessInstanceSvgQueryVariables >; - export const GetProcessInstanceNodeDefinitionsDocument = gql` - query getProcessInstanceNodeDefinitions($processId: String) { - ProcessInstances(where: { id: { equal: $processId } }) { - nodeDefinitions { + export const GetProcessDefinitionNodesDocument = gql` + query getProcessDefinitionNodes($processId: String) { + ProcessDefinitions(where: { id: { equal: $processId } }) { + nodes { id name type - uniqueId - nodeDefinitionId } } } `; /** - * __useGetProcessInstanceNodeDefinitionsQuery__ + * __useGetProcessDefinitionNodesQuery__ * - * To run a query within a React component, call `useGetProcessInstanceNodeDefinitionsQuery` and pass it any options that fit your needs. - * When your component renders, `useGetProcessInstanceNodeDefinitionsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useGetProcessDefinitionNodesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetProcessDefinitionNodesQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useGetProcessInstanceNodeDefinitionsQuery({ + * const { data, loading, error } = useGetProcessDefinitionNodesQuery({ * variables: { * processId: // value for 'processId' * }, * }); */ - export function useGetProcessInstanceNodeDefinitionsQuery( + export function useGetProcessDefinitionNodesQuery( baseOptions?: ApolloReactHooks.QueryHookOptions< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return ApolloReactHooks.useQuery< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables - >(GetProcessInstanceNodeDefinitionsDocument, options); + return ApolloReactHooks.useQuery( + GetProcessDefinitionNodesDocument, + options + ); } - export function useGetProcessInstanceNodeDefinitionsLazyQuery( + export function useGetProcessDefinitionNodesLazyQuery( baseOptions?: ApolloReactHooks.LazyQueryHookOptions< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return ApolloReactHooks.useLazyQuery< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables - >(GetProcessInstanceNodeDefinitionsDocument, options); + return ApolloReactHooks.useLazyQuery( + GetProcessDefinitionNodesDocument, + options + ); } - export type GetProcessInstanceNodeDefinitionsQueryHookResult = ReturnType< - typeof useGetProcessInstanceNodeDefinitionsQuery - >; - export type GetProcessInstanceNodeDefinitionsLazyQueryHookResult = ReturnType< - typeof useGetProcessInstanceNodeDefinitionsLazyQuery - >; - export type GetProcessInstanceNodeDefinitionsQueryResult = ApolloReactCommon.QueryResult< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + export type GetProcessDefinitionNodesQueryHookResult = ReturnType; + export type GetProcessDefinitionNodesLazyQueryHookResult = ReturnType; + export type GetProcessDefinitionNodesQueryResult = ApolloReactCommon.QueryResult< + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables >; export const HandleNodeTriggerDocument = gql` mutation handleNodeTrigger($processId: String, $nodeId: String) { diff --git a/packages/runtime-tools-process-gateway-api/src/types.ts b/packages/runtime-tools-process-gateway-api/src/types.ts index d88a47f6031..ec6c175bc55 100644 --- a/packages/runtime-tools-process-gateway-api/src/types.ts +++ b/packages/runtime-tools-process-gateway-api/src/types.ts @@ -58,7 +58,7 @@ export interface BulkCancel { failedJobs: Job[]; } -export interface JobCancel { +export interface JobOperationResult { modalTitle: string; modalContent: string; } diff --git a/packages/runtime-tools-process-webapp-components/README.md b/packages/runtime-tools-process-webapp-components/README.md new file mode 100644 index 00000000000..9ae02c2e1a3 --- /dev/null +++ b/packages/runtime-tools-process-webapp-components/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-process-webapp-components + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-process-webapp-components/package.json b/packages/runtime-tools-process-webapp-components/package.json index 241865b0578..a1f06d0d1ab 100644 --- a/packages/runtime-tools-process-webapp-components/package.json +++ b/packages/runtime-tools-process-webapp-components/package.json @@ -30,7 +30,7 @@ "@kie-tools/runtime-tools-shared-enveloped-components": "workspace:*", "@kie-tools/runtime-tools-shared-gateway-api": "workspace:*", "apollo-client": "2.6.10", - "axios": "^1.6.4", + "axios": "^1.6.8", "lodash": "^4.17.21", "react": "^17.0.2" }, diff --git a/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementGatewayApi.ts b/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementGatewayApi.ts index 98092589f75..f51b54c1b51 100644 --- a/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementGatewayApi.ts +++ b/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementGatewayApi.ts @@ -21,7 +21,7 @@ import { Job, JobStatus, BulkCancel, - JobCancel, + JobOperationResult, JobsSortBy, } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; import { JobsManagementQueries } from "./JobsManagementQueries"; @@ -31,7 +31,7 @@ export interface JobsManagementGatewayApi { initialLoad: (filter: JobStatus[], orderBy: JobsSortBy) => Promise; applyFilter: (filter: JobStatus[]) => Promise; bulkCancel: (jobsToBeActioned: Job[]) => Promise; - cancelJob: (job: Pick) => Promise; + cancelJob: (job: Pick) => Promise; rescheduleJob: ( job: Job, repeatInterval: number | string, @@ -71,8 +71,8 @@ export class JobsManagementGatewayApiImpl implements JobsManagementGatewayApi { return Promise.resolve(); }; - cancelJob = async (job: Pick): Promise => { - const cancelResult: JobCancel = await this.queries.cancelJob(job); + cancelJob = async (job: Pick): Promise => { + const cancelResult: JobOperationResult = await this.queries.cancelJob(job); return cancelResult; }; diff --git a/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementQueries.ts b/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementQueries.ts index a25a5e350d2..df7df42dad1 100644 --- a/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementQueries.ts +++ b/packages/runtime-tools-process-webapp-components/src/JobsManagement/JobsManagementQueries.ts @@ -21,7 +21,7 @@ import { ApolloClient } from "apollo-client"; import { BulkCancel, Job, - JobCancel, + JobOperationResult, JobStatus, JobsSortBy, } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; @@ -34,7 +34,7 @@ import { export interface JobsManagementQueries { getJobs(start: number, end: number, filters: JobStatus[], sortBy: JobsSortBy | any): Promise; - cancelJob: (job: Pick) => Promise; + cancelJob: (job: Pick) => Promise; bulkCancel: (jobsToBeActioned: (Job & { errorMessage?: string })[]) => Promise; rescheduleJob: ( job: Job, @@ -55,7 +55,7 @@ export class GraphQLJobsManagementQueries implements JobsManagementQueries { return getJobsWithFilters(offset, limit, filters, orderBy, this.client); } - async cancelJob(job: Pick): Promise { + async cancelJob(job: Job): Promise { return jobCancel(job, this.client); } diff --git a/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsGatewayApi.ts b/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsGatewayApi.ts index da67f1e4cc7..e106d6bc9ef 100644 --- a/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsGatewayApi.ts +++ b/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsGatewayApi.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { Job, JobCancel, ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; +import { Job, JobOperationResult, ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; import { ProcessDetailsQueries } from "./ProcessDetailsQueries"; import { SvgSuccessResponse, @@ -41,7 +41,7 @@ export interface ProcessDetailsGatewayApi { processDetailsState: any; getProcessDiagram: (data: ProcessInstance) => Promise; handleProcessAbort: (processInstance: ProcessInstance) => Promise; - cancelJob: (job: Pick) => Promise; + cancelJob: (job: Pick) => Promise; rescheduleJob: ( job: Job, repeatInterval: number | string, @@ -89,7 +89,7 @@ export class ProcessDetailsGatewayApiImpl implements ProcessDetailsGatewayApi { return this.queries.handleProcessAbort(processInstance); }; - cancelJob = (job: Job): Promise => { + cancelJob = (job: Job): Promise => { return this.queries.jobCancel(job); }; diff --git a/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsQueries.ts b/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsQueries.ts index 602435ad006..9571119a2f7 100755 --- a/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsQueries.ts +++ b/packages/runtime-tools-process-webapp-components/src/ProcessDetails/ProcessDetailsQueries.ts @@ -38,7 +38,7 @@ import { getSVG, getTriggerableNodes, } from "@kie-tools/runtime-tools-process-gateway-api/dist/gatewayApi"; -import { Job, JobCancel, ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; +import { Job, JobOperationResult, ProcessInstance } from "@kie-tools/runtime-tools-process-gateway-api/dist/types"; export interface ProcessDetailsQueries { getProcessDetails(id: string): Promise; @@ -47,7 +47,7 @@ export interface ProcessDetailsQueries { handleProcessAbort(processInstance: ProcessInstance): Promise; handleProcessRetry(processInstance: ProcessInstance): Promise; getSVG(processInstance: ProcessInstance): Promise; - jobCancel(job: Job): Promise; + jobCancel(job: Job): Promise; rescheduleJob: ( job: Job, repeatInterval: number | string, @@ -95,7 +95,7 @@ export class GraphQLProcessDetailsQueries implements ProcessDetailsQueries { return Promise.resolve(getSVG(processInstance, this.client)); } - async jobCancel(job: Job): Promise { + async jobCancel(job: Job): Promise { return jobCancel(job, this.client); } diff --git a/packages/runtime-tools-shared-enveloped-components/README.md b/packages/runtime-tools-shared-enveloped-components/README.md new file mode 100644 index 00000000000..cc25cccb457 --- /dev/null +++ b/packages/runtime-tools-shared-enveloped-components/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-shared-enveloped-components + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-shared-gateway-api/README.md b/packages/runtime-tools-shared-gateway-api/README.md new file mode 100644 index 00000000000..6447dff745c --- /dev/null +++ b/packages/runtime-tools-shared-gateway-api/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-shared-gateway-api + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-shared-gateway-api/src/types.ts b/packages/runtime-tools-shared-gateway-api/src/types.ts index 4fbe6431097..86ec09e5886 100644 --- a/packages/runtime-tools-shared-gateway-api/src/types.ts +++ b/packages/runtime-tools-shared-gateway-api/src/types.ts @@ -40,11 +40,9 @@ export interface NodeInstance { } export interface TriggerableNode { - id: number; + id: string; name: string; type: string; - uniqueId: string; - nodeDefinitionId: string; } export interface Milestone { diff --git a/packages/runtime-tools-shared-webapp-components/README.md b/packages/runtime-tools-shared-webapp-components/README.md new file mode 100644 index 00000000000..e33dff608ec --- /dev/null +++ b/packages/runtime-tools-shared-webapp-components/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-shared-webapp-components + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-swf-enveloped-components/README.md b/packages/runtime-tools-swf-enveloped-components/README.md new file mode 100644 index 00000000000..f004ff8169d --- /dev/null +++ b/packages/runtime-tools-swf-enveloped-components/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-swf-enveloped-components + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-swf-enveloped-components/src/__tests__/components/validateCloudEventRequest.test.ts b/packages/runtime-tools-swf-enveloped-components/src/__tests__/components/validateCloudEventRequest.test.ts index 6b49ec3e662..a7e46d3ddad 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/__tests__/components/validateCloudEventRequest.test.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/__tests__/components/validateCloudEventRequest.test.ts @@ -31,6 +31,7 @@ describe("validateCloudEventRequest tests", () => { source: "any", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }); expect(validation.isValid()).toBeTruthy(); @@ -46,6 +47,7 @@ describe("validateCloudEventRequest tests", () => { source: "any", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }); expect(validation.isValid()).toBeFalsy(); @@ -64,6 +66,7 @@ describe("validateCloudEventRequest tests", () => { source: "any", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }); expect(validation.isValid()).toBeFalsy(); @@ -82,6 +85,7 @@ describe("validateCloudEventRequest tests", () => { source: "any", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }; let validation = validateCloudEventRequest(eventRequest); diff --git a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/api/CloudEventFormEnvelopeApi.ts b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/api/CloudEventFormEnvelopeApi.ts index 58bfc4decff..0bedb872dc3 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/api/CloudEventFormEnvelopeApi.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/api/CloudEventFormEnvelopeApi.ts @@ -34,4 +34,5 @@ export type CloudEventFormDefaultValues = { export type CloudEventFormInitArgs = { isNewInstanceEvent: boolean; defaultValues?: CloudEventFormDefaultValues; + serviceUrl: string; }; diff --git a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/embedded/EmbeddedCloudEventForm.tsx b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/embedded/EmbeddedCloudEventForm.tsx index 984baae166e..48d2d35aaff 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/embedded/EmbeddedCloudEventForm.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/embedded/EmbeddedCloudEventForm.tsx @@ -32,7 +32,9 @@ export interface EmbeddedCloudEventFormProps { defaultValues?: { cloudEventSource?: string; instanceId?: string; + definitionName?: string; }; + serviceUrl: string; } export const EmbeddedCloudEventForm = React.forwardRef( @@ -66,6 +68,7 @@ export const EmbeddedCloudEventForm = React.forwardRef( { isNewInstanceEvent: props.isNewInstanceEvent ?? true, defaultValues: props.defaultValues, + serviceUrl: props.serviceUrl, } ); }, diff --git a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/CloudEventFormEnvelopeView.tsx b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/CloudEventFormEnvelopeView.tsx index 60d00780e27..67e9fb9f9fe 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/CloudEventFormEnvelopeView.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/CloudEventFormEnvelopeView.tsx @@ -41,6 +41,7 @@ export const CloudEventFormEnvelopeView = React.forwardRef(false); const [isNewInstanceEvent, setIsNewInstanceEvent] = useState(false); const [defaultValues, setDefaultValues] = useState(); + const [serviceUrl, setServiceUrl] = useState(""); useImperativeHandle( forwardedRef, @@ -49,6 +50,7 @@ export const CloudEventFormEnvelopeView = React.forwardRef - + ); diff --git a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/components/CloudEventForm/CloudEventForm.tsx b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/components/CloudEventForm/CloudEventForm.tsx index c9605d23651..51cd7ef41bf 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/components/CloudEventForm/CloudEventForm.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/cloudEventForm/envelope/components/CloudEventForm/CloudEventForm.tsx @@ -47,12 +47,14 @@ import { export interface CloudEventFormProps { driver: CloudEventFormDriver; + serviceUrl: string; isNewInstanceEvent?: boolean; defaultValues?: CloudEventFormDefaultValues; } export const CloudEventForm: React.FC = ({ driver, + serviceUrl, isNewInstanceEvent, defaultValues, ouiaId, @@ -124,6 +126,7 @@ export const CloudEventForm: React.FC = ({ source: eventSource, extensions, }, + serviceUrl: serviceUrl, }; const validations = validateCloudEventRequest(eventRequest); diff --git a/packages/runtime-tools-swf-enveloped-components/src/jobsManagement/envelope/components/JobsRescheduleModal/JobsRescheduleModal.tsx b/packages/runtime-tools-swf-enveloped-components/src/jobsManagement/envelope/components/JobsRescheduleModal/JobsRescheduleModal.tsx index 7e7bf4b69c1..23e376f6fb8 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/jobsManagement/envelope/components/JobsRescheduleModal/JobsRescheduleModal.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/jobsManagement/envelope/components/JobsRescheduleModal/JobsRescheduleModal.tsx @@ -38,7 +38,12 @@ interface IOwnProps { job: Job; rescheduleError: string; setRescheduleError: (rescheduleError: string) => void; - handleJobReschedule: any; + handleJobReschedule: ( + job: Job, + repeatInterval: string | number, + repeatLimit: string | number, + scheduleDate: Date + ) => void; } export const JobsRescheduleModal: React.FC = ({ diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListChannelApi.ts b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListChannelApi.ts index d81dbc3052f..9369b45af55 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListChannelApi.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListChannelApi.ts @@ -27,5 +27,5 @@ export interface WorkflowDefinitionListChannelApi { workflowDefinitionList__setWorkflowDefinitionFilter(filter: string[]): Promise; workflowDefinitionList__getWorkflowDefinitionFilter(): Promise; workflowDefinitionList__openWorkflowForm(workflowDefinition: WorkflowDefinition): Promise; - workflowDefinitionsList__openTriggerCloudEvent(): void; + workflowDefinitionsList__openTriggerCloudEvent(workflowDefinition: WorkflowDefinition): Promise; } diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListDriver.ts b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListDriver.ts index 4d2867a7a00..85ca1992e9e 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListDriver.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/api/WorkflowDefinitionListDriver.ts @@ -27,5 +27,5 @@ export interface WorkflowDefinitionListDriver { setWorkflowDefinitionFilter(filter: string[]): Promise; getWorkflowDefinitionFilter(): Promise; openWorkflowForm(workflowDefinition: WorkflowDefinition): Promise; - openTriggerCloudEvent(): void; + openTriggerCloudEvent(workflowDefinition: WorkflowDefinition): Promise; } diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/embedded/WorkflowDefinitionListChannelApiImpl.ts b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/embedded/WorkflowDefinitionListChannelApiImpl.ts index 8b8f3e29c24..9dac2cda48b 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/embedded/WorkflowDefinitionListChannelApiImpl.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/embedded/WorkflowDefinitionListChannelApiImpl.ts @@ -40,7 +40,7 @@ export class WorkflowDefinitionListChannelApiImpl implements WorkflowDefinitionL return this.driver.getWorkflowDefinitionsQuery(); } - workflowDefinitionsList__openTriggerCloudEvent(): void { - this.driver.openTriggerCloudEvent(); + workflowDefinitionsList__openTriggerCloudEvent(workflowDefinition: WorkflowDefinition): Promise { + return this.driver.openTriggerCloudEvent(workflowDefinition); } } diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/WorkflowDefinitionListEnvelopeViewDriver.ts b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/WorkflowDefinitionListEnvelopeViewDriver.ts index ce65b709271..24de942e16b 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/WorkflowDefinitionListEnvelopeViewDriver.ts +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/WorkflowDefinitionListEnvelopeViewDriver.ts @@ -40,7 +40,7 @@ export default class WorkflowDefinitionListEnvelopeViewDriver implements Workflo return this.channelApi.requests.workflowDefinitionList__getWorkflowDefinitionsQuery(); } - openTriggerCloudEvent(): void { - this.channelApi.notifications.workflowDefinitionsList__openTriggerCloudEvent.send(); + openTriggerCloudEvent(workflowDefinition: WorkflowDefinition): Promise { + return this.channelApi.requests.workflowDefinitionsList__openTriggerCloudEvent(workflowDefinition); } } diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/WorkflowDefinitionList/WorkflowDefinitionList.tsx b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/WorkflowDefinitionList/WorkflowDefinitionList.tsx index 20f1abb27ac..3daf331a1bd 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/WorkflowDefinitionList/WorkflowDefinitionList.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/WorkflowDefinitionList/WorkflowDefinitionList.tsx @@ -70,19 +70,20 @@ const WorkflowDefinitionList: React.FC const columns: DataTableColumn[] = [ getColumn("workflowName", `Workflow Name`), getColumn("endpoint", "Endpoint"), - getActionColumn((workflowDefinition) => { - driver.openWorkflowForm(workflowDefinition); - }), + getActionColumn( + (workflowDefinition) => { + driver.openWorkflowForm(workflowDefinition); + }, + (workflowDefinition) => { + driver.openTriggerCloudEvent(workflowDefinition); + } + ), ]; const applyFilter = async (): Promise => { await driver.setWorkflowDefinitionFilter(filterWorkflowNames); }; - const onOpenTriggerCloudEvent = useCallback(() => { - driver.openTriggerCloudEvent(); - }, []); - const filterWorkflowDefinition = (): WorkflowDefinition[] => { if (filterWorkflowNames.length === 0) { return workflowDefinitionList; diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/utils/WorkflowDefinitionListUtils.tsx b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/utils/WorkflowDefinitionListUtils.tsx index 6aa34adddb8..f1c6716f9fb 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/utils/WorkflowDefinitionListUtils.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDefinitions/envelope/components/utils/WorkflowDefinitionListUtils.tsx @@ -20,9 +20,11 @@ import React from "react"; import { DataTableColumn } from "@kie-tools/runtime-tools-components/dist/components/DataTable"; import { PlayIcon } from "@patternfly/react-icons/dist/js/icons/play-icon"; +import { SitemapIcon } from "@patternfly/react-icons/dist/js/icons/sitemap-icon"; import { Tooltip } from "@patternfly/react-core/dist/js/components/Tooltip"; import { Button } from "@patternfly/react-core/dist/js/components/Button"; import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; + export const getColumn = (columnPath: string, columnLabel: string): DataTableColumn => { return { label: columnLabel, @@ -31,16 +33,26 @@ export const getColumn = (columnPath: string, columnLabel: string): DataTableCol }; }; -export const getActionColumn = (startWorkflow: (workflowDefinition: WorkflowDefinition) => void): DataTableColumn => { +export const getActionColumn = ( + startWorkflow: (workflowDefinition: WorkflowDefinition) => void, + triggerCloudEvent: (workflowDefinition: WorkflowDefinition) => void +): DataTableColumn => { return { label: "Actions", path: "actions", bodyCellTransformer: (value: any, rowData: WorkflowDefinition) => ( - - - + <> + + + + + + + ), }; }; diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/JobActionsKebab/JobActionsKebab.tsx b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/JobActionsKebab/JobActionsKebab.tsx index 86da9206bdd..525c0fb3247 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/JobActionsKebab/JobActionsKebab.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/JobActionsKebab/JobActionsKebab.tsx @@ -69,8 +69,9 @@ const JobActionsKebab: React.FC = ({ job, driver, ouiaId, }; const handleJobReschedule = async ( - repeatInterval: number | string, - repeatLimit: number | string, + _job: Job, + repeatInterval: string | number, + repeatLimit: string | number, scheduleDate: Date ): Promise => { await handleJobRescheduleUtil( diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsNodeTrigger/WorkflowDetailsNodeTrigger.tsx b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsNodeTrigger/WorkflowDetailsNodeTrigger.tsx index d09acc7fadb..05e6bf75a5d 100644 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsNodeTrigger/WorkflowDetailsNodeTrigger.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsNodeTrigger/WorkflowDetailsNodeTrigger.tsx @@ -87,7 +87,7 @@ const WorkflowDetailsNodeTrigger: React.FC { if (nodes.length > 0) { const selectedNodeObject: TriggerableNode[] = nodes.filter( - (node: TriggerableNode) => node.name === selectedNodeName + (node: TriggerableNode) => node.id === selectedNodeName ); setSelectedNode(selectedNodeObject[0]); @@ -102,7 +102,7 @@ const WorkflowDetailsNodeTrigger: React.FC + {node.name} ); diff --git a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsTimelinePanel/WorkflowDetailsTimelinePanel.tsx b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsTimelinePanel/WorkflowDetailsTimelinePanel.tsx index b09c0c822f8..405f3517761 100755 --- a/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsTimelinePanel/WorkflowDetailsTimelinePanel.tsx +++ b/packages/runtime-tools-swf-enveloped-components/src/workflowDetails/envelope/components/WorkflowDetailsTimelinePanel/WorkflowDetailsTimelinePanel.tsx @@ -118,8 +118,9 @@ const WorkflowDetailsTimelinePanel: React.FC = ({ data, j }; const handleJobReschedule = async ( - repeatInterval: number | string, - repeatLimit: number | string, + _job: Job, + repeatInterval: string | number, + repeatLimit: string | number, scheduleDate: Date ): Promise => { await handleJobRescheduleUtil( diff --git a/packages/runtime-tools-swf-gateway-api/README.md b/packages/runtime-tools-swf-gateway-api/README.md new file mode 100644 index 00000000000..c6543d27bd3 --- /dev/null +++ b/packages/runtime-tools-swf-gateway-api/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-swf-gateway-api + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-swf-gateway-api/codegen.config.ts b/packages/runtime-tools-swf-gateway-api/codegen.config.ts new file mode 100644 index 00000000000..80b799b451b --- /dev/null +++ b/packages/runtime-tools-swf-gateway-api/codegen.config.ts @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CodegenConfig } from "@graphql-codegen/cli"; +import { env } from "./env"; + +const gatewayApiEnv: any = env; + +const config: CodegenConfig = { + overwrite: true, + schema: gatewayApiEnv.runtimeToolsSWFGatewayApi.graphqlCodegen.dataIndexUrl, + documents: ["src/graphql/queries.tsx"], + emitLegacyCommonJSImports: false, + generates: { + "./src/graphql/types.tsx": { + plugins: [ + { + add: { + content: ["/* eslint-disable */"], + }, + }, + { + add: { + content: ["", "export namespace GraphQL {"], + }, + }, + { + add: { + placement: "append", + content: "}", + }, + }, + "typescript", + "typescript-operations", + "typescript-react-apollo", + ], + config: { + withHOC: false, + withHooks: true, + withComponent: false, + apolloReactHooksImportFrom: "@apollo/react-hooks", + apolloReactCommonImportFrom: "@apollo/react-common", + gqlImport: "graphql-tag", + }, + }, + "./src/graphql/graphql.schema.json": { + plugins: ["introspection"], + }, + }, +}; + +export default config; diff --git a/packages/runtime-tools-swf-gateway-api/env/index.js b/packages/runtime-tools-swf-gateway-api/env/index.js index 61bc742bd66..d1ae973b6db 100644 --- a/packages/runtime-tools-swf-gateway-api/env/index.js +++ b/packages/runtime-tools-swf-gateway-api/env/index.js @@ -17,11 +17,27 @@ * under the License. */ -const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); +const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); module.exports = composeEnv([require("@kie-tools/root-env/env")], { - vars: varsWithName({}), + vars: varsWithName({ + RUNTIME_TOOLS_SWF_GATEWAY_API_graphqlCodegenEnabled: { + default: true, + description: "Enable the Grapqhl Codegen schema updates", + }, + RUNTIME_TOOLS_SWF_GATEWAY_API_graphqlCodegenDataIndexUrl: { + default: "http://localhost:8180/graphql", + description: "URL for the Data Index service", + }, + }), get env() { - return {}; + return { + runtimeToolsSWFGatewayApi: { + graphqlCodegen: { + enabled: getOrDefault(this.vars.RUNTIME_TOOLS_SWF_GATEWAY_API_graphqlCodegenEnabled), + dataIndexUrl: getOrDefault(this.vars.RUNTIME_TOOLS_SWF_GATEWAY_API_graphqlCodegenDataIndexUrl), + }, + }, + }; }, }); diff --git a/packages/runtime-tools-swf-gateway-api/package.json b/packages/runtime-tools-swf-gateway-api/package.json index 87860319c78..9c2a50d91ad 100644 --- a/packages/runtime-tools-swf-gateway-api/package.json +++ b/packages/runtime-tools-swf-gateway-api/package.json @@ -20,6 +20,7 @@ "scripts": { "build:dev": "rimraf dist && tsc -p tsconfig.json", "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", + "graphql:codegen": "run-script-if --bool \"$(build-env runtimeToolsSWFGatewayApi.graphqlCodegen.enabled)\" --then \"graphql-codegen --config codegen.config.ts\"", "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" }, @@ -27,7 +28,7 @@ "@apidevtools/swagger-parser": "^10.1.0", "@kie-tools/runtime-tools-shared-gateway-api": "workspace:*", "apollo-client": "2.6.10", - "axios": "^1.6.4", + "axios": "^1.6.8", "gql-query-builder": "3.1.3", "graphql": "14.3.1", "graphql-tag": "2.0.0", diff --git a/packages/runtime-tools-swf-gateway-api/src/__tests__/apis/apis.test.tsx b/packages/runtime-tools-swf-gateway-api/src/__tests__/apis/apis.test.tsx index 52ee282488d..112ae1a9216 100644 --- a/packages/runtime-tools-swf-gateway-api/src/__tests__/apis/apis.test.tsx +++ b/packages/runtime-tools-swf-gateway-api/src/__tests__/apis/apis.test.tsx @@ -140,11 +140,11 @@ describe("swf custom form tests", () => { }); }); -describe("triiger cloud events serction", () => { +describe("trigger cloud events section", () => { beforeEach(() => { jest.clearAllMocks(); }); - it("trigger cloud event start - with businesskey", async () => { + it("trigger cloud event start - with business key", async () => { mockedAxios.request.mockResolvedValue("success"); const event = { method: CloudEventMethod.POST, @@ -157,6 +157,7 @@ describe("triiger cloud events serction", () => { kogitobusinesskey: "1234", }, }, + serviceUrl: "http://localhost:8090/", }; const response = await triggerStartCloudEvent(event, "http://localhost:8080/"); @@ -167,14 +168,10 @@ describe("triiger cloud events serction", () => { expect(request.url).toBe("http://localhost:8080/endpoint"); expect(request.method).toBe("POST"); - expect(request.data).toHaveProperty("specversion", "1.0"); - expect(request.data).toHaveProperty("type", "eventType"); - expect(request.data).toHaveProperty("source", "eventSource"); - expect(request.data).toHaveProperty(KOGITO_BUSINESS_KEY, "1234"); - expect(request.data).toHaveProperty("data", JSON.parse(event.data)); + expect(request).toHaveProperty("data", JSON.parse(event.data)); }); - it("trigger cloud event start - without businesskey", async () => { + it("trigger cloud event start - without business key", async () => { mockedAxios.request.mockResolvedValue("success"); const event = { method: CloudEventMethod.POST, @@ -185,6 +182,7 @@ describe("triiger cloud events serction", () => { source: "eventSource", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }; const response = await triggerStartCloudEvent(event, "http://localhost:8080/"); @@ -195,7 +193,7 @@ describe("triiger cloud events serction", () => { expect(request.url).toBe("http://localhost:8080/endpoint"); expect(request.method).toBe("POST"); - expect(request.data).toHaveProperty(KOGITO_BUSINESS_KEY, response); + expect(request).toHaveProperty("data", JSON.parse(event.data)); }); it("trigger cloud event - with instanceId", async () => { @@ -211,6 +209,7 @@ describe("triiger cloud events serction", () => { kogitoprocrefid: "1234", }, }, + serviceUrl: "http://localhost:8090/", }; const response = await triggerCloudEvent(event, "http://localhost:8080/"); @@ -221,8 +220,7 @@ describe("triiger cloud events serction", () => { expect(request.url).toBe("http://localhost:8080/endpoint"); expect(request.method).toBe("POST"); - expect(request.data).toHaveProperty(KOGITO_PROCESS_REFERENCE_ID, "1234"); - expect(request.data).not.toHaveProperty(KOGITO_BUSINESS_KEY); + expect(request).toHaveProperty("data", JSON.parse(event.data)); }); it("trigger cloud event - without instanceId", async () => { @@ -236,6 +234,7 @@ describe("triiger cloud events serction", () => { source: "eventSource", extensions: {}, }, + serviceUrl: "http://localhost:8090/", }; const response = await triggerCloudEvent(event, "http://localhost:8080/"); @@ -246,8 +245,7 @@ describe("triiger cloud events serction", () => { expect(request.url).toBe("http://localhost:8080/endpoint"); expect(request.method).toBe("POST"); - expect(request.data).not.toHaveProperty(KOGITO_PROCESS_REFERENCE_ID); - expect(request.data).not.toHaveProperty(KOGITO_BUSINESS_KEY); + expect(request).toHaveProperty("data", JSON.parse(event.data)); }); it("trigger cloud event - using PUT", async () => { @@ -263,6 +261,7 @@ describe("triiger cloud events serction", () => { kogitoprocrefid: "1234", }, }, + serviceUrl: "http://localhost:8090/", }; const response = await triggerCloudEvent(event, "http://localhost:8080/"); @@ -273,5 +272,6 @@ describe("triiger cloud events serction", () => { expect(request.url).toBe("http://localhost:8080/endpoint"); expect(request.method).toBe("PUT"); + expect(request).toHaveProperty("data", JSON.parse(event.data)); }); }); diff --git a/packages/runtime-tools-swf-gateway-api/src/gatewayApi/apis.tsx b/packages/runtime-tools-swf-gateway-api/src/gatewayApi/apis.tsx index 22826273eae..619ebe387c0 100644 --- a/packages/runtime-tools-swf-gateway-api/src/gatewayApi/apis.tsx +++ b/packages/runtime-tools-swf-gateway-api/src/gatewayApi/apis.tsx @@ -46,7 +46,6 @@ import { ApolloClient } from "apollo-client"; import { buildWorkflowListWhereArgument } from "./QueryUtils"; import axios from "axios"; import { v4 as uuidv4 } from "uuid"; -import SwaggerParser from "@apidevtools/swagger-parser"; export const getWorkflowInstances = async ( offset: number, @@ -314,7 +313,7 @@ export const handleNodeTrigger = async ( mutation: GraphQL.HandleNodeTriggerDocument, variables: { processId: workflowInstance.id, - nodeId: node.nodeDefinitionId, + nodeId: node.id, }, fetchPolicy: "no-cache", }) @@ -434,7 +433,7 @@ export const getTriggerableNodes = async ( ): Promise => { return client .query({ - query: GraphQL.GetProcessInstanceNodeDefinitionsDocument, + query: GraphQL.GetProcessDefinitionNodesDocument, variables: { processId: workflowInstance.id, }, @@ -491,9 +490,14 @@ const doTriggerCloudEvent = (event: CloudEventRequest, baseUrl: string, proxyEnd return axios.request({ url: proxyEndpoint || url, method: event.method, - data: cloudEvent, + data: cloudEvent.data, headers: { ...(proxyEndpoint ? { "Target-Url": url } : {}), + "ce-type": cloudEvent.type, + "ce-source": cloudEvent.source, + "ce-id": cloudEvent.id, + "ce-specversion": cloudEvent.specversion, + ...event.headers.extensions, }, }); }; @@ -518,42 +522,29 @@ export const triggerCloudEvent = (event: CloudEventRequest, baseUrl: string, pro return doTriggerCloudEvent(event, baseUrl, proxyEndpoint); }; -export const createWorkflowDefinitionList = ( - workflowDefinitionObjs: WorkflowDefinition[], - url: string -): WorkflowDefinition[] => { - const workflowDefinitionList: WorkflowDefinition[] = []; - workflowDefinitionObjs.forEach((workflowDefObj) => { - const workflowName = Object.keys(workflowDefObj)[0].split("/")[1]; - const endpoint = `${url}/${workflowName}`; - workflowDefinitionList.push({ - workflowName, - endpoint, - }); - }); - return workflowDefinitionList; -}; - -export const getWorkflowDefinitionList = (baseUrl: string, openApiPath: string): Promise => { - return new Promise((resolve, reject) => { - SwaggerParser.parse(`${baseUrl}/${openApiPath}`) - .then((response) => { - const workflowDefinitionObjs: any[] = []; - const paths = response.paths; - const regexPattern = /^\/[^\n/]+\/schema/; - Object.getOwnPropertyNames(paths) - .filter((path) => regexPattern.test(path.toString())) - .forEach((url) => { - let workflowArray = url.split("/"); - workflowArray = workflowArray.filter((name) => name.length !== 0); - /* istanbul ignore else*/ - if (Object.prototype.hasOwnProperty.call(paths![`/${workflowArray[0]}`], "post")) { - workflowDefinitionObjs.push({ [url]: paths![url] }); - } - }); - resolve(createWorkflowDefinitionList(workflowDefinitionObjs, baseUrl)); +export const getWorkflowDefinitions = (client: ApolloClient): Promise => { + return new Promise((resolve, reject) => { + client + .query({ + query: GraphQL.GetProcessDefinitionsDocument, + fetchPolicy: "network-only", + errorPolicy: "all", }) - .catch((err: any) => reject(err)); + .then((value) => { + const workflowDefinitions = value.data.ProcessDefinitions; + resolve( + value.data.ProcessDefinitions.map((item: { id: string; endpoint: string; serviceUrl: string }) => { + return { + workflowName: item.id, + endpoint: item.endpoint, + serviceUrl: item.serviceUrl, + }; + }) + ); + }) + .catch((reason) => { + reject({ errorMessage: JSON.stringify(reason) }); + }); }); }; @@ -683,12 +674,20 @@ export const getCustomWorkflowSchemaFromApi = async ( export const getCustomWorkflowSchema = async ( baseUrl: string, openApiPath: string, - workflowName: string + workflowName: string, + proxyEndpoint?: string ): Promise> => { return new Promise((resolve, reject) => { - SwaggerParser.parse(`${baseUrl}/${openApiPath}`) + const url = `${baseUrl}/${openApiPath}`; + axios + .request({ + url: proxyEndpoint || url, + headers: { + ...(proxyEndpoint ? { "Target-Url": url } : {}), + }, + }) .then(async (response: any) => { - resolve(await getCustomWorkflowSchemaFromApi(response, workflowName)); + resolve(await getCustomWorkflowSchemaFromApi(response.data, workflowName)); }) .catch((err) => reject(err)); }); diff --git a/packages/runtime-tools-swf-gateway-api/src/graphql/graphql.schema.json b/packages/runtime-tools-swf-gateway-api/src/graphql/graphql.schema.json index e622e9b4fad..055cce17b9d 100644 --- a/packages/runtime-tools-swf-gateway-api/src/graphql/graphql.schema.json +++ b/packages/runtime-tools-swf-gateway-api/src/graphql/graphql.schema.json @@ -12,35 +12,50 @@ "types": [ { "kind": "OBJECT", - "name": "Attachment", + "name": "Query", "description": null, "fields": [ { - "name": "content", + "name": "Jobs", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + }, + "defaultValue": null } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Job", "ofType": null } }, @@ -48,15 +63,46 @@ "deprecationReason": null }, { - "name": "name", + "name": "ProcessDefinitions", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "ProcessDefinition", "ofType": null } }, @@ -64,15 +110,46 @@ "deprecationReason": null }, { - "name": "updatedAt", + "name": "ProcessInstances", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "OBJECT", + "name": "ProcessInstance", "ofType": null } }, @@ -80,15 +157,46 @@ "deprecationReason": null }, { - "name": "updatedBy", + "name": "UserTaskInstances", "description": null, - "args": [], + "args": [ + { + "name": "orderBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceOrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pagination", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "UserTaskInstance", "ofType": null } }, @@ -103,165 +211,193 @@ }, { "kind": "INPUT_OBJECT", - "name": "AttachmentArgument", + "name": "JobOrderBy", "description": null, "fields": null, "inputFields": [ { - "name": "id", + "name": "executionCounter", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "expirationTime", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "BooleanArgument", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "equal", + "name": "lastUpdate", "description": null, "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isNull", + "name": "priority", "description": null, "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Comment", - "description": null, - "fields": [ + "defaultValue": null + }, { - "name": "content", + "name": "processId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "retries", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "updatedAt", + "name": "rootProcessId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "updatedBy", + "name": "status", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderBy", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESC", + "description": null, "isDeprecated": false, "deprecationReason": null } ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "Pagination", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "limit", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "offset", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "CommentArgument", + "name": "JobArgument", "description": null, "fields": null, "inputFields": [ + { + "name": "and", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "expirationTime", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, { "name": "id", "description": null, @@ -270,21 +406,125 @@ "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "not", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "or", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "JobArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "priority", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "NumericArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null + }, + { + "name": "processInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "scheduledId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "JobStatusArgument", + "ofType": null + }, + "defaultValue": null } ], "interfaces": null, @@ -305,9 +545,7 @@ "name": "DateRange", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "equal", @@ -317,9 +555,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "greaterThan", @@ -329,9 +565,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "greaterThanEqual", @@ -341,9 +575,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "isNull", @@ -353,9 +585,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "lessThan", @@ -365,9 +595,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "lessThanEqual", @@ -377,9 +605,7 @@ "name": "DateTime", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -404,9 +630,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "to", @@ -420,9 +644,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -439,6 +661,16 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "The `Boolean` scalar type represents `true` or `false`.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "IdArgument", @@ -453,9 +685,7 @@ "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "in", @@ -473,9 +703,7 @@ } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "isNull", @@ -485,9 +713,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -496,8 +722,8 @@ }, { "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "name": "String", + "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "fields": null, "inputFields": null, "interfaces": null, @@ -505,212 +731,223 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "Job", + "kind": "INPUT_OBJECT", + "name": "NumericArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "callbackEndpoint", + "name": "between", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "NumericRange", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "executionCounter", + "name": "greaterThan", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "expirationTime", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "in", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } } }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "lastUpdate", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodeInstanceId", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "priority", + "name": "lessThan", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "lessThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "NumericRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "processInstanceId", + "name": "from", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "repeatInterval", + "name": "to", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "repeatLimit", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "retries", + "name": "in", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessId", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessInstanceId", + "name": "like", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "JobStatusArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "scheduledId", + "name": "equal", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "JobStatus", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "status", + "name": "in", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "ENUM", @@ -718,391 +955,312 @@ "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "ENUM", + "name": "JobStatus", "description": null, "fields": null, - "inputFields": [ + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "and", + "name": "CANCELED", "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", - "ofType": null - } - } - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "expirationTime", + "name": "ERROR", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "EXECUTED", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "RETRY", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeInstanceId", + "name": "SCHEDULED", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Job", + "description": null, + "fields": [ { - "name": "not", + "name": "callbackEndpoint", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "or", + "name": "endpoint", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "executionCounter", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "NumericArgument", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "expirationTime", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processInstanceId", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "nodeInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "scheduledId", + "name": "priority", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "status", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "JobStatusArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "JobOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "executionCounter", + "name": "processInstanceId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "expirationTime", + "name": "repeatInterval", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "repeatLimit", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "retries", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "Int", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "retries", + "name": "rootProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "scheduledId", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { "name": "status", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "JobStatus", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "JobStatus", + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionOrderBy", "description": null, "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "CANCELED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ERROR", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "EXECUTED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "inputFields": [ { - "name": "RETRY", + "name": "id", "description": null, - "isDeprecated": false, - "deprecationReason": null + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "SCHEDULED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "JobStatusArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", + "name": "name", "description": null, "type": { "kind": "ENUM", - "name": "JobStatus", + "name": "OrderBy", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "in", + "name": "version", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "JobStatus", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -1110,128 +1268,86 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "KogitoMetadata", + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "lastUpdate", + "name": "and", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processInstances", + "name": "id", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstanceMeta", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "userTasks", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstanceMeta", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "KogitoMetadataArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "lastUpdate", + "name": "name", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processInstances", + "name": "not", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceMetaArgument", + "name": "ProcessDefinitionArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "userTasks", + "name": "or", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceMetaArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessDefinitionArgument", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "KogitoMetadataOrderBy", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "lastUpdate", + "name": "version", "description": null, "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -1240,31 +1356,35 @@ }, { "kind": "OBJECT", - "name": "Milestone", + "name": "ProcessDefinition", "description": null, "fields": [ { - "name": "id", + "name": "addons", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "annotations", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "SCALAR", @@ -1276,337 +1396,273 @@ "deprecationReason": null }, { - "name": "status", + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endpoint", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "MilestoneStatus", + "kind": "SCALAR", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "MilestoneArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "id", + "name": "metadata", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "JSON", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { "name": "name", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "status", + "name": "nodes", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "MilestoneStatusArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Node", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "MilestoneStatus", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + }, { - "name": "ACTIVE", + "name": "roles", "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "AVAILABLE", + "name": "serviceUrl", "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "COMPLETED", + "name": "source", "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "MilestoneStatusArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "equal", + "name": "type", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "MilestoneStatus", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "version", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "MilestoneStatus", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "JSON", + "description": "A JSON scalar", + "fields": null, + "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Mutation", + "name": "Node", "description": null, "fields": [ { - "name": "JobCancel", + "name": "id", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "JobReschedule", + "name": "metadata", "description": null, - "args": [ - { - "name": "data", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "NodeMetadata", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceCancel", + "name": "name", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeInstanceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceRetrigger", + "name": "type", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeInstanceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NodeInstanceTrigger", + "name": "uniqueId", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodeId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "NodeMetadata", + "description": null, + "fields": [ { - "name": "ProcessInstanceAbort", + "name": "action", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1616,22 +1672,9 @@ "deprecationReason": null }, { - "name": "ProcessInstanceRetry", + "name": "branch", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1641,22 +1684,9 @@ "deprecationReason": null }, { - "name": "ProcessInstanceSkip", + "name": "state", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -1666,625 +1696,821 @@ "deprecationReason": null }, { - "name": "ProcessInstanceUpdateVariables", + "name": "UniqueId", "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "variables", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "businessKey", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentCreate", + "name": "createdBy", "description": null, - "args": [ - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uri", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentDelete", + "name": "end", "description": null, - "args": [ - { - "name": "attachmentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceAttachmentUpdate", + "name": "error", "description": null, - "args": [ - { - "name": "attachmentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uri", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorOrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceCommentCreate", + "name": "lastUpdate", "description": null, - "args": [ - { - "name": "comment", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "UserTaskInstanceCommentDelete", + "name": "processId", "description": null, - "args": [ - { - "name": "commentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "updatedBy", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeDefinitionId", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addons", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "and", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "businessKey", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "createdBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "end", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "endpoint", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "error", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "milestones", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "MilestoneArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodes", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "NodeInstanceArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "not", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "or", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceArgument", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "parentProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "roles", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "updatedBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "contains", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "containsAll", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "containsAny", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], + }, + "defaultValue": null + }, + { + "name": "isNull", + "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceErrorArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "message", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeDefinitionId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MilestoneArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "status", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "MilestoneStatusArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MilestoneStatusArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "equal", + "description": null, + "type": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MilestoneStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "AVAILABLE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COMPLETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "NodeInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "definitionId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "enter", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "exit", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "equal", + "description": null, + "type": { + "kind": "ENUM", + "name": "ProcessInstanceState", "ofType": null }, + "defaultValue": null + }, + { + "name": "in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProcessInstanceState", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ABORTED", + "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "UserTaskInstanceCommentUpdate", + "name": "ACTIVE", "description": null, - "args": [ - { - "name": "comment", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "commentId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "UserTaskInstanceUpdate", + "name": "COMPLETED", "description": null, - "args": [ - { - "name": "actualOwner", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminGroups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "excludedUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputParams", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialUsers", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "priority", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "taskId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUSPENDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProcessInstance", + "description": null, + "fields": [ + { + "name": "addons", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { "kind": "SCALAR", "name": "String", "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "businessKey", + "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", @@ -2292,111 +2518,77 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Node", - "description": null, - "fields": [ + }, { - "name": "id", + "name": "childProcessInstances", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "createdBy", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "definition", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessDefinition", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "diagram", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "uniqueId", + "name": "end", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "NodeInstance", - "description": null, - "fields": [ + }, { - "name": "definitionId", + "name": "endpoint", "description": null, "args": [], "type": { @@ -2412,7 +2604,19 @@ "deprecationReason": null }, { - "name": "enter", + "name": "error", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProcessInstanceError", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", "description": null, "args": [], "type": { @@ -2420,7 +2624,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null } }, @@ -2428,19 +2632,19 @@ "deprecationReason": null }, { - "name": "exit", + "name": "identity", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "lastUpdate", "description": null, "args": [], "type": { @@ -2448,7 +2652,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "DateTime", "ofType": null } }, @@ -2456,631 +2660,618 @@ "deprecationReason": null }, { - "name": "name", + "name": "milestones", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeId", + "name": "nodeDefinitions", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Node", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "nodes", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "NodeInstance", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "NodeInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "definitionId", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "enter", + "name": "parentProcessInstance", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "OBJECT", + "name": "ProcessInstance", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "exit", + "name": "parentProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "processName", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeId", + "name": "roles", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "NumericArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "between", + "name": "rootProcessInstanceId", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "NumericRange", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "equal", + "name": "serviceUrl", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "greaterThan", + "name": "source", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "greaterThanEqual", + "name": "start", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "state", "description": null, + "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "updatedBy", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lessThan", + "name": "variables", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "JSON", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lessThanEqual", + "name": "version", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "NumericRange", + "kind": "OBJECT", + "name": "ProcessInstanceError", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "from", + "name": "message", "description": null, + "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "to", + "name": "nodeDefinitionId", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "OrderBy", + "kind": "OBJECT", + "name": "Milestone", "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + "fields": [ { - "name": "ASC", + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "DESC", + "name": "status", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MilestoneStatus", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "OBJECT", + "name": "NodeInstance", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "limit", + "name": "definitionId", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "offset", + "name": "enter", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exit", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstance", - "description": null, - "fields": [ + }, { - "name": "addons", + "name": "id", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "businessKey", + "name": "name", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "childProcessInstances", + "name": "nodeId", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "diagram", + "name": "type", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "actualOwner", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null + }, + "defaultValue": null }, { - "name": "end", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "description", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "error", + "name": "lastUpdate", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "ProcessInstanceError", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "name", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "priority", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "milestones", + "name": "processId", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Milestone", - "ofType": null - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodeDefinitions", + "name": "referenceName", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Node", - "ofType": null - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodes", + "name": "started", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "NodeInstance", - "ofType": null - } - } - } + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "parentProcessInstance", + "name": "state", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "ProcessInstance", + "kind": "ENUM", + "name": "OrderBy", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "parentProcessInstanceId", + "name": "actualOwner", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "adminGroups", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processName", + "name": "adminUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "roles", + "name": "and", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, @@ -3088,133 +3279,106 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceArgument", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessId", + "name": "attachments", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "AttachmentArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "rootProcessInstanceId", + "name": "comments", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "CommentArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "serviceUrl", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "DateArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "source", + "name": "description", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "start", + "name": "excludedUsers", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "state", + "name": "id", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "variables", + "name": "name", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ + "defaultValue": null + }, { - "name": "addons", + "name": "not", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "name": "UserTaskInstanceArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "and", + "name": "or", "description": null, "type": { "kind": "LIST", @@ -3224,251 +3388,283 @@ "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", + "name": "UserTaskInstanceArgument", "ofType": null } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "businessKey", + "name": "potentialGroups", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "StringArgument", + "name": "StringArrayArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "end", + "name": "potentialUsers", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArrayArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "endpoint", + "name": "priority", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "error", + "name": "processId", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "processInstanceId", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "referenceName", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "DateArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "milestones", + "name": "started", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "MilestoneArgument", + "name": "DateArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "nodes", + "name": "state", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "NodeInstanceArgument", + "name": "StringArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AttachmentArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "not", + "name": "id", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", + "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "or", + "name": "name", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "ofType": null - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CommentArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "parentProcessInstanceId", + "name": "id", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "IdArgument", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "name", "description": null, "type": { "kind": "INPUT_OBJECT", "name": "StringArgument", "ofType": null }, - "defaultValue": null, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserTaskInstance", + "description": null, + "fields": [ + { + "name": "actualOwner", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "processName", + "name": "adminGroups", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "roles", + "name": "adminUsers", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "attachments", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attachment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "comments", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "start", + "name": "completed", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "description", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstanceError", - "description": null, - "fields": [ + }, { - "name": "message", + "name": "endpoint", "description": null, "args": [], "type": { @@ -3480,104 +3676,71 @@ "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "excludedUsers", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "message", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "message", + "name": "inputs", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodeDefinitionId", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ProcessInstanceMeta", - "description": null, - "fields": [ + }, { - "name": "businessKey", + "name": "name", "description": null, "args": [], "type": { @@ -3589,67 +3752,71 @@ "deprecationReason": null }, { - "name": "end", + "name": "outputs", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "endpoint", + "name": "potentialGroups", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "potentialUsers", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "priority", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "parentProcessInstanceId", + "name": "processId", "description": null, "args": [], "type": { @@ -3661,7 +3828,7 @@ "deprecationReason": null }, { - "name": "processId", + "name": "processInstanceId", "description": null, "args": [], "type": { @@ -3677,7 +3844,7 @@ "deprecationReason": null }, { - "name": "processName", + "name": "referenceName", "description": null, "args": [], "type": { @@ -3688,26 +3855,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "roles", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "rootProcessId", "description": null, @@ -3733,9 +3880,34 @@ "deprecationReason": null }, { - "name": "serviceUrl", + "name": "schema", "description": null, - "args": [], + "args": [ + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { "kind": "SCALAR", "name": "String", @@ -3745,17 +3917,13 @@ "deprecationReason": null }, { - "name": "start", + "name": "started", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -3765,13 +3933,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -3783,525 +3947,948 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceMetaArgument", + "kind": "OBJECT", + "name": "Attachment", "description": null, - "fields": null, - "inputFields": [ - { - "name": "businessKey", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": [ { - "name": "end", + "name": "content", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "endpoint", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "name", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "parentProcessInstanceId", + "name": "updatedAt", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Comment", + "description": null, + "fields": [ { - "name": "processName", + "name": "content", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "roles", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "updatedAt", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Mutation", + "description": null, + "fields": [ { - "name": "start", + "name": "JobCancel", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "JobReschedule", "description": null, + "args": [ + { + "name": "data", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceOrderBy", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "businessKey", + "name": "NodeInstanceCancel", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "end", + "name": "NodeInstanceRetrigger", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeInstanceId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "error", + "name": "NodeInstanceTrigger", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "nodeId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceErrorOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "ProcessInstanceAbort", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "ProcessInstanceRetry", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processName", + "name": "ProcessInstanceSkip", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessId", + "name": "ProcessInstanceUpdateVariables", "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "variables", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "start", + "name": "UserTaskInstanceAttachmentCreate", "description": null, + "args": [ + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "taskId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "uri", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "UserTaskInstanceAttachmentDelete", "description": null, + "args": [ + { + "name": "attachmentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "ProcessInstanceState", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "ABORTED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ACTIVE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "COMPLETED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ERROR", - "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "PENDING", + "name": "UserTaskInstanceAttachmentUpdate", "description": null, + "args": [ + { + "name": "attachmentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "uri", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "SUSPENDED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceStateArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", + "name": "UserTaskInstanceCommentCreate", "description": null, + "args": [ + { + "name": "comment", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "taskId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], "type": { - "kind": "ENUM", - "name": "ProcessInstanceState", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "in", + "name": "UserTaskInstanceCommentDelete", "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ProcessInstanceState", - "ofType": null + "args": [ + { + "name": "commentId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ + }, { - "name": "Jobs", + "name": "UserTaskInstanceCommentUpdate", "description": null, "args": [ { - "name": "orderBy", + "name": "comment", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "JobOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "commentId", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "groups", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "JobArgument", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Job", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstances", + "name": "UserTaskInstanceUpdate", "description": null, "args": [ { - "name": "orderBy", + "name": "actualOwner", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "adminGroups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "adminUsers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "description", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "excludedUsers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "groups", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "inputParams", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "potentialGroups", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "potentialUsers", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "ProcessInstanceArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UserTaskInstances", - "description": null, - "args": [ + "defaultValue": null + }, { - "name": "orderBy", + "name": "priority", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceOrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "pagination", + "name": "taskId", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "Pagination", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "where", + "name": "user", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4313,172 +4900,151 @@ "possibleTypes": null }, { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "OBJECT", + "name": "Subscription", "description": null, - "fields": null, - "inputFields": [ - { - "name": "equal", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": [ { - "name": "in", + "name": "JobAdded", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "Job", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "JobUpdated", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Job", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "like", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "contains", + "name": "ProcessInstanceAdded", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "containsAll", + "name": "ProcessInstanceUpdated", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessInstance", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "containsAny", + "name": "UserTaskInstanceAdded", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "UserTaskInstance", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "isNull", + "name": "UserTaskInstanceUpdated", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserTaskInstance", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Subscription", - "description": null, + "name": "__Schema", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", "fields": [ { - "name": "JobAdded", - "description": null, + "name": "types", + "description": "A list of all types supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "description": "The type that query operations will be rooted at.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "Job", + "name": "__Type", "ofType": null } }, @@ -4486,63 +5052,74 @@ "deprecationReason": null }, { - "name": "JobUpdated", - "description": null, + "name": "mutationType", + "description": "If this server supports mutation, the type that mutation operations will be rooted at.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Job", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstanceAdded", - "description": null, + "name": "subscriptionType", + "description": "If this server support subscription, the type that subscription operations will be rooted at.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ProcessInstanceUpdated", - "description": null, + "name": "directives", + "description": "A list of all directives supported by this server.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ProcessInstance", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Directive", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields": [ { - "name": "UserTaskInstanceAdded", + "name": "kind", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", + "kind": "ENUM", + "name": "__TypeKind", "ofType": null } }, @@ -4550,34 +5127,19 @@ "deprecationReason": null }, { - "name": "UserTaskInstanceUpdated", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserTaskInstance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "UserTaskInstance", - "description": null, - "fields": [ + }, { - "name": "actualOwner", + "name": "description", "description": null, "args": [], "type": { @@ -4589,9 +5151,20 @@ "deprecationReason": null }, { - "name": "adminGroups", + "name": "fields", "description": null, - "args": [], + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], "type": { "kind": "LIST", "name": null, @@ -4599,8 +5172,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__Field", "ofType": null } } @@ -4609,7 +5182,7 @@ "deprecationReason": null }, { - "name": "adminUsers", + "name": "interfaces", "description": null, "args": [], "type": { @@ -4619,8 +5192,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__Type", "ofType": null } } @@ -4629,7 +5202,7 @@ "deprecationReason": null }, { - "name": "attachments", + "name": "possibleTypes", "description": null, "args": [], "type": { @@ -4640,7 +5213,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Attachment", + "name": "__Type", "ofType": null } } @@ -4649,7 +5222,38 @@ "deprecationReason": null }, { - "name": "comments", + "name": "enumValues", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__EnumValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", "description": null, "args": [], "type": { @@ -4660,7 +5264,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Comment", + "name": "__InputValue", "ofType": null } } @@ -4669,16 +5273,102 @@ "deprecationReason": null }, { - "name": "completed", + "name": "ofType", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "OBJECT", + "name": "__Type", "ofType": null }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "description": "An enum describing what kind of type a given `__Type` is.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "description": "Indicates this type is a scalar.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "description": "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "description": "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null }, { "name": "description", @@ -4693,39 +5383,47 @@ "deprecationReason": null }, { - "name": "endpoint", + "name": "args", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", + "name": "type", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "__Type", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "isDeprecated", "description": null, "args": [], "type": { @@ -4733,7 +5431,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -4741,7 +5439,7 @@ "deprecationReason": null }, { - "name": "inputs", + "name": "deprecationReason", "description": null, "args": [], "type": { @@ -4751,9 +5449,20 @@ }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields": [ { - "name": "lastUpdate", + "name": "name", "description": null, "args": [], "type": { @@ -4761,7 +5470,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null } }, @@ -4769,7 +5478,7 @@ "deprecationReason": null }, { - "name": "name", + "name": "description", "description": null, "args": [], "type": { @@ -4781,59 +5490,62 @@ "deprecationReason": null }, { - "name": "outputs", + "name": "type", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialGroups", - "description": null, + "name": "defaultValue", + "description": "A GraphQL-formatted string representing the default value for this input value.", "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields": [ { - "name": "potentialUsers", + "name": "name", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "description", "description": null, "args": [], "type": { @@ -4845,7 +5557,7 @@ "deprecationReason": null }, { - "name": "processId", + "name": "isDeprecated", "description": null, "args": [], "type": { @@ -4853,7 +5565,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -4861,7 +5573,30 @@ "deprecationReason": null }, { - "name": "processInstanceId", + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Directive", + "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields": [ + { + "name": "name", "description": null, "args": [], "type": { @@ -4877,7 +5612,7 @@ "deprecationReason": null }, { - "name": "referenceName", + "name": "description", "description": null, "args": [], "type": { @@ -4889,280 +5624,242 @@ "deprecationReason": null }, { - "name": "rootProcessId", + "name": "locations", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "rootProcessInstanceId", + "name": "args", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "schema", - "description": null, - "args": [ - { - "name": "groups", - "description": null, - "type": { - "kind": "LIST", + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "__InputValue", "ofType": null } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + } } - ], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "description": "Location adjacent to a query operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "description": "Location adjacent to a mutation operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIPTION", + "description": "Location adjacent to a subscription operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "description": "Location adjacent to a field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "description": "Location adjacent to a fragment definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "description": "Location adjacent to a fragment spread.", + "isDeprecated": false, + "deprecationReason": null }, { - "name": "started", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } - }, + "name": "INLINE_FRAGMENT", + "description": "Location adjacent to an inline fragment.", "isDeprecated": false, "deprecationReason": null }, { - "name": "state", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, + "name": "VARIABLE_DEFINITION", + "description": "Location adjacent to a variable definition.", "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "actualOwner", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, + "name": "SCHEMA", + "description": "Location adjacent to a schema definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "adminGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "SCALAR", + "description": "Location adjacent to a scalar definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "adminUsers", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "OBJECT", + "description": "Location adjacent to an object type definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "and", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", - "ofType": null - } - } - }, - "defaultValue": null, + "name": "FIELD_DEFINITION", + "description": "Location adjacent to a field definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "attachments", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "AttachmentArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ARGUMENT_DEFINITION", + "description": "Location adjacent to an argument definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "comments", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "CommentArgument", - "ofType": null - }, - "defaultValue": null, + "name": "INTERFACE", + "description": "Location adjacent to an interface definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "completed", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null - }, - "defaultValue": null, + "name": "UNION", + "description": "Location adjacent to a union definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "description", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ENUM", + "description": "Location adjacent to an enum definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, + "name": "ENUM_VALUE", + "description": "Location adjacent to an enum value definition.", "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "INPUT_OBJECT", + "description": "Location adjacent to an input object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "description": "Location adjacent to an input object field definition.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "BigDecimal", + "description": "An arbitrary precision signed decimal", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BigDecimalArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "between", "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "IdArgument", + "name": "BigDecimalRange", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "lastUpdate", + "name": "equal", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "greaterThan", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "not", + "name": "greaterThanEqual", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "or", + "name": "in", "description": null, "type": { "kind": "LIST", @@ -5171,111 +5868,113 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "potentialUsers", + "name": "isNull", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "priority", + "name": "lessThan", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "processId", + "name": "lessThanEqual", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "BigDecimal", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BigDecimalRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "processInstanceId", + "name": "from", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigDecimal", + "ofType": null + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "referenceName", + "name": "to", "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigDecimal", + "ofType": null + } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BooleanArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "started", + "name": "equal", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "state", + "name": "isNull", "description": null, "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], "interfaces": null, @@ -5283,86 +5982,64 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "UserTaskInstanceMeta", + "kind": "SCALAR", + "name": "Float", + "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). ", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FloatArgument", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "actualOwner", + "name": "between", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "FloatRange", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "adminGroups", + "name": "equal", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "adminUsers", + "name": "greaterThan", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "attachments", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Attachment", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "comments", + "name": "in", "description": null, - "args": [], "type": { "kind": "LIST", "name": null, @@ -5370,75 +6047,93 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Comment", + "kind": "SCALAR", + "name": "Float", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "completed", + "name": "isNull", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Boolean", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "lessThan", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Float", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "excludedUsers", + "name": "lessThanEqual", "description": null, - "args": [], "type": { - "kind": "LIST", + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "FloatRange", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "from", + "description": null, + "type": { + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "id", + "name": "to", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Float", "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "KogitoMetadata", + "description": null, + "fields": [ { "name": "lastUpdate", "description": null, @@ -5456,87 +6151,62 @@ "deprecationReason": null }, { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "potentialGroups", + "name": "processInstances", "description": null, "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ProcessInstanceMeta", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialUsers", + "name": "userTasks", "description": null, "args": [], "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "UserTaskInstanceMeta", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProcessInstanceMeta", + "description": null, + "fields": [ { - "name": "priority", + "name": "businessKey", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "processInstanceId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "createdBy", "description": null, "args": [], "type": { @@ -5548,23 +6218,19 @@ "deprecationReason": null }, { - "name": "started", + "name": "end", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "endpoint", "description": null, "args": [], "type": { @@ -5578,342 +6244,340 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceMetaArgument", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "actualOwner", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "adminGroups", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "adminUsers", + "name": "id", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "completed", + "name": "lastUpdate", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "parentProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "excludedUsers", + "name": "processId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "processName", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "roles", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialGroups", + "name": "rootProcessId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "potentialUsers", + "name": "rootProcessInstanceId", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArrayArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "serviceUrl", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processInstanceId", + "name": "start", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "IdArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "state", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProcessInstanceState", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "started", + "name": "updatedBy", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "DateArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", + "name": "version", "description": null, + "args": [], "type": { - "kind": "INPUT_OBJECT", - "name": "StringArgument", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "UserTaskInstanceOrderBy", + "kind": "OBJECT", + "name": "UserTaskInstanceMeta", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { "name": "actualOwner", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "completed", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "adminGroups", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdate", + "name": "adminUsers", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "attachments", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Attachment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priority", + "name": "comments", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "processId", + "name": "completed", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "referenceName", + "name": "description", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", + "kind": "SCALAR", + "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "started", + "name": "excludedUsers", "description": null, + "args": [], "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "state", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", + "name": "id", "description": null, "args": [], "type": { @@ -5929,51 +6593,47 @@ "deprecationReason": null }, { - "name": "description", + "name": "lastUpdate", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "isRepeatable", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "locations", + "name": "potentialGroups", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } } }, @@ -5981,180 +6641,39 @@ "deprecationReason": null }, { - "name": "args", + "name": "potentialUsers", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], + "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", + "name": "priority", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", + "name": "processInstanceId", "description": null, "args": [], "type": { @@ -6170,7 +6689,7 @@ "deprecationReason": null }, { - "name": "description", + "name": "referenceName", "description": null, "args": [], "type": { @@ -6182,7 +6701,7 @@ "deprecationReason": null }, { - "name": "isDeprecated", + "name": "started", "description": null, "args": [], "type": { @@ -6190,7 +6709,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "DateTime", "ofType": null } }, @@ -6198,13 +6717,17 @@ "deprecationReason": null }, { - "name": "deprecationReason", + "name": "state", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -6216,405 +6739,438 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ + "kind": "INPUT_OBJECT", + "name": "KogitoMetadataArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "name", + "name": "lastUpdate", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "processInstances", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceMetaArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "args", + "name": "userTasks", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceMetaArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceMetaArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "businessKey", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "createdBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "end", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "endpoint", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "parentProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "processName", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "roles", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootProcessInstanceId", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "start", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "ProcessInstanceStateArgument", + "ofType": null + }, + "defaultValue": null }, { - "name": "type", + "name": "updatedBy", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UserTaskInstanceMetaArgument", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "actualOwner", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isDeprecated", + "name": "adminGroups", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "deprecationReason", + "name": "adminUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ + "defaultValue": null + }, { - "name": "name", + "name": "completed", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "DateArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { "name": "description", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "type", + "name": "excludedUsers", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], + "name": "id", + "description": null, "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "IdArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "isDeprecated", + "name": "name", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "deprecationReason", + "name": "potentialGroups", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ + "defaultValue": null + }, { - "name": "description", + "name": "potentialUsers", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "INPUT_OBJECT", + "name": "StringArrayArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], + "name": "priority", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], + "name": "processInstanceId", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "IdArgument", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], + "name": "referenceName", + "description": null, "type": { - "kind": "OBJECT", - "name": "__Type", + "kind": "INPUT_OBJECT", + "name": "StringArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], + "name": "started", + "description": null, "type": { - "kind": "OBJECT", - "name": "__Type", + "kind": "INPUT_OBJECT", + "name": "DateArgument", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], + "name": "state", + "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } + "kind": "INPUT_OBJECT", + "name": "StringArgument", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "KogitoMetadataOrderBy", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "lastUpdate", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderBy", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Long", + "description": "A 64-bit signed integer", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ + "kind": "INPUT_OBJECT", + "name": "LongArgument", + "description": null, + "fields": null, + "inputFields": [ { - "name": "kind", + "name": "between", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } + "kind": "INPUT_OBJECT", + "name": "LongRange", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "name", + "name": "equal", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "description", + "name": "greaterThan", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "specifiedByUrl", + "name": "greaterThanEqual", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Long", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "fields", + "name": "in", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { "kind": "LIST", "name": null, @@ -6622,224 +7178,110 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "__Field", + "kind": "SCALAR", + "name": "Long", "ofType": null } } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "interfaces", + "name": "isNull", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "possibleTypes", + "name": "lessThan", "description": null, - "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "enumValues", + "name": "lessThanEqual", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Long", + "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "LongRange", + "description": null, + "fields": null, + "inputFields": [ { - "name": "inputFields", + "name": "from", "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } + "kind": "SCALAR", + "name": "Long", + "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null }, { - "name": "ofType", + "name": "to", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + } }, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], + "enumValues": null, "possibleTypes": null } ], "directives": [ { "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "isRepeatable": false, + "description": "Marks the field, argument, input field or enum value as deprecated", "locations": ["ARGUMENT_DEFINITION", "ENUM_VALUE", "FIELD_DEFINITION", "INPUT_FIELD_DEFINITION"], "args": [ { "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + "description": "The reason for the deprecation", "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": "\"No longer supported\"", - "isDeprecated": false, - "deprecationReason": null + "defaultValue": "\"No longer supported\"" } ] }, { "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "isRepeatable": false, + "description": "Directs the executor to include this field or fragment only when the `if` argument is true", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { @@ -6854,16 +7296,13 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] }, { "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "isRepeatable": false, "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { @@ -6878,16 +7317,13 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] }, { "name": "specifiedBy", "description": "Exposes a URL that specifies the behaviour of this scalar.", - "isRepeatable": false, "locations": ["SCALAR"], "args": [ { @@ -6902,9 +7338,7 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "defaultValue": null } ] } diff --git a/packages/runtime-tools-swf-gateway-api/src/graphql/queries.tsx b/packages/runtime-tools-swf-gateway-api/src/graphql/queries.tsx index 7ee7dd26891..cae532f1b52 100644 --- a/packages/runtime-tools-swf-gateway-api/src/graphql/queries.tsx +++ b/packages/runtime-tools-swf-gateway-api/src/graphql/queries.tsx @@ -400,15 +400,13 @@ export const GET_PROCESS_INSTANCE_SVG = gql` } `; -export const GET_PROCESS_INSTANCE_NODES = gql` - query getProcessInstanceNodeDefinitions($processId: String) { - ProcessInstances(where: { id: { equal: $processId } }) { - nodeDefinitions { +export const GET_PROCESS_DEFINITION_NODES = gql` + query getProcessDefinitionNodes($processId: String) { + ProcessDefinitions(where: { id: { equal: $processId } }) { + nodes { id name type - uniqueId - nodeDefinitionId } } } diff --git a/packages/runtime-tools-swf-gateway-api/src/graphql/types.tsx b/packages/runtime-tools-swf-gateway-api/src/graphql/types.tsx index 95548dac4ed..a3395882cbd 100644 --- a/packages/runtime-tools-swf-gateway-api/src/graphql/types.tsx +++ b/packages/runtime-tools-swf-gateway-api/src/graphql/types.tsx @@ -21,20 +21,13 @@ import gql from "graphql-tag"; import * as ApolloReactCommon from "@apollo/react-common"; import * as ApolloReactHooks from "@apollo/react-hooks"; - export namespace GraphQL { export type Maybe = T | null; export type InputMaybe = Maybe; - export type Exact = { - [K in keyof T]: T[K]; - }; - export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; - }; - export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; - }; - const defaultOptions = {}; + export type Exact = { [K in keyof T]: T[K] }; + export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; + export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; + const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; @@ -42,40 +35,80 @@ export namespace GraphQL { Boolean: boolean; Int: number; Float: number; - /** An ISO-8601 compliant DateTime Scalar */ DateTime: any; + JSON: any; + BigDecimal: any; + Long: any; }; - export type Attachment = { - __typename?: "Attachment"; - content: Scalars["String"]; - id: Scalars["String"]; - name: Scalars["String"]; - updatedAt: Scalars["DateTime"]; - updatedBy: Scalars["String"]; + export type Query = { + __typename?: "Query"; + Jobs?: Maybe>>; + ProcessDefinitions?: Maybe>>; + ProcessInstances?: Maybe>>; + UserTaskInstances?: Maybe>>; }; - export type AttachmentArgument = { - id?: InputMaybe; - name?: InputMaybe; + export type QueryJobsArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type BooleanArgument = { - equal?: InputMaybe; - isNull?: InputMaybe; + export type QueryProcessDefinitionsArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type Comment = { - __typename?: "Comment"; - content: Scalars["String"]; - id: Scalars["String"]; - updatedAt: Scalars["DateTime"]; - updatedBy: Scalars["String"]; + export type QueryProcessInstancesArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; }; - export type CommentArgument = { + export type QueryUserTaskInstancesArgs = { + orderBy?: InputMaybe; + pagination?: InputMaybe; + where?: InputMaybe; + }; + + export type JobOrderBy = { + executionCounter?: InputMaybe; + expirationTime?: InputMaybe; + lastUpdate?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + retries?: InputMaybe; + rootProcessId?: InputMaybe; + status?: InputMaybe; + }; + + export enum OrderBy { + Asc = "ASC", + Desc = "DESC", + } + + export type Pagination = { + limit?: InputMaybe; + offset?: InputMaybe; + }; + + export type JobArgument = { + and?: InputMaybe>; + expirationTime?: InputMaybe; id?: InputMaybe; - name?: InputMaybe; + lastUpdate?: InputMaybe; + nodeInstanceId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + priority?: InputMaybe; + processId?: InputMaybe; + processInstanceId?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + scheduledId?: InputMaybe; + status?: InputMaybe; }; export type DateArgument = { @@ -99,6 +132,42 @@ export namespace GraphQL { isNull?: InputMaybe; }; + export type NumericArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type NumericRange = { + from: Scalars["Int"]; + to: Scalars["Int"]; + }; + + export type StringArgument = { + equal?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + like?: InputMaybe; + }; + + export type JobStatusArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + + export enum JobStatus { + Canceled = "CANCELED", + Error = "ERROR", + Executed = "EXECUTED", + Retry = "RETRY", + Scheduled = "SCHEDULED", + } + export type Job = { __typename?: "Job"; callbackEndpoint?: Maybe; @@ -120,69 +189,109 @@ export namespace GraphQL { status: JobStatus; }; - export type JobArgument = { - and?: InputMaybe>; - expirationTime?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - nodeInstanceId?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - priority?: InputMaybe; - processId?: InputMaybe; - processInstanceId?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - scheduledId?: InputMaybe; - status?: InputMaybe; + export type ProcessDefinitionOrderBy = { + id?: InputMaybe; + name?: InputMaybe; + version?: InputMaybe; }; - export type JobOrderBy = { - executionCounter?: InputMaybe; - expirationTime?: InputMaybe; - lastUpdate?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - retries?: InputMaybe; - rootProcessId?: InputMaybe; - status?: InputMaybe; + export type ProcessDefinitionArgument = { + and?: InputMaybe>; + id?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + version?: InputMaybe; }; - export enum JobStatus { - Canceled = "CANCELED", - Error = "ERROR", - Executed = "EXECUTED", - Retry = "RETRY", - Scheduled = "SCHEDULED", - } + export type ProcessDefinition = { + __typename?: "ProcessDefinition"; + addons?: Maybe>; + annotations?: Maybe>>; + description?: Maybe; + endpoint?: Maybe; + id: Scalars["String"]; + metadata?: Maybe; + name?: Maybe; + nodes?: Maybe>; + roles?: Maybe>; + serviceUrl?: Maybe; + source?: Maybe; + type?: Maybe; + version?: Maybe; + }; - export type JobStatusArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; + export type Node = { + __typename?: "Node"; + id: Scalars["String"]; + metadata: NodeMetadata; + name: Scalars["String"]; + type: Scalars["String"]; + uniqueId: Scalars["String"]; }; - export type KogitoMetadata = { - __typename?: "KogitoMetadata"; - lastUpdate: Scalars["DateTime"]; - processInstances?: Maybe>>; - userTasks?: Maybe>>; + export type NodeMetadata = { + __typename?: "NodeMetadata"; + action?: Maybe; + branch?: Maybe; + state?: Maybe; + UniqueId: Scalars["String"]; }; - export type KogitoMetadataArgument = { + export type ProcessInstanceOrderBy = { + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + error?: InputMaybe; + lastUpdate?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + rootProcessId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; + }; + + export type ProcessInstanceErrorOrderBy = { + message?: InputMaybe; + nodeDefinitionId?: InputMaybe; + }; + + export type ProcessInstanceArgument = { + addons?: InputMaybe; + and?: InputMaybe>; + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + endpoint?: InputMaybe; + error?: InputMaybe; + id?: InputMaybe; lastUpdate?: InputMaybe; - processInstances?: InputMaybe; - userTasks?: InputMaybe; + milestones?: InputMaybe; + nodes?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + parentProcessInstanceId?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + roles?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; }; - export type KogitoMetadataOrderBy = { - lastUpdate?: InputMaybe; + export type StringArrayArgument = { + contains?: InputMaybe; + containsAll?: InputMaybe>; + containsAny?: InputMaybe>; + isNull?: InputMaybe; }; - export type Milestone = { - __typename?: "Milestone"; - id: Scalars["String"]; - name: Scalars["String"]; - status: MilestoneStatus; + export type ProcessInstanceErrorArgument = { + message?: InputMaybe; + nodeDefinitionId?: InputMaybe; }; export type MilestoneArgument = { @@ -191,30 +300,210 @@ export namespace GraphQL { status?: InputMaybe; }; + export type MilestoneStatusArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + export enum MilestoneStatus { Active = "ACTIVE", Available = "AVAILABLE", Completed = "COMPLETED", } - export type MilestoneStatusArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; + export type NodeInstanceArgument = { + definitionId?: InputMaybe; + enter?: InputMaybe; + exit?: InputMaybe; + id?: InputMaybe; + name?: InputMaybe; + nodeId?: InputMaybe; + type?: InputMaybe; }; - export type Mutation = { - __typename?: "Mutation"; - JobCancel?: Maybe; - JobReschedule?: Maybe; - NodeInstanceCancel?: Maybe; - NodeInstanceRetrigger?: Maybe; - NodeInstanceTrigger?: Maybe; - ProcessInstanceAbort?: Maybe; - ProcessInstanceRetry?: Maybe; - ProcessInstanceSkip?: Maybe; - ProcessInstanceUpdateVariables?: Maybe; - UserTaskInstanceAttachmentCreate?: Maybe; - UserTaskInstanceAttachmentDelete?: Maybe; + export type ProcessInstanceStateArgument = { + equal?: InputMaybe; + in?: InputMaybe>>; + }; + + export enum ProcessInstanceState { + Aborted = "ABORTED", + Active = "ACTIVE", + Completed = "COMPLETED", + Error = "ERROR", + Pending = "PENDING", + Suspended = "SUSPENDED", + } + + export type ProcessInstance = { + __typename?: "ProcessInstance"; + addons?: Maybe>; + businessKey?: Maybe; + childProcessInstances?: Maybe>; + createdBy?: Maybe; + definition?: Maybe; + diagram?: Maybe; + end?: Maybe; + endpoint: Scalars["String"]; + error?: Maybe; + id: Scalars["String"]; + identity?: Maybe; + lastUpdate: Scalars["DateTime"]; + milestones?: Maybe>; + nodeDefinitions?: Maybe>; + nodes?: Maybe>; + parentProcessInstance?: Maybe; + parentProcessInstanceId?: Maybe; + processId: Scalars["String"]; + processName?: Maybe; + roles?: Maybe>; + rootProcessId?: Maybe; + rootProcessInstanceId?: Maybe; + serviceUrl?: Maybe; + source?: Maybe; + start?: Maybe; + state?: Maybe; + updatedBy?: Maybe; + variables?: Maybe; + version?: Maybe; + }; + + export type ProcessInstanceError = { + __typename?: "ProcessInstanceError"; + message?: Maybe; + nodeDefinitionId: Scalars["String"]; + }; + + export type Milestone = { + __typename?: "Milestone"; + id: Scalars["String"]; + name: Scalars["String"]; + status: MilestoneStatus; + }; + + export type NodeInstance = { + __typename?: "NodeInstance"; + definitionId: Scalars["String"]; + enter: Scalars["DateTime"]; + exit?: Maybe; + id: Scalars["String"]; + name: Scalars["String"]; + nodeId: Scalars["String"]; + type: Scalars["String"]; + }; + + export type UserTaskInstanceOrderBy = { + actualOwner?: InputMaybe; + completed?: InputMaybe; + description?: InputMaybe; + lastUpdate?: InputMaybe; + name?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + referenceName?: InputMaybe; + started?: InputMaybe; + state?: InputMaybe; + }; + + export type UserTaskInstanceArgument = { + actualOwner?: InputMaybe; + adminGroups?: InputMaybe; + adminUsers?: InputMaybe; + and?: InputMaybe>; + attachments?: InputMaybe; + comments?: InputMaybe; + completed?: InputMaybe; + description?: InputMaybe; + excludedUsers?: InputMaybe; + id?: InputMaybe; + lastUpdate?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + potentialGroups?: InputMaybe; + potentialUsers?: InputMaybe; + priority?: InputMaybe; + processId?: InputMaybe; + processInstanceId?: InputMaybe; + referenceName?: InputMaybe; + started?: InputMaybe; + state?: InputMaybe; + }; + + export type AttachmentArgument = { + id?: InputMaybe; + name?: InputMaybe; + }; + + export type CommentArgument = { + id?: InputMaybe; + name?: InputMaybe; + }; + + export type UserTaskInstance = { + __typename?: "UserTaskInstance"; + actualOwner?: Maybe; + adminGroups?: Maybe>; + adminUsers?: Maybe>; + attachments?: Maybe>; + comments?: Maybe>; + completed?: Maybe; + description?: Maybe; + endpoint?: Maybe; + excludedUsers?: Maybe>; + id: Scalars["String"]; + inputs?: Maybe; + lastUpdate: Scalars["DateTime"]; + name?: Maybe; + outputs?: Maybe; + potentialGroups?: Maybe>; + potentialUsers?: Maybe>; + priority?: Maybe; + processId?: Maybe; + processInstanceId: Scalars["String"]; + referenceName?: Maybe; + rootProcessId?: Maybe; + rootProcessInstanceId?: Maybe; + schema?: Maybe; + started?: Maybe; + state?: Maybe; + }; + + export type UserTaskInstanceSchemaArgs = { + groups?: InputMaybe>>; + user?: InputMaybe; + }; + + export type Attachment = { + __typename?: "Attachment"; + content: Scalars["String"]; + id: Scalars["String"]; + name: Scalars["String"]; + updatedAt: Scalars["DateTime"]; + updatedBy: Scalars["String"]; + }; + + export type Comment = { + __typename?: "Comment"; + content: Scalars["String"]; + id: Scalars["String"]; + updatedAt: Scalars["DateTime"]; + updatedBy: Scalars["String"]; + }; + + export type Mutation = { + __typename?: "Mutation"; + JobCancel?: Maybe; + JobReschedule?: Maybe; + NodeInstanceCancel?: Maybe; + NodeInstanceRetrigger?: Maybe; + NodeInstanceTrigger?: Maybe; + ProcessInstanceAbort?: Maybe; + ProcessInstanceRetry?: Maybe; + ProcessInstanceSkip?: Maybe; + ProcessInstanceUpdateVariables?: Maybe; + UserTaskInstanceAttachmentCreate?: Maybe; + UserTaskInstanceAttachmentDelete?: Maybe; UserTaskInstanceAttachmentUpdate?: Maybe; UserTaskInstanceCommentCreate?: Maybe; UserTaskInstanceCommentDelete?: Maybe; @@ -270,275 +559,54 @@ export namespace GraphQL { uri?: InputMaybe; user?: InputMaybe; }; - - export type MutationUserTaskInstanceAttachmentDeleteArgs = { - attachmentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceAttachmentUpdateArgs = { - attachmentId?: InputMaybe; - groups?: InputMaybe>>; - name?: InputMaybe; - uri?: InputMaybe; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentCreateArgs = { - comment?: InputMaybe; - groups?: InputMaybe>>; - taskId?: InputMaybe; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentDeleteArgs = { - commentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceCommentUpdateArgs = { - comment?: InputMaybe; - commentId?: InputMaybe; - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type MutationUserTaskInstanceUpdateArgs = { - actualOwner?: InputMaybe; - adminGroups?: InputMaybe>; - adminUsers?: InputMaybe>; - description?: InputMaybe; - excludedUsers?: InputMaybe>; - groups?: InputMaybe>>; - inputParams?: InputMaybe; - potentialGroups?: InputMaybe>; - potentialUsers?: InputMaybe>; - priority?: InputMaybe; - taskId?: InputMaybe; - user?: InputMaybe; - }; - - export type Node = { - __typename?: "Node"; - id: Scalars["String"]; - name: Scalars["String"]; - nodeDefinitionId: Scalars["String"]; - type: Scalars["String"]; - uniqueId: Scalars["String"]; - }; - - export type NodeInstance = { - __typename?: "NodeInstance"; - definitionId: Scalars["String"]; - enter: Scalars["DateTime"]; - exit?: Maybe; - id: Scalars["String"]; - name: Scalars["String"]; - nodeId: Scalars["String"]; - type: Scalars["String"]; - }; - - export type NodeInstanceArgument = { - definitionId?: InputMaybe; - enter?: InputMaybe; - exit?: InputMaybe; - id?: InputMaybe; - name?: InputMaybe; - nodeId?: InputMaybe; - type?: InputMaybe; - }; - - export type NumericArgument = { - between?: InputMaybe; - equal?: InputMaybe; - greaterThan?: InputMaybe; - greaterThanEqual?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - lessThan?: InputMaybe; - lessThanEqual?: InputMaybe; - }; - - export type NumericRange = { - from: Scalars["Int"]; - to: Scalars["Int"]; - }; - - export enum OrderBy { - Asc = "ASC", - Desc = "DESC", - } - - export type Pagination = { - limit?: InputMaybe; - offset?: InputMaybe; - }; - - export type ProcessInstance = { - __typename?: "ProcessInstance"; - addons?: Maybe>; - businessKey?: Maybe; - childProcessInstances?: Maybe>; - diagram?: Maybe; - end?: Maybe; - endpoint: Scalars["String"]; - error?: Maybe; - id: Scalars["String"]; - lastUpdate: Scalars["DateTime"]; - milestones?: Maybe>; - nodeDefinitions?: Maybe>; - nodes: Array; - parentProcessInstance?: Maybe; - parentProcessInstanceId?: Maybe; - processId: Scalars["String"]; - processName?: Maybe; - roles?: Maybe>; - rootProcessId?: Maybe; - rootProcessInstanceId?: Maybe; - serviceUrl?: Maybe; - source?: Maybe; - start: Scalars["DateTime"]; - state: ProcessInstanceState; - variables?: Maybe; - }; - - export type ProcessInstanceArgument = { - addons?: InputMaybe; - and?: InputMaybe>; - businessKey?: InputMaybe; - end?: InputMaybe; - endpoint?: InputMaybe; - error?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - milestones?: InputMaybe; - nodes?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - parentProcessInstanceId?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - roles?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export type ProcessInstanceError = { - __typename?: "ProcessInstanceError"; - message?: Maybe; - nodeDefinitionId: Scalars["String"]; - }; - - export type ProcessInstanceErrorArgument = { - message?: InputMaybe; - nodeDefinitionId?: InputMaybe; - }; - - export type ProcessInstanceErrorOrderBy = { - message?: InputMaybe; - nodeDefinitionId?: InputMaybe; - }; - - export type ProcessInstanceMeta = { - __typename?: "ProcessInstanceMeta"; - businessKey?: Maybe; - end?: Maybe; - endpoint: Scalars["String"]; - id: Scalars["String"]; - lastUpdate: Scalars["DateTime"]; - parentProcessInstanceId?: Maybe; - processId: Scalars["String"]; - processName?: Maybe; - roles?: Maybe>; - rootProcessId?: Maybe; - rootProcessInstanceId?: Maybe; - serviceUrl?: Maybe; - start: Scalars["DateTime"]; - state: ProcessInstanceState; - }; - - export type ProcessInstanceMetaArgument = { - businessKey?: InputMaybe; - end?: InputMaybe; - endpoint?: InputMaybe; - id?: InputMaybe; - parentProcessInstanceId?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - roles?: InputMaybe; - rootProcessId?: InputMaybe; - rootProcessInstanceId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export type ProcessInstanceOrderBy = { - businessKey?: InputMaybe; - end?: InputMaybe; - error?: InputMaybe; - lastUpdate?: InputMaybe; - processId?: InputMaybe; - processName?: InputMaybe; - rootProcessId?: InputMaybe; - start?: InputMaybe; - state?: InputMaybe; - }; - - export enum ProcessInstanceState { - Aborted = "ABORTED", - Active = "ACTIVE", - Completed = "COMPLETED", - Error = "ERROR", - Pending = "PENDING", - Suspended = "SUSPENDED", - } - - export type ProcessInstanceStateArgument = { - equal?: InputMaybe; - in?: InputMaybe>>; - }; - - export type Query = { - __typename?: "Query"; - Jobs?: Maybe>>; - ProcessInstances?: Maybe>>; - UserTaskInstances?: Maybe>>; + + export type MutationUserTaskInstanceAttachmentDeleteArgs = { + attachmentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; }; - export type QueryJobsArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceAttachmentUpdateArgs = { + attachmentId?: InputMaybe; + groups?: InputMaybe>>; + name?: InputMaybe; + uri?: InputMaybe; + user?: InputMaybe; }; - export type QueryProcessInstancesArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceCommentCreateArgs = { + comment?: InputMaybe; + groups?: InputMaybe>>; + taskId?: InputMaybe; + user?: InputMaybe; }; - export type QueryUserTaskInstancesArgs = { - orderBy?: InputMaybe; - pagination?: InputMaybe; - where?: InputMaybe; + export type MutationUserTaskInstanceCommentDeleteArgs = { + commentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; }; - export type StringArgument = { - equal?: InputMaybe; - in?: InputMaybe>; - isNull?: InputMaybe; - like?: InputMaybe; + export type MutationUserTaskInstanceCommentUpdateArgs = { + comment?: InputMaybe; + commentId?: InputMaybe; + groups?: InputMaybe>>; + user?: InputMaybe; }; - export type StringArrayArgument = { - contains?: InputMaybe; - containsAll?: InputMaybe>; - containsAny?: InputMaybe>; - isNull?: InputMaybe; + export type MutationUserTaskInstanceUpdateArgs = { + actualOwner?: InputMaybe; + adminGroups?: InputMaybe>; + adminUsers?: InputMaybe>; + description?: InputMaybe; + excludedUsers?: InputMaybe>; + groups?: InputMaybe>>; + inputParams?: InputMaybe; + potentialGroups?: InputMaybe>; + potentialUsers?: InputMaybe>; + priority?: InputMaybe; + taskId?: InputMaybe; + user?: InputMaybe; }; export type Subscription = { @@ -551,63 +619,69 @@ export namespace GraphQL { UserTaskInstanceUpdated: UserTaskInstance; }; - export type UserTaskInstance = { - __typename?: "UserTaskInstance"; - actualOwner?: Maybe; - adminGroups?: Maybe>; - adminUsers?: Maybe>; - attachments?: Maybe>; - comments?: Maybe>; - completed?: Maybe; - description?: Maybe; - endpoint?: Maybe; - excludedUsers?: Maybe>; + export type BigDecimalArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type BigDecimalRange = { + from: Scalars["BigDecimal"]; + to: Scalars["BigDecimal"]; + }; + + export type BooleanArgument = { + equal?: InputMaybe; + isNull?: InputMaybe; + }; + + export type FloatArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type FloatRange = { + from: Scalars["Float"]; + to: Scalars["Float"]; + }; + + export type KogitoMetadata = { + __typename?: "KogitoMetadata"; + lastUpdate: Scalars["DateTime"]; + processInstances?: Maybe>>; + userTasks?: Maybe>>; + }; + + export type ProcessInstanceMeta = { + __typename?: "ProcessInstanceMeta"; + businessKey?: Maybe; + createdBy?: Maybe; + end?: Maybe; + endpoint: Scalars["String"]; id: Scalars["String"]; - inputs?: Maybe; lastUpdate: Scalars["DateTime"]; - name?: Maybe; - outputs?: Maybe; - potentialGroups?: Maybe>; - potentialUsers?: Maybe>; - priority?: Maybe; + parentProcessInstanceId?: Maybe; processId: Scalars["String"]; - processInstanceId: Scalars["String"]; - referenceName?: Maybe; + processName?: Maybe; + roles?: Maybe>; rootProcessId?: Maybe; rootProcessInstanceId?: Maybe; - schema?: Maybe; - started: Scalars["DateTime"]; - state: Scalars["String"]; - }; - - export type UserTaskInstanceSchemaArgs = { - groups?: InputMaybe>>; - user?: InputMaybe; - }; - - export type UserTaskInstanceArgument = { - actualOwner?: InputMaybe; - adminGroups?: InputMaybe; - adminUsers?: InputMaybe; - and?: InputMaybe>; - attachments?: InputMaybe; - comments?: InputMaybe; - completed?: InputMaybe; - description?: InputMaybe; - excludedUsers?: InputMaybe; - id?: InputMaybe; - lastUpdate?: InputMaybe; - name?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>; - potentialGroups?: InputMaybe; - potentialUsers?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - processInstanceId?: InputMaybe; - referenceName?: InputMaybe; - started?: InputMaybe; - state?: InputMaybe; + serviceUrl?: Maybe; + start: Scalars["DateTime"]; + state: ProcessInstanceState; + updatedBy?: Maybe; + version?: Maybe; }; export type UserTaskInstanceMeta = { @@ -632,6 +706,29 @@ export namespace GraphQL { state: Scalars["String"]; }; + export type KogitoMetadataArgument = { + lastUpdate?: InputMaybe; + processInstances?: InputMaybe; + userTasks?: InputMaybe; + }; + + export type ProcessInstanceMetaArgument = { + businessKey?: InputMaybe; + createdBy?: InputMaybe; + end?: InputMaybe; + endpoint?: InputMaybe; + id?: InputMaybe; + parentProcessInstanceId?: InputMaybe; + processId?: InputMaybe; + processName?: InputMaybe; + roles?: InputMaybe; + rootProcessId?: InputMaybe; + rootProcessInstanceId?: InputMaybe; + start?: InputMaybe; + state?: InputMaybe; + updatedBy?: InputMaybe; + }; + export type UserTaskInstanceMetaArgument = { actualOwner?: InputMaybe; adminGroups?: InputMaybe; @@ -650,43 +747,46 @@ export namespace GraphQL { state?: InputMaybe; }; - export type UserTaskInstanceOrderBy = { - actualOwner?: InputMaybe; - completed?: InputMaybe; - description?: InputMaybe; + export type KogitoMetadataOrderBy = { lastUpdate?: InputMaybe; - name?: InputMaybe; - priority?: InputMaybe; - processId?: InputMaybe; - referenceName?: InputMaybe; - started?: InputMaybe; - state?: InputMaybe; + }; + + export type LongArgument = { + between?: InputMaybe; + equal?: InputMaybe; + greaterThan?: InputMaybe; + greaterThanEqual?: InputMaybe; + in?: InputMaybe>; + isNull?: InputMaybe; + lessThan?: InputMaybe; + lessThanEqual?: InputMaybe; + }; + + export type LongRange = { + from: Scalars["Long"]; + to: Scalars["Long"]; }; /** * A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. * - * In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor. + * In some cases, you need to provide options to alter GraphQL's execution behavior + * in ways field arguments will not suffice, such as conditionally including or + * skipping a field. Directives provide this by describing additional information + * to the executor. */ export type __Directive = { __typename?: "__Directive"; name: Scalars["String"]; description?: Maybe; - isRepeatable: Scalars["Boolean"]; locations: Array<__DirectiveLocation>; args: Array<__InputValue>; }; /** - * A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. - * - * In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor. + * A Directive can be adjacent to many parts of the GraphQL language, a + * __DirectiveLocation describes one such possible adjacencies. */ - export type __DirectiveArgsArgs = { - includeDeprecated?: InputMaybe; - }; - - /** A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies. */ export enum __DirectiveLocation { /** Location adjacent to a query operation. */ Query = "QUERY", @@ -728,7 +828,11 @@ export namespace GraphQL { InputFieldDefinition = "INPUT_FIELD_DEFINITION", } - /** One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string. */ + /** + * One possible value for a given Enum. Enum values are unique values, not a + * placeholder for a string or numeric value. However an Enum value is returned in + * a JSON response as a string. + */ export type __EnumValue = { __typename?: "__EnumValue"; name: Scalars["String"]; @@ -737,7 +841,10 @@ export namespace GraphQL { deprecationReason?: Maybe; }; - /** Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. */ + /** + * Object and Interface types are described by a list of Fields, each of which has + * a name, potentially a list of arguments, and a return type. + */ export type __Field = { __typename?: "__Field"; name: Scalars["String"]; @@ -748,12 +855,11 @@ export namespace GraphQL { deprecationReason?: Maybe; }; - /** Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type. */ - export type __FieldArgsArgs = { - includeDeprecated?: InputMaybe; - }; - - /** Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value. */ + /** + * Arguments provided to Fields or Directives and the input fields of an + * InputObject are represented as Input Values which describe their type and + * optionally a default value. + */ export type __InputValue = { __typename?: "__InputValue"; name: Scalars["String"]; @@ -761,14 +867,15 @@ export namespace GraphQL { type: __Type; /** A GraphQL-formatted string representing the default value for this input value. */ defaultValue?: Maybe; - isDeprecated: Scalars["Boolean"]; - deprecationReason?: Maybe; }; - /** A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations. */ + /** + * A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all + * available types and directives on the server, as well as the entry points for + * query, mutation, and subscription operations. + */ export type __Schema = { __typename?: "__Schema"; - description?: Maybe; /** A list of all types supported by this server. */ types: Array<__Type>; /** The type that query operations will be rooted at. */ @@ -782,16 +889,20 @@ export namespace GraphQL { }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __Type = { __typename?: "__Type"; kind: __TypeKind; name?: Maybe; description?: Maybe; - specifiedByUrl?: Maybe; fields?: Maybe>; interfaces?: Maybe>; possibleTypes?: Maybe>; @@ -801,39 +912,40 @@ export namespace GraphQL { }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __TypeFieldsArgs = { includeDeprecated?: InputMaybe; }; /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. + * The fundamental unit of any GraphQL Schema is the type. There are many kinds of + * types in GraphQL as represented by the `__TypeKind` enum. + * + * Depending on the kind of a type, certain fields describe information about that + * type. Scalar types provide no information beyond a name and description, while + * Enum types provide their values. Object and Interface types provide the fields + * they describe. Abstract types, Union and Interface, provide the Object types + * possible at runtime. List and NonNull types compose other types. */ export type __TypeEnumValuesArgs = { includeDeprecated?: InputMaybe; }; - /** - * The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum. - * - * Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types. - */ - export type __TypeInputFieldsArgs = { - includeDeprecated?: InputMaybe; - }; - /** An enum describing what kind of type a given `__Type` is. */ export enum __TypeKind { /** Indicates this type is a scalar. */ Scalar = "SCALAR", /** Indicates this type is an object. `fields` and `interfaces` are valid fields. */ Object = "OBJECT", - /** Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields. */ + /** Indicates this type is an interface. `fields` and `possibleTypes` are valid fields. */ Interface = "INTERFACE", /** Indicates this type is a union. `possibleTypes` is a valid field. */ Union = "UNION", @@ -856,36 +968,22 @@ export namespace GraphQL { export type GetProcessInstancesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - rootProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - addons?: Array | null | undefined; - businessKey?: string | null | undefined; - serviceUrl?: string | null | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + parentProcessInstanceId?: string | null; + rootProcessInstanceId?: string | null; + roles?: Array | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + addons?: Array | null; + businessKey?: string | null; + serviceUrl?: string | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + } | null> | null; }; export type GetChildInstancesQueryVariables = Exact<{ @@ -894,36 +992,22 @@ export namespace GraphQL { export type GetChildInstancesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - rootProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - serviceUrl?: string | null | undefined; - addons?: Array | null | undefined; - businessKey?: string | null | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + parentProcessInstanceId?: string | null; + rootProcessInstanceId?: string | null; + roles?: Array | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + serviceUrl?: string | null; + addons?: Array | null; + businessKey?: string | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + } | null> | null; }; export type GetProcessInstanceByIdQueryVariables = Exact<{ @@ -932,76 +1016,48 @@ export namespace GraphQL { export type GetProcessInstanceByIdQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - id: string; - processId: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - parentProcessInstanceId?: string | null | undefined; - roles?: Array | null | undefined; - variables?: string | null | undefined; - state: ProcessInstanceState; - start: any; - lastUpdate: any; - end?: any | null | undefined; - addons?: Array | null | undefined; - endpoint: string; - serviceUrl?: string | null | undefined; - source?: string | null | undefined; - parentProcessInstance?: - | { - __typename?: "ProcessInstance"; - id: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - } - | null - | undefined; - error?: - | { - __typename?: "ProcessInstanceError"; - nodeDefinitionId: string; - message?: string | null | undefined; - } - | null - | undefined; - childProcessInstances?: - | Array<{ - __typename?: "ProcessInstance"; - id: string; - processName?: string | null | undefined; - businessKey?: string | null | undefined; - }> - | null - | undefined; - nodes: Array<{ - __typename?: "NodeInstance"; - id: string; - nodeId: string; - name: string; - enter: any; - exit?: any | null | undefined; - type: string; - definitionId: string; - }>; - milestones?: - | Array<{ - __typename?: "Milestone"; - id: string; - name: string; - status: MilestoneStatus; - }> - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processId: string; + processName?: string | null; + businessKey?: string | null; + parentProcessInstanceId?: string | null; + roles?: Array | null; + variables?: any | null; + state?: ProcessInstanceState | null; + start?: any | null; + lastUpdate: any; + end?: any | null; + addons?: Array | null; + endpoint: string; + serviceUrl?: string | null; + source?: string | null; + parentProcessInstance?: { + __typename?: "ProcessInstance"; + id: string; + processName?: string | null; + businessKey?: string | null; + } | null; + error?: { __typename?: "ProcessInstanceError"; nodeDefinitionId: string; message?: string | null } | null; + childProcessInstances?: Array<{ + __typename?: "ProcessInstance"; + id: string; + processName?: string | null; + businessKey?: string | null; + }> | null; + nodes?: Array<{ + __typename?: "NodeInstance"; + id: string; + nodeId: string; + name: string; + enter: any; + exit?: any | null; + type: string; + definitionId: string; + }> | null; + milestones?: Array<{ __typename?: "Milestone"; id: string; name: string; status: MilestoneStatus }> | null; + } | null> | null; }; export type GetColumnPickerAttributesQueryVariables = Exact<{ @@ -1010,37 +1066,24 @@ export namespace GraphQL { export type GetColumnPickerAttributesQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; + }; + }> | null; + } | null; }; export type GetQueryTypesQueryVariables = Exact<{ [key: string]: never }>; @@ -1051,32 +1094,18 @@ export namespace GraphQL { __typename?: "__Schema"; queryType: Array<{ __typename?: "__Type"; - name?: string | null | undefined; + name?: string | null; kind: __TypeKind; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - }; - }> - | null - | undefined; + fields?: Array<{ + __typename?: "__Field"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; name?: string | null; kind: __TypeKind }; + }> | null; }>; }; }; @@ -1085,39 +1114,20 @@ export namespace GraphQL { export type GetQueryFieldsQuery = { __typename?: "Query"; - __type?: - | { - __typename?: "__Type"; - name?: string | null | undefined; - fields?: - | Array<{ - __typename?: "__Field"; - name: string; - args: Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - kind: __TypeKind; - name?: string | null | undefined; - }; - }>; - type: { - __typename?: "__Type"; - ofType?: - | { - __typename?: "__Type"; - name?: string | null | undefined; - } - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + __type?: { + __typename?: "__Type"; + name?: string | null; + fields?: Array<{ + __typename?: "__Field"; + name: string; + args: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; kind: __TypeKind; name?: string | null }; + }>; + type: { __typename?: "__Type"; ofType?: { __typename?: "__Type"; name?: string | null } | null }; + }> | null; + } | null; }; export type GetInputFieldsFromQueryQueryVariables = Exact<{ @@ -1126,36 +1136,24 @@ export namespace GraphQL { export type GetInputFieldsFromQueryQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - }; - }> - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; name?: string | null }; + }> | null; + }; + }> | null; + } | null; }; export type GetInputFieldsFromTypeQueryVariables = Exact<{ @@ -1164,35 +1162,26 @@ export namespace GraphQL { export type GetInputFieldsFromTypeQuery = { __typename?: "Query"; - __type?: - | { + __type?: { + __typename?: "__Type"; + name?: string | null; + inputFields?: Array<{ + __typename?: "__InputValue"; + name: string; + type: { __typename?: "__Type"; - name?: string | null | undefined; - inputFields?: - | Array<{ - __typename?: "__InputValue"; - name: string; - type: { - __typename?: "__Type"; - name?: string | null | undefined; - kind: __TypeKind; - enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null | undefined; - ofType?: - | { - __typename?: "__Type"; - kind: __TypeKind; - name?: string | null | undefined; - enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null | undefined; - } - | null - | undefined; - }; - }> - | null - | undefined; - } - | null - | undefined; + name?: string | null; + kind: __TypeKind; + enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null; + ofType?: { + __typename?: "__Type"; + kind: __TypeKind; + name?: string | null; + enumValues?: Array<{ __typename?: "__EnumValue"; name: string }> | null; + } | null; + }; + }> | null; + } | null; }; export type GetUserTasksByStatesQueryVariables = Exact<{ @@ -1202,37 +1191,30 @@ export namespace GraphQL { export type GetUserTasksByStatesQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - name?: string | null | undefined; - referenceName?: string | null | undefined; - description?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - endpoint?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + name?: string | null; + referenceName?: string | null; + description?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + endpoint?: string | null; + } | null> | null; }; export type GetUserTaskByIdQueryVariables = Exact<{ @@ -1241,38 +1223,31 @@ export namespace GraphQL { export type GetUserTaskByIdQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - description?: string | null | undefined; - name?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - referenceName?: string | null | undefined; - endpoint?: string | null | undefined; - lastUpdate: any; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + description?: string | null; + name?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + referenceName?: string | null; + endpoint?: string | null; + lastUpdate: any; + } | null> | null; }; export type GetTasksForUserQueryVariables = Exact<{ @@ -1284,38 +1259,31 @@ export namespace GraphQL { export type GetTasksForUserQuery = { __typename?: "Query"; - UserTaskInstances?: - | Array< - | { - __typename?: "UserTaskInstance"; - id: string; - name?: string | null | undefined; - referenceName?: string | null | undefined; - description?: string | null | undefined; - priority?: string | null | undefined; - processInstanceId: string; - processId: string; - rootProcessInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - state: string; - actualOwner?: string | null | undefined; - adminGroups?: Array | null | undefined; - adminUsers?: Array | null | undefined; - completed?: any | null | undefined; - started: any; - excludedUsers?: Array | null | undefined; - potentialGroups?: Array | null | undefined; - potentialUsers?: Array | null | undefined; - inputs?: string | null | undefined; - outputs?: string | null | undefined; - lastUpdate: any; - endpoint?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + UserTaskInstances?: Array<{ + __typename?: "UserTaskInstance"; + id: string; + name?: string | null; + referenceName?: string | null; + description?: string | null; + priority?: string | null; + processInstanceId: string; + processId?: string | null; + rootProcessInstanceId?: string | null; + rootProcessId?: string | null; + state?: string | null; + actualOwner?: string | null; + adminGroups?: Array | null; + adminUsers?: Array | null; + completed?: any | null; + started?: any | null; + excludedUsers?: Array | null; + potentialGroups?: Array | null; + potentialUsers?: Array | null; + inputs?: string | null; + outputs?: string | null; + lastUpdate: any; + endpoint?: string | null; + } | null> | null; }; export type GetJobsByProcessInstanceIdQueryVariables = Exact<{ @@ -1324,32 +1292,25 @@ export namespace GraphQL { export type GetJobsByProcessInstanceIdQuery = { __typename?: "Query"; - Jobs?: - | Array< - | { - __typename?: "Job"; - id: string; - processId?: string | null | undefined; - processInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - status: JobStatus; - expirationTime?: any | null | undefined; - priority?: number | null | undefined; - callbackEndpoint?: string | null | undefined; - repeatInterval?: number | null | undefined; - repeatLimit?: number | null | undefined; - scheduledId?: string | null | undefined; - retries?: number | null | undefined; - lastUpdate?: any | null | undefined; - endpoint?: string | null | undefined; - nodeInstanceId?: string | null | undefined; - executionCounter?: number | null | undefined; - } - | null - | undefined - > - | null - | undefined; + Jobs?: Array<{ + __typename?: "Job"; + id: string; + processId?: string | null; + processInstanceId?: string | null; + rootProcessId?: string | null; + status: JobStatus; + expirationTime?: any | null; + priority?: number | null; + callbackEndpoint?: string | null; + repeatInterval?: number | null; + repeatLimit?: number | null; + scheduledId?: string | null; + retries?: number | null; + lastUpdate?: any | null; + endpoint?: string | null; + nodeInstanceId?: string | null; + executionCounter?: number | null; + } | null> | null; }; export type GetJobsWithFiltersQueryVariables = Exact<{ @@ -1361,59 +1322,43 @@ export namespace GraphQL { export type GetJobsWithFiltersQuery = { __typename?: "Query"; - Jobs?: - | Array< - | { - __typename?: "Job"; - id: string; - processId?: string | null | undefined; - processInstanceId?: string | null | undefined; - rootProcessId?: string | null | undefined; - status: JobStatus; - expirationTime?: any | null | undefined; - priority?: number | null | undefined; - callbackEndpoint?: string | null | undefined; - repeatInterval?: number | null | undefined; - repeatLimit?: number | null | undefined; - scheduledId?: string | null | undefined; - retries?: number | null | undefined; - lastUpdate?: any | null | undefined; - endpoint?: string | null | undefined; - executionCounter?: number | null | undefined; - } - | null - | undefined - > - | null - | undefined; + Jobs?: Array<{ + __typename?: "Job"; + id: string; + processId?: string | null; + processInstanceId?: string | null; + rootProcessId?: string | null; + status: JobStatus; + expirationTime?: any | null; + priority?: number | null; + callbackEndpoint?: string | null; + repeatInterval?: number | null; + repeatLimit?: number | null; + scheduledId?: string | null; + retries?: number | null; + lastUpdate?: any | null; + endpoint?: string | null; + executionCounter?: number | null; + } | null> | null; }; export type AbortProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type AbortProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceAbort?: string | null | undefined; - }; + export type AbortProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceAbort?: string | null }; export type SkipProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type SkipProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceSkip?: string | null | undefined; - }; + export type SkipProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceSkip?: string | null }; export type RetryProcessInstanceMutationVariables = Exact<{ processId?: InputMaybe; }>; - export type RetryProcessInstanceMutation = { - __typename?: "Mutation"; - ProcessInstanceRetry?: string | null | undefined; - }; + export type RetryProcessInstanceMutation = { __typename?: "Mutation"; ProcessInstanceRetry?: string | null }; export type GetProcessInstanceSvgQueryVariables = Exact<{ processId?: InputMaybe; @@ -1421,46 +1366,19 @@ export namespace GraphQL { export type GetProcessInstanceSvgQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - diagram?: string | null | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessInstances?: Array<{ __typename?: "ProcessInstance"; diagram?: string | null } | null> | null; }; - export type GetProcessInstanceNodeDefinitionsQueryVariables = Exact<{ + export type GetProcessDefinitionNodesQueryVariables = Exact<{ processId?: InputMaybe; }>; - export type GetProcessInstanceNodeDefinitionsQuery = { + export type GetProcessDefinitionNodesQuery = { __typename?: "Query"; - ProcessInstances?: - | Array< - | { - __typename?: "ProcessInstance"; - nodeDefinitions?: - | Array<{ - __typename?: "Node"; - id: string; - name: string; - type: string; - uniqueId: string; - nodeDefinitionId: string; - }> - | null - | undefined; - } - | null - | undefined - > - | null - | undefined; + ProcessDefinitions?: Array<{ + __typename?: "ProcessDefinition"; + nodes?: Array<{ __typename?: "Node"; id: string; name: string; type: string }> | null; + } | null> | null; }; export type HandleNodeTriggerMutationVariables = Exact<{ @@ -1468,30 +1386,21 @@ export namespace GraphQL { nodeId?: InputMaybe; }>; - export type HandleNodeTriggerMutation = { - __typename?: "Mutation"; - NodeInstanceTrigger?: string | null | undefined; - }; + export type HandleNodeTriggerMutation = { __typename?: "Mutation"; NodeInstanceTrigger?: string | null }; export type HandleNodeInstanceCancelMutationVariables = Exact<{ processId?: InputMaybe; nodeInstanceId?: InputMaybe; }>; - export type HandleNodeInstanceCancelMutation = { - __typename?: "Mutation"; - NodeInstanceCancel?: string | null | undefined; - }; + export type HandleNodeInstanceCancelMutation = { __typename?: "Mutation"; NodeInstanceCancel?: string | null }; export type HandleNodeInstanceRetriggerMutationVariables = Exact<{ processId?: InputMaybe; nodeInstanceId?: InputMaybe; }>; - export type HandleNodeInstanceRetriggerMutation = { - __typename?: "Mutation"; - NodeInstanceRetrigger?: string | null | undefined; - }; + export type HandleNodeInstanceRetriggerMutation = { __typename?: "Mutation"; NodeInstanceRetrigger?: string | null }; export type HandleProcessVariableUpdateMutationVariables = Exact<{ processId?: InputMaybe; @@ -1500,27 +1409,31 @@ export namespace GraphQL { export type HandleProcessVariableUpdateMutation = { __typename?: "Mutation"; - ProcessInstanceUpdateVariables?: string | null | undefined; + ProcessInstanceUpdateVariables?: string | null; }; export type JobCancelMutationVariables = Exact<{ jobId?: InputMaybe; }>; - export type JobCancelMutation = { - __typename?: "Mutation"; - JobCancel?: string | null | undefined; - }; + export type JobCancelMutation = { __typename?: "Mutation"; JobCancel?: string | null }; export type HandleJobRescheduleMutationVariables = Exact<{ jobId?: InputMaybe; data?: InputMaybe; }>; - export type HandleJobRescheduleMutation = { - __typename?: "Mutation"; - JobReschedule?: string | null | undefined; - }; + export type HandleJobRescheduleMutation = { __typename?: "Mutation"; JobReschedule?: string | null }; + + export const GetProcessDefinitionsDocument = gql` + query getProcessDefinitions { + ProcessDefinitions { + id + endpoint + serviceUrl + } + } + `; export const GetProcessInstancesDocument = gql` query getProcessInstances( @@ -2604,69 +2517,63 @@ export namespace GraphQL { GetProcessInstanceSvgQuery, GetProcessInstanceSvgQueryVariables >; - export const GetProcessInstanceNodeDefinitionsDocument = gql` - query getProcessInstanceNodeDefinitions($processId: String) { - ProcessInstances(where: { id: { equal: $processId } }) { - nodeDefinitions { + export const GetProcessDefinitionNodesDocument = gql` + query getProcessDefinitionNodes($processId: String) { + ProcessDefinitions(where: { id: { equal: $processId } }) { + nodes { id name type - uniqueId - nodeDefinitionId } } } `; /** - * __useGetProcessInstanceNodeDefinitionsQuery__ + * __useGetProcessDefinitionNodesQuery__ * - * To run a query within a React component, call `useGetProcessInstanceNodeDefinitionsQuery` and pass it any options that fit your needs. - * When your component renders, `useGetProcessInstanceNodeDefinitionsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useGetProcessDefinitionNodesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetProcessDefinitionNodesQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useGetProcessInstanceNodeDefinitionsQuery({ + * const { data, loading, error } = useGetProcessDefinitionNodesQuery({ * variables: { * processId: // value for 'processId' * }, * }); */ - export function useGetProcessInstanceNodeDefinitionsQuery( + export function useGetProcessDefinitionNodesQuery( baseOptions?: ApolloReactHooks.QueryHookOptions< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return ApolloReactHooks.useQuery< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables - >(GetProcessInstanceNodeDefinitionsDocument, options); + return ApolloReactHooks.useQuery( + GetProcessDefinitionNodesDocument, + options + ); } - export function useGetProcessInstanceNodeDefinitionsLazyQuery( + export function useGetProcessDefinitionNodesLazyQuery( baseOptions?: ApolloReactHooks.LazyQueryHookOptions< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables > ) { const options = { ...defaultOptions, ...baseOptions }; - return ApolloReactHooks.useLazyQuery< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables - >(GetProcessInstanceNodeDefinitionsDocument, options); + return ApolloReactHooks.useLazyQuery( + GetProcessDefinitionNodesDocument, + options + ); } - export type GetProcessInstanceNodeDefinitionsQueryHookResult = ReturnType< - typeof useGetProcessInstanceNodeDefinitionsQuery - >; - export type GetProcessInstanceNodeDefinitionsLazyQueryHookResult = ReturnType< - typeof useGetProcessInstanceNodeDefinitionsLazyQuery - >; - export type GetProcessInstanceNodeDefinitionsQueryResult = ApolloReactCommon.QueryResult< - GetProcessInstanceNodeDefinitionsQuery, - GetProcessInstanceNodeDefinitionsQueryVariables + export type GetProcessDefinitionNodesQueryHookResult = ReturnType; + export type GetProcessDefinitionNodesLazyQueryHookResult = ReturnType; + export type GetProcessDefinitionNodesQueryResult = ApolloReactCommon.QueryResult< + GetProcessDefinitionNodesQuery, + GetProcessDefinitionNodesQueryVariables >; export const HandleNodeTriggerDocument = gql` mutation handleNodeTrigger($processId: String, $nodeId: String) { diff --git a/packages/runtime-tools-swf-gateway-api/src/types.ts b/packages/runtime-tools-swf-gateway-api/src/types.ts index a8118dbc209..32fa6b87a69 100644 --- a/packages/runtime-tools-swf-gateway-api/src/types.ts +++ b/packages/runtime-tools-swf-gateway-api/src/types.ts @@ -140,6 +140,7 @@ export interface WorkflowListState { export interface WorkflowDefinition { workflowName: string; endpoint: string; + serviceUrl: string; } export interface WorkflowResponse { @@ -153,6 +154,7 @@ export enum CloudEventMethod { } export interface CloudEventRequest { + serviceUrl: string; endpoint: string; method: CloudEventMethod; diff --git a/packages/runtime-tools-swf-webapp-components/README.md b/packages/runtime-tools-swf-webapp-components/README.md new file mode 100644 index 00000000000..5975f7b9da6 --- /dev/null +++ b/packages/runtime-tools-swf-webapp-components/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/runtime-tools-swf-webapp-components + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventForm.tsx b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventForm.tsx index d4d2e2ddc6c..71395e3f57c 100644 --- a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventForm.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventForm.tsx @@ -36,6 +36,7 @@ interface CloudEventFormProps { onStartWorkflowError: (error: any) => void; onTriggerCloudEventSuccess: () => void; onTriggerStartCloudEventSuccess: (businessKey: string) => void; + serviceUrl: string; } export enum CloudEventPageSource { @@ -50,6 +51,7 @@ export const CloudEventForm: React.FC = ({ onStartWorkflowError, onTriggerCloudEventSuccess, onTriggerStartCloudEventSuccess, + serviceUrl, ouiaId, ouiaSafe, }) => { @@ -86,6 +88,7 @@ export const CloudEventForm: React.FC = ({ onStartWorkflowError={onStartWorkflowError} onTriggerCloudEventSuccess={onTriggerCloudEventSuccess} onTriggerStartCloudEventSuccess={onTriggerStartCloudEventSuccess} + serviceUrl={serviceUrl} /> diff --git a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormContextProvider.tsx b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormContextProvider.tsx index 842e6a3bb2e..075d782eac0 100644 --- a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormContextProvider.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormContextProvider.tsx @@ -21,15 +21,10 @@ import React, { useMemo } from "react"; import CloudEventFormContext from "./CloudEventFormContext"; import { CloudEventFormGatewayApiImpl } from "./CloudEventFormGatewayApi"; -export function CloudEventFormContextProvider( - props: React.PropsWithChildren<{ proxyEndpoint?: string; kogitoServiceUrl: string }> -) { - const { proxyEndpoint, kogitoServiceUrl } = props; +export function CloudEventFormContextProvider(props: React.PropsWithChildren<{ proxyEndpoint?: string }>) { + const { proxyEndpoint } = props; - const gatewayApi = useMemo( - () => new CloudEventFormGatewayApiImpl(kogitoServiceUrl, proxyEndpoint), - [proxyEndpoint, kogitoServiceUrl] - ); + const gatewayApi = useMemo(() => new CloudEventFormGatewayApiImpl(proxyEndpoint), [proxyEndpoint]); return {props.children}; } diff --git a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormGatewayApi.ts b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormGatewayApi.ts index 839ae00a2e2..1f85110b008 100644 --- a/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormGatewayApi.ts +++ b/packages/runtime-tools-swf-webapp-components/src/CloudEventForm/CloudEventFormGatewayApi.ts @@ -26,14 +26,14 @@ export interface CloudEventFormGatewayApi { } export class CloudEventFormGatewayApiImpl implements CloudEventFormGatewayApi { - constructor(private readonly baseUrl: string, private readonly proxyEndpoint?: string) {} + constructor(private readonly proxyEndpoint?: string) {} async triggerStartCloudEvent(event: CloudEventRequest): Promise { - const response = await triggerStartCloudEvent(event, this.baseUrl, this.proxyEndpoint); + const response = await triggerStartCloudEvent(event, event.serviceUrl, this.proxyEndpoint); return response; } triggerCloudEvent(event: CloudEventRequest): Promise { - return triggerCloudEvent(event, this.baseUrl, this.proxyEndpoint); + return triggerCloudEvent(event, event.serviceUrl, this.proxyEndpoint); } } diff --git a/packages/runtime-tools-swf-webapp-components/src/CloudEventFormContainer/CloudEventFormContainer.tsx b/packages/runtime-tools-swf-webapp-components/src/CloudEventFormContainer/CloudEventFormContainer.tsx index d8c15f34f34..80df5a6cec8 100644 --- a/packages/runtime-tools-swf-webapp-components/src/CloudEventFormContainer/CloudEventFormContainer.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/CloudEventFormContainer/CloudEventFormContainer.tsx @@ -25,22 +25,28 @@ import { CloudEventRequest } from "@kie-tools/runtime-tools-swf-gateway-api/dist interface CloudEventFormContainerProps { instanceId?: string; + definitionName?: string; cloudEventSource: string; isTriggerNewInstance: boolean; onStartWorkflowError: (error: any) => void; onTriggerCloudEventSuccess: () => void; onTriggerStartCloudEventSuccess: (businessKey: string) => void; + serviceUrl: string; + targetOrigin?: string; } export const CloudEventFormContainer: React.FC = ({ instanceId, + definitionName, cloudEventSource, isTriggerNewInstance, onStartWorkflowError, onTriggerCloudEventSuccess, onTriggerStartCloudEventSuccess, + serviceUrl, ouiaId, ouiaSafe, + targetOrigin, }) => { const gatewayApi = useCloudEventFormGatewayApi(); @@ -71,15 +77,16 @@ export const CloudEventFormContainer: React.FC { const doTrigger = isTriggerNewInstance ? triggerStartCloudEvent : triggerCloudEvent; return doTrigger(event); }, }} + serviceUrl={serviceUrl} /> ); }; diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListContextProvider.tsx b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListContextProvider.tsx index 526004ed04c..6d324a7d658 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListContextProvider.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListContextProvider.tsx @@ -20,13 +20,53 @@ import React, { useMemo } from "react"; import { WorkflowDefinitionListContext } from "./WorkflowDefinitionListContext"; import { WorkflowDefinitionListGatewayApiImpl } from "./WorkflowDefinitionListGatewayApi"; +import { HttpLink } from "apollo-link-http"; +import { InMemoryCache, NormalizedCacheObject } from "apollo-cache-inmemory"; +import { ApolloClient } from "apollo-client"; +import { GraphQLWorkflowDefinitionListQueries } from "./WorkflowDefinitionListQueries"; -export function WorkflowDefinitionListContextProvider(props: React.PropsWithChildren<{ kogitoServiceUrl: string }>) { - const { kogitoServiceUrl } = props; +export function WorkflowDefinitionListContextProvider( + props: React.PropsWithChildren<{ proxyEndpoint?: string; dataIndexUrl: string }> +) { + const { proxyEndpoint, dataIndexUrl } = props; + + const httpLink = useMemo( + () => + new HttpLink({ + uri: proxyEndpoint || dataIndexUrl, + headers: { + ...(proxyEndpoint ? { "Target-Url": dataIndexUrl } : {}), + }, + }), + [dataIndexUrl, proxyEndpoint] + ); + + const cache = useMemo(() => new InMemoryCache(), []); + + const apolloClient: ApolloClient = useMemo( + () => + new ApolloClient({ + cache, + link: httpLink, + }), + [cache, httpLink] + ); + + return ( + + {props.children} + + ); +} + +export function WorkflowDefinitionListContextProviderWithApolloClient( + props: React.PropsWithChildren<{ apolloClient: ApolloClient }> +) { + const { apolloClient } = props; const gatewayApiImpl = useMemo(() => { - return new WorkflowDefinitionListGatewayApiImpl(kogitoServiceUrl, "q/openapi.json"); - }, [kogitoServiceUrl]); + return new WorkflowDefinitionListGatewayApiImpl(new GraphQLWorkflowDefinitionListQueries(apolloClient)); + }, [apolloClient]); return ( @@ -34,5 +74,3 @@ export function WorkflowDefinitionListContextProvider(props: React.PropsWithChil ); } - -export default WorkflowDefinitionListContextProvider; diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListGatewayApi.ts b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListGatewayApi.ts index 3f2691343df..a2a6c6ffb7b 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListGatewayApi.ts +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListGatewayApi.ts @@ -18,14 +18,15 @@ */ import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; -import { getWorkflowDefinitionList } from "@kie-tools/runtime-tools-swf-gateway-api/dist/gatewayApi"; +import { getWorkflowDefinitions } from "@kie-tools/runtime-tools-swf-gateway-api/dist/gatewayApi"; +import { WorkflowDefinitionListQueries } from "../WorkflowDefinitionList/WorkflowDefinitionListQueries"; export interface WorkflowDefinitionListGatewayApi { getWorkflowDefinitionFilter: () => Promise; setWorkflowDefinitionFilter: (filter: string[]) => Promise; getWorkflowDefinitionsQuery: () => Promise; openWorkflowForm: (workflowDefinition: WorkflowDefinition) => Promise; - openTriggerCloudEvent: () => void; + openTriggerCloudEvent: (workflowDefinition: WorkflowDefinition) => Promise; onOpenWorkflowFormListen: (listener: OnOpenWorkflowFormListener) => UnSubscribeHandler; onOpenTriggerCloudEventListen: (listener: OnOpenTriggerCloudEventListener) => UnSubscribeHandler; } @@ -35,7 +36,7 @@ export interface OnOpenWorkflowFormListener { } export interface OnOpenTriggerCloudEventListener { - onOpen: () => void; + onOpen: (workflowDefinition: WorkflowDefinition) => void; } export interface UnSubscribeHandler { @@ -46,13 +47,11 @@ export class WorkflowDefinitionListGatewayApiImpl implements WorkflowDefinitionL private readonly onOpenWorkflowListeners: OnOpenWorkflowFormListener[] = []; private readonly onOpenTriggerCloudEventListeners: OnOpenTriggerCloudEventListener[] = []; - private readonly baseUrl: string; - private readonly openApiPath: string; + private readonly queries: WorkflowDefinitionListQueries; private workflowDefinitionFilter: string[] = []; - constructor(url: string, path: string) { - this.baseUrl = url; - this.openApiPath = path; + constructor(queries: WorkflowDefinitionListQueries) { + this.queries = queries; } getWorkflowDefinitionFilter(): Promise { @@ -100,10 +99,11 @@ export class WorkflowDefinitionListGatewayApiImpl implements WorkflowDefinitionL } getWorkflowDefinitionsQuery(): Promise { - return getWorkflowDefinitionList(this.baseUrl, this.openApiPath); + return this.queries.getWorkflowDefinitions(); } - openTriggerCloudEvent(): void { - this.onOpenTriggerCloudEventListeners.forEach((listener) => listener.onOpen()); + openTriggerCloudEvent(workflowDefinition: WorkflowDefinition): Promise { + this.onOpenTriggerCloudEventListeners.forEach((listener) => listener.onOpen(workflowDefinition)); + return Promise.resolve(); } } diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListQueries.ts b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListQueries.ts new file mode 100644 index 00000000000..115f12cfc06 --- /dev/null +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/WorkflowDefinitionListQueries.ts @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { getWorkflowDefinitions } from "@kie-tools/runtime-tools-swf-gateway-api/dist/gatewayApi"; +import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; +import { ApolloClient } from "apollo-client"; + +export interface WorkflowDefinitionListQueries { + getWorkflowDefinitions(): Promise; +} + +export class GraphQLWorkflowDefinitionListQueries implements WorkflowDefinitionListQueries { + private readonly client: ApolloClient; + + constructor(client: ApolloClient) { + this.client = client; + } + + getWorkflowDefinitions(): Promise { + return getWorkflowDefinitions(this.client); + } +} diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/index.ts b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/index.ts index cdaba08f67b..c4a06a02226 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/index.ts +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionList/index.ts @@ -18,5 +18,5 @@ */ export * from "./WorkflowDefinitionListContext"; -export { default as WorkflowDefinitionListContextProvider } from "./WorkflowDefinitionListContextProvider"; +export * from "./WorkflowDefinitionListContextProvider"; export { WorkflowDefinitionListGatewayApi } from "./WorkflowDefinitionListGatewayApi"; diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionListContainer/WorkflowDefinitionListContainer.tsx b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionListContainer/WorkflowDefinitionListContainer.tsx index a79dded3747..6191eccb0c3 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionListContainer/WorkflowDefinitionListContainer.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowDefinitionListContainer/WorkflowDefinitionListContainer.tsx @@ -20,16 +20,18 @@ import React, { useEffect } from "react"; import { componentOuiaProps, OUIAProps } from "@kie-tools/runtime-tools-components/dist/ouiaTools"; import { EmbeddedWorkflowDefinitionList } from "@kie-tools/runtime-tools-swf-enveloped-components/dist/workflowDefinitions"; -import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; +import { WorkflowDefinition, WorkflowInstance } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; import { useWorkflowDefinitionListGatewayApi, WorkflowDefinitionListGatewayApi } from "../WorkflowDefinitionList"; interface WorkflowDefinitionListContainerProps { onOpenWorkflowForm: (workflowDefinition: WorkflowDefinition) => void; + onOpenTriggerCloudEventForWorkflow: (workflowDefinition: WorkflowDefinition) => void; targetOrigin?: string; } export const WorkflowDefinitionListContainer: React.FC = ({ onOpenWorkflowForm, + onOpenTriggerCloudEventForWorkflow, ouiaId, ouiaSafe, targetOrigin, @@ -42,11 +44,17 @@ export const WorkflowDefinitionListContainer: React.FC { onOpenDefinitionUnsubscriber.unSubscribe(); + onTriggerCloudEventUnsubscriber.unSubscribe(); }; - }, [gatewayApi, onOpenWorkflowForm]); + }, [gatewayApi, onOpenWorkflowForm, onOpenTriggerCloudEventForWorkflow]); return ( -) { - const { proxyEndpoint, kogitoServiceUrl } = props; +export function WorkflowFormContextProvider(props: React.PropsWithChildren<{ proxyEndpoint?: string }>) { + const { proxyEndpoint } = props; const gatewayApiImpl = useMemo(() => { - return new WorkflowFormGatewayApiImpl(kogitoServiceUrl, "q/openapi.json", proxyEndpoint); - }, [kogitoServiceUrl, proxyEndpoint]); + return new WorkflowFormGatewayApiImpl("q/openapi.json", proxyEndpoint); + }, [proxyEndpoint]); return {props.children}; } diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowForm/WorkflowFormGatewayApi.ts b/packages/runtime-tools-swf-webapp-components/src/WorkflowForm/WorkflowFormGatewayApi.ts index d9a4040ffeb..3503d04ed06 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowForm/WorkflowFormGatewayApi.ts +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowForm/WorkflowFormGatewayApi.ts @@ -22,19 +22,17 @@ import { getCustomWorkflowSchema, startWorkflowRest } from "@kie-tools/runtime-t export interface WorkflowFormGatewayApi { setBusinessKey(bk: string): void; getBusinessKey(): string; - getCustomWorkflowSchema(workflowName: string): Promise>; + getCustomWorkflowSchema(workflowName: string, serviceUrl: string): Promise>; startWorkflow(endpoint: string, data: Record): Promise; } export class WorkflowFormGatewayApiImpl implements WorkflowFormGatewayApi { private businessKey: string; - private readonly baseUrl: string; private readonly openApiPath: string; private readonly proxyEndpoint?: string; - constructor(baseUrl: string, openApiPath: string, proxyEndpoint?: string) { + constructor(openApiPath: string, proxyEndpoint?: string) { this.businessKey = ""; - this.baseUrl = baseUrl; this.openApiPath = openApiPath; this.proxyEndpoint = proxyEndpoint; } @@ -47,8 +45,8 @@ export class WorkflowFormGatewayApiImpl implements WorkflowFormGatewayApi { return this.businessKey; } - getCustomWorkflowSchema(workflowName: string): Promise> { - return getCustomWorkflowSchema(this.baseUrl, this.openApiPath, workflowName); + getCustomWorkflowSchema(workflowName: string, serviceUrl: string): Promise> { + return getCustomWorkflowSchema(serviceUrl, this.openApiPath, workflowName, this.proxyEndpoint); } async startWorkflow(endpoint: string, data: Record): Promise { diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowFormContainer/WorkflowFormContainer.tsx b/packages/runtime-tools-swf-webapp-components/src/WorkflowFormContainer/WorkflowFormContainer.tsx index 890a0df839c..7367c88d456 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowFormContainer/WorkflowFormContainer.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowFormContainer/WorkflowFormContainer.tsx @@ -46,7 +46,10 @@ export const WorkflowFormContainer: React.FC> { - return gatewayApi.getCustomWorkflowSchema(workflowDefinitionData.workflowName); + return gatewayApi.getCustomWorkflowSchema( + workflowDefinitionData.workflowName, + workflowDefinitionData.serviceUrl + ); }, async resetBusinessKey() { onResetForm(); diff --git a/packages/runtime-tools-swf-webapp-components/src/WorkflowListContainer/WorkflowListContainer.tsx b/packages/runtime-tools-swf-webapp-components/src/WorkflowListContainer/WorkflowListContainer.tsx index 741bd6f2104..a42899dd35e 100644 --- a/packages/runtime-tools-swf-webapp-components/src/WorkflowListContainer/WorkflowListContainer.tsx +++ b/packages/runtime-tools-swf-webapp-components/src/WorkflowListContainer/WorkflowListContainer.tsx @@ -27,7 +27,6 @@ import { WorkflowListGatewayApi } from "../WorkflowList/WorkflowListGatewayApi"; interface WorkflowListContainerProps { initialState: WorkflowListState; onOpenWorkflowDetails: (args: { workflowId: string; state: WorkflowListState }) => void; - onOpenTriggerCloudEvent?: () => void; onOpenTriggerCloudEventForWorkflow?: (workflowId: string) => void; targetOrigin?: string; } @@ -35,7 +34,6 @@ interface WorkflowListContainerProps { export const WorkflowListContainer: React.FC = ({ initialState, onOpenWorkflowDetails, - onOpenTriggerCloudEvent, onOpenTriggerCloudEventForWorkflow, ouiaId, ouiaSafe, @@ -53,17 +51,14 @@ export const WorkflowListContainer: React.FC { onOpenInstanceUnsubscriber.unSubscribe(); onTriggerCloudEventUnsubscriber?.unSubscribe(); }; - }, [gatewayApi, onOpenTriggerCloudEvent, onOpenTriggerCloudEventForWorkflow, onOpenWorkflowDetails]); + }, [gatewayApi, onOpenTriggerCloudEventForWorkflow, onOpenWorkflowDetails]); return ( + # runtime-tools-task-console-webapp ## Working with Task Console features @@ -64,3 +81,33 @@ To change any of this client configuration access to http://localhost:8280/auth/ Enable `PROD` env mode by running the app with: `RUNTIME_TOOLS_TASK_CONSOLE_WEBAPP__kogitoEnvMode=PROD pnpm dev` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/runtime-tools-task-console-webapp/package.json b/packages/runtime-tools-task-console-webapp/package.json index 954f1361b01..abf4eeccac7 100644 --- a/packages/runtime-tools-task-console-webapp/package.json +++ b/packages/runtime-tools-task-console-webapp/package.json @@ -41,7 +41,7 @@ "apollo-link-context": "^1.0.20", "apollo-link-error": "1.1.13", "apollo-link-http": "1.5.17", - "axios": "^1.6.4", + "axios": "^1.6.8", "graphql": "14.3.1", "history": "^4.9.0", "lodash": "^4.17.21", @@ -82,7 +82,7 @@ "css-minimizer-webpack-plugin": "^5.0.1", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", - "express": "^4.18.2", + "express": "^4.19.2", "file-loader": "^6.2.0", "html-webpack-plugin": "^5.3.2", "https-browserify": "^1.0.0", diff --git a/packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg b/packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg index cb6c8a7743e..16ebf1547ba 100644 --- a/packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg +++ b/packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg @@ -1 +1,63 @@ -Task_Console_Logo_60x370 \ No newline at end of file + + + + + + + Task_Console_Logo_60x370 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/scesim-editor/README.md b/packages/scesim-editor/README.md index 28c1a949882..b6ce7ec77f6 100644 --- a/packages/scesim-editor/README.md +++ b/packages/scesim-editor/README.md @@ -1,3 +1,20 @@ + + # Test Scenario Editor This module will host the next generation of Test Scenario Editor (\*.scesim) files. @@ -37,3 +54,33 @@ To launch it, simply type in your terminal the following command: A web server with a Dev Webapp of Test Scenario editor will be launched, reachable at the following address: http://localhost:9004/ or http://192.168.1.128:9004/ + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/scesim-marshaller/README.md b/packages/scesim-marshaller/README.md new file mode 100644 index 00000000000..8c25d711e85 --- /dev/null +++ b/packages/scesim-marshaller/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/scesim-marshaller + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/scesim-marshaller/tests-data--manual/OldEnoughTest.scesim b/packages/scesim-marshaller/tests-data--manual/OldEnoughTest.scesim index 96454197649..ba2543a98ec 100644 --- a/packages/scesim-marshaller/tests-data--manual/OldEnoughTest.scesim +++ b/packages/scesim-marshaller/tests-data--manual/OldEnoughTest.scesim @@ -1,3 +1,22 @@ + + diff --git a/packages/scesim-marshaller/tests-data--manual/TrafficViolationTest.scesim b/packages/scesim-marshaller/tests-data--manual/TrafficViolationTest.scesim index 32a5de9ac20..1ce37a055e8 100644 --- a/packages/scesim-marshaller/tests-data--manual/TrafficViolationTest.scesim +++ b/packages/scesim-marshaller/tests-data--manual/TrafficViolationTest.scesim @@ -1,4 +1,22 @@ - + + diff --git a/packages/scesim-marshaller/tests-data--manual/simple.scesim b/packages/scesim-marshaller/tests-data--manual/simple.scesim index 9b005cbdeb4..dcbd6ed94d4 100644 --- a/packages/scesim-marshaller/tests-data--manual/simple.scesim +++ b/packages/scesim-marshaller/tests-data--manual/simple.scesim @@ -1,4 +1,22 @@ + diff --git a/packages/serverless-logic-web-tools-base-builder-image-env/README.md b/packages/serverless-logic-web-tools-base-builder-image-env/README.md new file mode 100644 index 00000000000..47e2a182f3a --- /dev/null +++ b/packages/serverless-logic-web-tools-base-builder-image-env/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-base-builder-image-env + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js b/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js index 37ded836933..866e47e312c 100644 --- a/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js +++ b/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js @@ -22,15 +22,15 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/b module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry: { - default: "quay.io", + default: "docker.io", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount: { - default: "kie-tools", + default: "apache", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName: { - default: "serverless-logic-web-tools-base-builder-image", + default: "incubator-kie-serverless-logic-web-tools-base-builder", description: "", }, }), diff --git a/packages/serverless-logic-web-tools-base-builder-image/README.md b/packages/serverless-logic-web-tools-base-builder-image/README.md new file mode 100644 index 00000000000..6ef68048d5e --- /dev/null +++ b/packages/serverless-logic-web-tools-base-builder-image/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-base-builder-image + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-base-builder-image/env/index.js b/packages/serverless-logic-web-tools-base-builder-image/env/index.js index 7210baf1c4d..e6c412f5db1 100644 --- a/packages/serverless-logic-web-tools-base-builder-image/env/index.js +++ b/packages/serverless-logic-web-tools-base-builder-image/env/index.js @@ -19,31 +19,32 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env"); -module.exports = composeEnv( - [require("@kie-tools/root-env/env"), require("@kie-tools/serverless-logic-web-tools-base-builder-image-env/env")], - { - vars: varsWithName({ - SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags: { - default: "latest", - description: "", - }, - SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion: { - default: "v1.27.3", - description: "", - }, - SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: { - default: "999-20240417", - description: "", - }, - }), - get env() { - return { - baseBuilderImage: { - buildTags: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags), - kubectlVersion: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion), - kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag), - }, - }; +const rootEnv = require("@kie-tools/root-env/env"); + +module.exports = composeEnv([rootEnv, require("@kie-tools/serverless-logic-web-tools-base-builder-image-env/env")], { + vars: varsWithName({ + SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags: { + default: rootEnv.env.root.streamName, + description: "", }, - } -); + SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion: { + default: "v1.27.3", + description: "", + }, + /* (begin) This part of the file is referenced in `scripts/update-kogito-version` */ + SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: { + default: "999-20240509", + description: "", + }, + /* end */ + }), + get env() { + return { + baseBuilderImage: { + buildTags: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags), + kubectlVersion: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion), + kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag), + }, + }; + }, +}); diff --git a/packages/serverless-logic-web-tools-base-builder-image/package.json b/packages/serverless-logic-web-tools-base-builder-image/package.json index 21d88a84afa..c2ee3852645 100644 --- a/packages/serverless-logic-web-tools-base-builder-image/package.json +++ b/packages/serverless-logic-web-tools-base-builder-image/package.json @@ -15,8 +15,7 @@ "scripts": { "build:dev": "echo Nothing to do", "build:prod": "pnpm cleanup && run-script-os", - "build:prod:darwin": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "build:prod:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:podman:build\"", + "build:prod:linux:darwin": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", "build:prod:win32": "echo \"Build not supported on Windows\"", "cleanup": "rimraf dist-dev && mkdir dist-dev", "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env baseBuilderImage.buildTags) | xargs printf -- \"-t $(build-env baseBuilderImageEnv.registry)/$(build-env baseBuilderImageEnv.account)/$(build-env baseBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg KOGITO_IMAGE_TAG=$(build-env baseBuilderImage.kogitoImageTag) --build-arg KUBECTL_VERSION=$(build-env baseBuilderImage.kubectlVersion) .\" --else \"echo Docker not found, skipping image build.\"", diff --git a/packages/serverless-logic-web-tools-swf-builder-image-env/README.md b/packages/serverless-logic-web-tools-swf-builder-image-env/README.md new file mode 100644 index 00000000000..2b3cb8b08bf --- /dev/null +++ b/packages/serverless-logic-web-tools-swf-builder-image-env/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-swf-builder-image-env + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js b/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js index b44aae5d3f3..f1db2afcf73 100644 --- a/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js +++ b/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js @@ -22,15 +22,15 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/b module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry: { - default: "quay.io", + default: "docker.io", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount: { - default: "kie-tools", + default: "apache", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName: { - default: "serverless-logic-web-tools-swf-builder-image", + default: "incubator-kie-serverless-logic-web-tools-swf-builder", description: "", }, }), diff --git a/packages/serverless-logic-web-tools-swf-builder-image/README.md b/packages/serverless-logic-web-tools-swf-builder-image/README.md new file mode 100644 index 00000000000..f5704353d3f --- /dev/null +++ b/packages/serverless-logic-web-tools-swf-builder-image/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-swf-builder-image + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js index afa3a2f7ee0..17e98228e36 100644 --- a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js +++ b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js @@ -21,16 +21,16 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/b const rootEnv = require("@kie-tools/root-env/env"); const serverlessLogicWebToolsSwfBuilderImageEnv = require("@kie-tools/serverless-logic-web-tools-swf-builder-image-env/env"); -const kogitoSwfBuilderEnv = require("@kie-tools/kogito-swf-builder/env"); +const sonataflowBuilderImageEnv = require("@kie-tools/sonataflow-builder-image/env"); -module.exports = composeEnv([rootEnv, serverlessLogicWebToolsSwfBuilderImageEnv, kogitoSwfBuilderEnv], { +module.exports = composeEnv([rootEnv, serverlessLogicWebToolsSwfBuilderImageEnv, sonataflowBuilderImageEnv], { vars: varsWithName({ SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags: { - default: "latest", + default: rootEnv.env.root.streamName, description: "", }, SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE__baseImageUrl: { - default: `${kogitoSwfBuilderEnv.env.kogitoSwfBuilder.registry}/${kogitoSwfBuilderEnv.env.kogitoSwfBuilder.account}/${kogitoSwfBuilderEnv.env.kogitoSwfBuilder.name}:${kogitoSwfBuilderEnv.env.kogitoSwfBuilder.tag}`, + default: `${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.registry}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.account}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.name}:${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.tag}`, description: "The image used in the FROM import.", }, }), diff --git a/packages/serverless-logic-web-tools-swf-builder-image/package.json b/packages/serverless-logic-web-tools-swf-builder-image/package.json index 239e71d6c4a..70e1ffccea2 100644 --- a/packages/serverless-logic-web-tools-swf-builder-image/package.json +++ b/packages/serverless-logic-web-tools-swf-builder-image/package.json @@ -15,10 +15,9 @@ "scripts": { "build:dev": "echo Nothing to do", "build:prod": "pnpm cleanup && pnpm copy:assets && run-script-os", - "build:prod:darwin": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "build:prod:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:podman:build\"", + "build:prod:darwin:win32": "echo \"Build not supported on Windows and macOS\"", + "build:prod:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", "build:prod:skipped": "pnpm cleanup && pnpm copy:assets && run-script-os", - "build:prod:win32": "echo \"Build not supported on Windows\"", "cleanup": "rimraf dist-dev && mkdir dist-dev", "copy:assets": "pnpm copy:webapp", "copy:webapp": "cp -r ./node_modules/sonataflow-deployment-webapp/dist dist-dev/webapp", @@ -26,9 +25,9 @@ "image:podman:build": "run-script-if --bool $([ $(command -v podman) ] && echo true || echo false) --then \"podman build --ulimit nofile=5000:5000 $(echo $(build-env swfBuilderImage.buildTags) | xargs printf -- \"-t $(build-env swfBuilderImageEnv.registry)/$(build-env swfBuilderImageEnv.account)/$(build-env swfBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg BASE_IMAGE_URL=$(build-env swfBuilderImage.baseImageUrl) -f Containerfile\" --else \"echo Podman not found, skipping image build.\"" }, "devDependencies": { - "@kie-tools/kogito-swf-builder": "workspace:*", "@kie-tools/root-env": "workspace:*", "@kie-tools/serverless-logic-web-tools-swf-builder-image-env": "workspace:*", + "@kie-tools/sonataflow-builder-image": "workspace:*", "rimraf": "^3.0.2", "run-script-os": "^1.1.6", "sonataflow-deployment-webapp": "workspace:*" diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/README.md b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/README.md new file mode 100644 index 00000000000..eae80fea2e5 --- /dev/null +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/install.js b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/install.js index 5f4cc7c0b82..b562eaace2c 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/install.js +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/install.js @@ -23,5 +23,5 @@ const { setup } = require("@kie-tools/maven-config-setup-helper"); setup(` -Drevision=${buildEnv.env.swfDeploymentQuarkusApp.version} -Dquarkus.platform.version=${buildEnv.env.quarkusPlatform.version} - -Dkogito.version=${buildEnv.env.kogitoRuntime.version} + -Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version} `); diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml index f65cd96d0b9..40a5864091d 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml @@ -7,15 +7,15 @@ ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at - ~ + ~ ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ + ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations - ~ under the License. + ~ under the License. --> ${revision} - 3.12.1 + 3.13.0 false 17 UTF-8 @@ -64,7 +64,7 @@ ${kogito.bom.group-id} ${kogito.bom.artifact-id} - ${kogito.version} + ${version.org.kie.kogito} pom import diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties index e2454112466..0f6898b1b35 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + quarkus.swagger-ui.always-include=true quarkus.http.cors=true quarkus.http.cors.origins=* diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid-openapi.yaml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid-openapi.yaml index 4dac0ec7086..2df20a6b80f 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid-openapi.yaml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid-openapi.yaml @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + --- openapi: 3.0.3 info: diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid.properties b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid.properties index 36f1af74c72..f1bddc39f38 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid.properties +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/invalid.properties @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + key1=value1 key2=value2 noValue diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid-openapi.yaml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid-openapi.yaml index caeae5e52c7..1839dc6cdd5 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid-openapi.yaml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid-openapi.yaml @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + --- openapi: 3.0.3 info: diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid.properties b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid.properties index 7f4f51a133f..3e6d104f322 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid.properties +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/test/resources/assets/valid.properties @@ -1,3 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + key1=value1 key2=value2 key3=value3 diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image-env/README.md b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/README.md new file mode 100644 index 00000000000..9b386656cf3 --- /dev/null +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js index bea95ead8f4..2b4502e0575 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js @@ -22,15 +22,15 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/b module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageRegistry: { - default: "quay.io", + default: "docker.io", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageAccount: { - default: "kie-tools", + default: "apache", description: "", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName: { - default: "serverless-logic-web-tools-swf-dev-mode-image", + default: "incubator-serverless-logic-web-tools-swf-dev-mode", description: "", }, }), diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/README.md b/packages/serverless-logic-web-tools-swf-dev-mode-image/README.md new file mode 100644 index 00000000000..a8c785c0f30 --- /dev/null +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools-swf-dev-mode-image + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js index 658917fa701..d994c06bb01 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js @@ -19,27 +19,28 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env"); -module.exports = composeEnv( - [require("@kie-tools/root-env/env"), require("@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env/env")], - { - vars: varsWithName({ - SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTags: { - default: "latest", - description: "", - }, - SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: { - default: "999-20240417", - description: "", - }, - }), - get env() { - return { - swfDevModeImage: { - version: require("../package.json").version, - buildTags: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTags), - kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag), - }, - }; +const rootEnv = require("@kie-tools/root-env/env"); + +module.exports = composeEnv([rootEnv, require("@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env/env")], { + vars: varsWithName({ + SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTags: { + default: rootEnv.env.root.streamName, + description: "", }, - } -); + /* (begin) This part of the file is referenced in `scripts/update-kogito-version` */ + SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: { + default: "999-20240509", + description: "", + }, + /* end */ + }), + get env() { + return { + swfDevModeImage: { + version: require("../package.json").version, + buildTags: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTags), + kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag), + }, + }; + }, +}); diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json b/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json index c4f624bd608..d7620ed198a 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json @@ -15,8 +15,7 @@ "scripts": { "build:dev": "echo Nothing to do", "build:prod": "pnpm cleanup && run-script-os", - "build:prod:darwin": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy:assets\" \"pnpm image:docker:build\"", - "build:prod:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy:assets\" \"pnpm image:podman:build\"", + "build:prod:darwin:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy:assets\" \"pnpm image:podman:build\"", "build:prod:win32": "echo \"Build not supported on Windows\"", "cleanup": "rimraf dist-dev && mkdir dist-dev", "copy:assets": "pnpm copy:quarkus-app && pnpm copy:sonataflow-deployment-webapp && pnpm copy:m2-for-sonataflow-quarkus-devui", diff --git a/packages/serverless-logic-web-tools/README.md b/packages/serverless-logic-web-tools/README.md new file mode 100644 index 00000000000..5c882c5e196 --- /dev/null +++ b/packages/serverless-logic-web-tools/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/serverless-logic-web-tools + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/serverless-logic-web-tools/env/index.js b/packages/serverless-logic-web-tools/env/index.js index 86997eb0811..41004e01ce5 100644 --- a/packages/serverless-logic-web-tools/env/index.js +++ b/packages/serverless-logic-web-tools/env/index.js @@ -19,11 +19,13 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env"); const { version } = require("@kie-tools-scripts/build-env/package.json"); + +const rootEnv = require("@kie-tools/root-env/env"); const corsProxyEnv = require("@kie-tools/cors-proxy/env"); module.exports = composeEnv( [ - require("@kie-tools/root-env/env"), + rootEnv, require("@kie-tools/serverless-logic-web-tools-swf-builder-image-env/env"), require("@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env/env"), require("@kie-tools/serverless-logic-web-tools-base-builder-image-env/env"), @@ -48,20 +50,20 @@ module.exports = composeEnv( description: "Google Tag Manager ID for Analytics", }, SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag: { - default: "latest", + default: rootEnv.env.root.streamName, description: "Tag for the Serverless Workflow Builder Image that has a pre-configured Serverless Workflow project", }, SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag: { - default: "latest", + default: rootEnv.env.root.streamName, description: "Tag for the Base Builder Image that is able to build Java projects with Maven", }, SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag: { - default: "latest", + default: rootEnv.env.root.streamName, description: "Tag for the Dashbuilder Viewer Image that has a pre-configured project to load Dashbuilder files", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageTag: { - default: "latest", + default: rootEnv.env.root.streamName, description: "Tag for the Serverless Workflow Dev Mode Image that runs a pre-configured Serverless Workflow project in Quarkus Dev Mode", }, diff --git a/packages/serverless-logic-web-tools/package.json b/packages/serverless-logic-web-tools/package.json index ccd8b720855..aac51887d85 100644 --- a/packages/serverless-logic-web-tools/package.json +++ b/packages/serverless-logic-web-tools/package.json @@ -71,7 +71,7 @@ "apollo-client": "2.6.10", "apollo-link-error": "1.1.13", "apollo-link-http": "1.5.17", - "axios": "^1.6.4", + "axios": "^1.6.8", "bowser": "^2.10.0", "buffer": "^6.0.3", "client-zip": "^2.3.1", @@ -137,7 +137,7 @@ "node-polyfill-webpack-plugin": "^2.0.1", "process": "^0.11.10", "rimraf": "^3.0.2", - "start-server-and-test": "^1.12.1", + "start-server-and-test": "^2.0.3", "ts-jest": "^26.5.6", "ts-node": "^10.9.1", "typescript": "^4.6.2", diff --git a/packages/serverless-logic-web-tools/src/homepage/routes/HomePageRoutes.tsx b/packages/serverless-logic-web-tools/src/homepage/routes/HomePageRoutes.tsx index 3d860c07b6a..a425d1cf3b2 100644 --- a/packages/serverless-logic-web-tools/src/homepage/routes/HomePageRoutes.tsx +++ b/packages/serverless-logic-web-tools/src/homepage/routes/HomePageRoutes.tsx @@ -79,8 +79,11 @@ export function HomePageRoutes(props: { isNavOpen: boolean }) { - - + + {({ match }) => } + + + {({ match }) => } {({ match }) => } @@ -91,8 +94,8 @@ export function HomePageRoutes(props: { isNavOpen: boolean }) { - - + + diff --git a/packages/serverless-logic-web-tools/src/homepage/uiNav/HomePageNav.tsx b/packages/serverless-logic-web-tools/src/homepage/uiNav/HomePageNav.tsx index 70734cc19ce..6281889c667 100644 --- a/packages/serverless-logic-web-tools/src/homepage/uiNav/HomePageNav.tsx +++ b/packages/serverless-logic-web-tools/src/homepage/uiNav/HomePageNav.tsx @@ -30,7 +30,7 @@ export function HomePageNav(props: { pathname: string }) { const settings = useSettings(); const runtimeToolsNavItem = useMemo(() => { - if (settings.runtimeTools.config.kogitoServiceUrl && settings.runtimeTools.config.dataIndexUrl) { + if (settings.runtimeTools.config.dataIndexUrl) { return ( Workflow Instances - - Trigger Cloud Event - ); } diff --git a/packages/serverless-logic-web-tools/src/navigation/Routes.ts b/packages/serverless-logic-web-tools/src/navigation/Routes.ts index 34e9015f780..6458a061bf5 100644 --- a/packages/serverless-logic-web-tools/src/navigation/Routes.ts +++ b/packages/serverless-logic-web-tools/src/navigation/Routes.ts @@ -148,14 +148,17 @@ export const routes = { runtimeToolsWorkflowDetails: new Route<{ queryParams: QueryParams.FILTERS | QueryParams.SORT_BY; pathParams: PathParams.WORKFLOW_ID; - }>(({ workflowId }) => `/runtime-tools/workflow-details/${workflowId}`), + }>(({ workflowId }) => `/runtime-tools/workflow-instances/${workflowId}`), runtimeToolsWorkflowForm: new Route<{ pathParams: PathParams.WORKFLOW_NAME; }>(({ workflowName }) => `/runtime-tools/workflow-definition/${workflowName}`), - runtimeToolsTriggerCloudEvent: new Route<{}>(() => `/runtime-tools/trigger-cloud-event`), - runtimeToolsTriggerCloudEventForWorkflow: new Route<{ + runtimeToolsTriggerCloudEventForWorkflowInstance: new Route<{ + queryParams: QueryParams.URL; pathParams: PathParams.WORKFLOW_ID; - }>(({ workflowId }) => `/runtime-tools/trigger-cloud-event/${workflowId}`), + }>(({ workflowId }) => `/runtime-tools/workflow-instances/${workflowId}/trigger-cloud-event`), + runtimeToolsTriggerCloudEventForWorkflowDefinition: new Route<{ + pathParams: PathParams.WORKFLOW_NAME; + }>(({ workflowName }) => `/runtime-tools/workflow-definition/${workflowName}/trigger-cloud-event`), settings: { home: new Route<{}>(() => SETTINGS_ROUTE), diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsCloudEventFormContextProvider.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsCloudEventFormContextProvider.tsx index e5e85e9ab68..d93ab24f0f1 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsCloudEventFormContextProvider.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsCloudEventFormContextProvider.tsx @@ -19,18 +19,13 @@ import * as React from "react"; import { WorkflowFormContextProvider } from "@kie-tools/runtime-tools-swf-webapp-components/dist/WorkflowForm"; -import { useSettings } from "../../settings/SettingsContext"; import { useEnv } from "../../env/EnvContext"; export function WebToolsCloudEventFormContextProvider(props: React.PropsWithChildren<{}>) { - const settings = useSettings(); const { env } = useEnv(); return ( - + {props.children} ); diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowDefinitionListContextProvider.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowDefinitionListContextProvider.tsx index 96d10cd01b8..593cc2b6d3d 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowDefinitionListContextProvider.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowDefinitionListContextProvider.tsx @@ -20,12 +20,17 @@ import * as React from "react"; import { WorkflowDefinitionListContextProvider } from "@kie-tools/runtime-tools-swf-webapp-components/dist/WorkflowDefinitionList"; import { useSettings } from "../../settings/SettingsContext"; +import { useEnv } from "../../env/EnvContext"; export function WebToolsWorkflowDefinitionListContextProvider(props: React.PropsWithChildren<{}>) { const settings = useSettings(); + const { env } = useEnv(); return ( - + {props.children} ); diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowFormContextProvider.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowFormContextProvider.tsx index 72b9b2d2149..ae6c1bf7534 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowFormContextProvider.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/contexts/WebToolsWorkflowFormContextProvider.tsx @@ -27,10 +27,7 @@ export function WebToolsWorkflowFormContextProvider(props: React.PropsWithChildr const { env } = useEnv(); return ( - + {props.children} ); diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsTriggerCloudEvent.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsTriggerCloudEvent.tsx index 6517964a81c..aaa705f84eb 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsTriggerCloudEvent.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsTriggerCloudEvent.tsx @@ -23,11 +23,16 @@ import { Text, TextContent, TextVariants } from "@patternfly/react-core/dist/js/ import { CloudEventFormContainer } from "@kie-tools/runtime-tools-swf-webapp-components/dist/CloudEventFormContainer"; import { Alert, AlertActionCloseButton } from "@patternfly/react-core/dist/js/components/Alert"; import { useGlobalAlert } from "../../alerts/GlobalAlertsContext"; +import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; +import { useHistory } from "react-router"; const PAGE_TITLE = "Trigger Cloud Event"; const KUBESMARTS_CLOUD_SOURCE = "/local/kubesmarts"; export function RuntimeToolsTriggerCloudEvent() { + const history = useHistory(); + const workflowDefinition: WorkflowDefinition = (history.location.state as any)["workflowDefinition"]; + const triggerEventSuccessAlert = useGlobalAlert<{ message: string }>( useCallback(({ close }, { message }) => { return ( @@ -105,6 +110,7 @@ export function RuntimeToolsTriggerCloudEvent() { onStartWorkflowError={onStartWorkflowError} onTriggerCloudEventSuccess={onTriggerEventSuccessAlert} onTriggerStartCloudEventSuccess={onTriggerStartCloudEventSuccess} + serviceUrl={workflowDefinition.serviceUrl} /> diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowDefinitions.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowDefinitions.tsx index b2de63fa2f4..994d16cb2bf 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowDefinitions.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowDefinitions.tsx @@ -25,6 +25,7 @@ import { Text, TextContent, TextVariants } from "@patternfly/react-core/dist/js/ import { useHistory } from "react-router"; import { routes } from "../../navigation/Routes"; import { WorkflowDefinition } from "@kie-tools/runtime-tools-swf-gateway-api/dist/types"; +import { CloudEventPageSource } from "@kie-tools/runtime-tools-swf-webapp-components/dist/CloudEventForm"; const PAGE_TITLE = "Workflow Definitions"; @@ -39,6 +40,7 @@ export function RuntimeToolsWorkflowDefinitions() { workflowDefinition: { workflowName: workflowDefinition.workflowName, endpoint: workflowDefinition.endpoint, + serviceUrl: workflowDefinition.serviceUrl, }, }, }); @@ -46,6 +48,25 @@ export function RuntimeToolsWorkflowDefinitions() { [history] ); + const onOpenTriggerCloudEventForWorkflow = useCallback( + (workflowDefinition: WorkflowDefinition) => { + history.push({ + pathname: routes.runtimeToolsTriggerCloudEventForWorkflowDefinition.path({ + workflowName: workflowDefinition.workflowName, + }), + state: { + workflowDefinition: { + workflowName: workflowDefinition.workflowName, + endpoint: workflowDefinition.endpoint, + serviceUrl: workflowDefinition.serviceUrl, + }, + source: CloudEventPageSource.DEFINITIONS, + }, + }); + }, + [history] + ); + return ( @@ -59,7 +80,10 @@ export function RuntimeToolsWorkflowDefinitions() { - + diff --git a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowInstances.tsx b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowInstances.tsx index b87254d4e6b..f281f88238f 100644 --- a/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowInstances.tsx +++ b/packages/serverless-logic-web-tools/src/runtimeTools/pages/RuntimeToolsWorkflowInstances.tsx @@ -43,19 +43,10 @@ export function RuntimeToolsWorkflowInstances() { [history] ); - const onOpenTriggerCloudEvent = useCallback(() => { - history.push({ - pathname: routes.runtimeToolsTriggerCloudEvent.path({}), - state: { - source: CloudEventPageSource.INSTANCES, - }, - }); - }, [history]); - const onOpenTriggerCloudEventForWorkflow = useCallback( (workflowId: string) => { history.push({ - pathname: routes.runtimeToolsTriggerCloudEventForWorkflow.path({ workflowId }), + pathname: routes.runtimeToolsTriggerCloudEventForWorkflowInstance.path({ workflowId }), state: { source: CloudEventPageSource.INSTANCES, }, @@ -79,7 +70,6 @@ export function RuntimeToolsWorkflowInstances() { diff --git a/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsConfig.tsx b/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsConfig.tsx index 7e30241396d..95c7dfad4ba 100644 --- a/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsConfig.tsx +++ b/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsConfig.tsx @@ -20,34 +20,26 @@ import { getCookie, makeCookieName, setCookie } from "../../cookies"; export const RUNTIME_TOOLS_DATA_INDEX_URL_COOKIE_NAME = makeCookieName("runtime-tools", "data-index-url"); -export const RUNTIME_TOOLS_KOGITO_SERVICE_URL_COOKIE_NAME = makeCookieName("runtime-tools", "kogito-service-url"); export interface RuntimeToolsSettingsConfig { dataIndexUrl: string; - kogitoServiceUrl: string; } export const EMPTY_CONFIG: RuntimeToolsSettingsConfig = { dataIndexUrl: "", - kogitoServiceUrl: "", }; export function isRuntimeToolsConfigValid(config: RuntimeToolsSettingsConfig): boolean { - return isDataIndexUrlValid(config.dataIndexUrl) && isKogitoServiceUrlValid(config.kogitoServiceUrl); + return isDataIndexUrlValid(config.dataIndexUrl); } export function isDataIndexUrlValid(dataIndexUrl: string): boolean { return dataIndexUrl !== undefined && dataIndexUrl.trim().length > 0; } -export function isKogitoServiceUrlValid(kogitoServiceUrl: string): boolean { - return kogitoServiceUrl !== undefined && kogitoServiceUrl.trim().length > 0; -} - export function readRuntimeToolsConfigCookie(): RuntimeToolsSettingsConfig { return { dataIndexUrl: getCookie(RUNTIME_TOOLS_DATA_INDEX_URL_COOKIE_NAME) ?? "", - kogitoServiceUrl: getCookie(RUNTIME_TOOLS_KOGITO_SERVICE_URL_COOKIE_NAME) ?? "", }; } @@ -59,11 +51,6 @@ export function saveDataIndexUrlCookie(dataIndexUrl: string): void { setCookie(RUNTIME_TOOLS_DATA_INDEX_URL_COOKIE_NAME, dataIndexUrl); } -export function saveKogitoServiceUrlCookie(kogitoServiceUrl: string): void { - setCookie(RUNTIME_TOOLS_KOGITO_SERVICE_URL_COOKIE_NAME, kogitoServiceUrl); -} - export function saveConfigCookie(config: RuntimeToolsSettingsConfig): void { saveDataIndexUrlCookie(config.dataIndexUrl); - saveKogitoServiceUrlCookie(config.kogitoServiceUrl); } diff --git a/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsSettings.tsx b/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsSettings.tsx index 111758b4b0c..ccbdd84723c 100644 --- a/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsSettings.tsx +++ b/packages/serverless-logic-web-tools/src/settings/runtimeTools/RuntimeToolsSettings.tsx @@ -65,18 +65,11 @@ export function RuntimeToolsSettings(props: SettingsPageProps) { const onClearDataIndexUrl = useCallback(() => setConfig({ ...config, dataIndexUrl: "" }), [config]); - const onClearKogitoServiceUrl = useCallback(() => setConfig({ ...config, kogitoServiceUrl: "" }), [config]); - const onDataIndexURLChanged = useCallback( (newValue: string) => setConfig({ ...config, dataIndexUrl: newValue }), [config] ); - const onKogitoServiceUrlChanged = useCallback( - (newValue: string) => setConfig({ ...config, kogitoServiceUrl: newValue }), - [config] - ); - const onReset = useCallback(() => { setConfig(EMPTY_CONFIG); settingsDispatch.runtimeTools.setConfig(EMPTY_CONFIG); @@ -86,7 +79,6 @@ export function RuntimeToolsSettings(props: SettingsPageProps) { const onApply = useCallback(() => { const newConfig: RuntimeToolsSettingsConfig = { dataIndexUrl: removeTrailingSlashFromUrl(config.dataIndexUrl), - kogitoServiceUrl: removeTrailingSlashFromUrl(config.kogitoServiceUrl), }; setConfig(newConfig); settingsDispatch.runtimeTools.setConfig(newConfig); @@ -118,9 +110,6 @@ export function RuntimeToolsSettings(props: SettingsPageProps) { Data Index URL: {config.dataIndexUrl}
- SonataFlow Service URL: - {config.kogitoServiceUrl} -

- - } - isRequired - fieldId="kogito-service-url-field" - > - - - - - - -