From e3d7753119dc7241a34084d09157f2d4c6261087 Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:01:51 +0200 Subject: [PATCH 1/3] [incubator-kie-issues#1539] Fix PIP on CI (#2023) --- .../serverless-workflow-openvino-quarkus/pom.xml | 2 ++ .../serverless-workflow-python-quarkus/pom.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml index 0a2b539737..adf0263889 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml @@ -163,6 +163,7 @@ install -r + --break-system-packages ${project.basedir}/requirements.txt @@ -177,6 +178,7 @@ pip install + --break-system-packages jep==4.2.0 diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml index 76b4a437bf..f9122f44d9 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml @@ -162,6 +162,7 @@ pip install + --break-system-packages -r ${project.basedir}/requirements.txt @@ -177,6 +178,7 @@ pip install + --break-system-packages jep==4.2.0 From f442550abc914f4051902610c0fc0aa01665f0c5 Mon Sep 17 00:00:00 2001 From: Enrique Date: Mon, 21 Oct 2024 09:21:48 +0200 Subject: [PATCH 2/3] [incubator-kie-issues-1522] Transition object to make extensible usertask transition restendpoint (#2021) --- .../quarkus/ServiceDeskProcessTest.java | 20 +++++++------------ .../kie/kogito/examples/PersonsRestIT.java | 9 +++------ .../org/acme/travels/ApprovalsRestIT.java | 5 ++--- .../springboot/ServiceDeskProcessTest.java | 20 +++++++------------ .../kogito/examples/demo/PersonsRestIT.java | 10 +++------- 5 files changed, 22 insertions(+), 42 deletions(-) diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java b/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java index 3bcad063f1..28f368ab59 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java @@ -18,7 +18,6 @@ */ package org.kie.kogito.flexible.example.quarkus; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -28,6 +27,7 @@ import org.kie.kogito.flexible.example.model.State; import org.kie.kogito.flexible.example.model.SupportCase; import org.kie.kogito.flexible.example.service.TriageService; +import org.kie.kogito.usertask.model.TransitionInfo; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; @@ -122,10 +122,9 @@ private void addSupportComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "kelly") .queryParam("group", "support") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -148,10 +147,9 @@ private void addSupportComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "kelly") .queryParam("group", "support") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -200,10 +198,9 @@ private void addCustomerComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -226,10 +223,9 @@ private void addCustomerComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -291,10 +287,9 @@ private void sendQuestionnaire(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -318,10 +313,9 @@ private void sendQuestionnaire(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java index 3981f47497..a362c7c4f1 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java @@ -18,8 +18,6 @@ */ package org.kie.kogito.examples; -import java.util.Collections; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -27,6 +25,7 @@ import org.kie.kogito.process.Process; import org.kie.kogito.testcontainers.quarkus.InfinispanQuarkusTestResource; import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; +import org.kie.kogito.usertask.model.TransitionInfo; import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; @@ -259,10 +258,9 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "release") .queryParam("user", "admin") .queryParam("group", "admins") - .body(Collections.emptyMap()) + .body(new TransitionInfo("release")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -271,10 +269,9 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "skip") .queryParam("user", "admin") .queryParam("group", "admins") - .body(Collections.emptyMap()) + .body(new TransitionInfo("skip")) .when() .post("/{userTaskId}/transition", userTaskId) .then() diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java index edaf5057ff..78fc2634d9 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java @@ -22,13 +22,13 @@ import org.keycloak.representations.AccessTokenResponse; import org.kie.kogito.test.quarkus.QuarkusTestProperty; import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; +import org.kie.kogito.usertask.model.TransitionInfo; import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; import static io.restassured.RestAssured.given; -import static java.util.Collections.emptyMap; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; @@ -105,10 +105,9 @@ public void testStartApprovalAuthorized() { .contentType(ContentType.JSON) .auth().oauth2(getAccessToken("mary")) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "manager") .queryParam("group", "managers") - .body(emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() diff --git a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java index 26b16e4828..02bf28d201 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java @@ -18,7 +18,6 @@ */ package org.kie.kogito.flexible.example.springboot; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -30,6 +29,7 @@ import org.kie.kogito.flexible.example.model.SupportCase; import org.kie.kogito.flexible.example.service.TriageService; import org.kie.kogito.tests.KogitoSpringbootApplication; +import org.kie.kogito.usertask.model.TransitionInfo; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; @@ -136,10 +136,9 @@ private void addSupportComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "kelly") .queryParam("group", "support") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -162,10 +161,9 @@ private void addSupportComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "kelly") .queryParam("group", "support") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -214,10 +212,9 @@ private void addCustomerComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -240,10 +237,9 @@ private void addCustomerComment(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -305,10 +301,9 @@ private void sendQuestionnaire(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "claim") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("claim")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -332,10 +327,9 @@ private void sendQuestionnaire(String id) { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "complete") .queryParam("user", "Paco") .queryParam("group", "customer") - .body(Collections.emptyMap()) + .body(new TransitionInfo("complete")) .when() .post("/{userTaskId}/transition", userTaskId) .then() diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java index 2b0c5844ce..273b0de99f 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java +++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java @@ -18,8 +18,6 @@ */ package org.kie.kogito.examples.demo; -import java.util.Collections; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -29,6 +27,7 @@ import org.kie.kogito.process.Process; import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; +import org.kie.kogito.usertask.model.TransitionInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; @@ -47,7 +46,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.kie.kogito.test.utils.ProcessInstancesTestUtils.abort; -@SuppressWarnings("rawtypes") @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = DemoApplication.class) @ContextConfiguration(initializers = { InfinispanSpringBootTestResource.Conditional.class, KafkaSpringBootTestResource.Conditional.class }) @@ -266,10 +264,9 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "release") .queryParam("user", "admin") .queryParam("group", "admins") - .body(Collections.emptyMap()) + .body(new TransitionInfo("release")) .when() .post("/{userTaskId}/transition", userTaskId) .then() @@ -278,10 +275,9 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { given() .contentType(ContentType.JSON) .basePath(USER_TASK_BASE_PATH) - .queryParam("transitionId", "skip") .queryParam("user", "admin") .queryParam("group", "admins") - .body(Collections.emptyMap()) + .body(new TransitionInfo("skip")) .when() .post("/{userTaskId}/transition", userTaskId) .then() From bfc8191318e11f5110497fbd8fd62b09b06a0550 Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:59:30 +0200 Subject: [PATCH 3/3] Revert "[incubator-kie-issues#1539] Fix PIP on CI (#2023)" (#2027) This reverts commit 4d445c29d543af8c3ea87fdc81553a7bbd3aa233. --- .../serverless-workflow-openvino-quarkus/pom.xml | 2 -- .../serverless-workflow-python-quarkus/pom.xml | 2 -- 2 files changed, 4 deletions(-) diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml index adf0263889..0a2b539737 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml @@ -163,7 +163,6 @@ install -r - --break-system-packages ${project.basedir}/requirements.txt @@ -178,7 +177,6 @@ pip install - --break-system-packages jep==4.2.0 diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml index f9122f44d9..76b4a437bf 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml @@ -162,7 +162,6 @@ pip install - --break-system-packages -r ${project.basedir}/requirements.txt @@ -178,7 +177,6 @@ pip install - --break-system-packages jep==4.2.0