This is an automated email from the ASF dual-hosted git repository.
pefernan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new c8ed0c78f incubator-kie-issues#2307 add process id and version into
data-index … (#2348)
c8ed0c78f is described below
commit c8ed0c78f13ba52d2152444b132c09c82d2597e4
Author: Jan Stastny <[email protected]>
AuthorDate: Fri Jul 10 11:13:56 2026 +0200
incubator-kie-issues#2307 add process id and version into data-index …
(#2348)
* incubator-kie-issues#2307 add process id and version into data-index
graphql schema
* fix testing bpmn
* extend timeout for QuarkusJPAJobStoreTest
---------
Co-authored-by: jstastny-cz <[email protected]>
---
.../main/resources/graphql/basic.schema.graphqls | 21 +-
.../jpa/mapper/ProcessInstanceEntityMapper.java | 7 +-
.../index/jpa/model/ProcessInstanceEntity.java | 2 +
.../src/main/resources/child.bpmn | 263 ++++++++++++++++++++
.../src/main/resources/parent.bpmn | 268 +++++++++++++++++++++
.../data/index/it/JPAQuarkusAddonDataIndexIT.java | 78 +++++-
.../jobs/jpa/quarkus/QuarkusJPAJobStoreTest.java | 2 +-
7 files changed, 629 insertions(+), 12 deletions(-)
diff --git
a/data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
b/data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
index 6d12f99e2..bad93807a 100644
---
a/data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
+++
b/data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
@@ -84,11 +84,13 @@ type TimerInstance {
type ProcessInstance {
id: String!
processId: String!
- version: String
+ processVersion: String
+ version: String @deprecated(reason: "Use 'processVersion' instead.")
processName: String
parentProcessInstanceId: String
rootProcessInstanceId: String
rootProcessId: String
+ rootProcessVersion: String
roles: [String!]
state: ProcessInstanceState
endpoint: String!
@@ -185,8 +187,10 @@ type Milestone {
input ProcessInstanceOrderBy {
processId: OrderBy
+ processVersion: OrderBy
processName: OrderBy
rootProcessId: OrderBy
+ rootProcessVersion: OrderBy
state: OrderBy
start: OrderBy
end: OrderBy
@@ -208,10 +212,12 @@ input ProcessInstanceArgument {
not: ProcessInstanceArgument
id: IdArgument
processId: StringArgument
+ processVersion: StringArgument
processName: StringArgument
parentProcessInstanceId: IdArgument
rootProcessInstanceId: IdArgument
rootProcessId: StringArgument
+ rootProcessVersion: StringArgument
state: ProcessInstanceStateArgument
error: ProcessInstanceErrorArgument
nodes: NodeInstanceArrayArgument
@@ -430,8 +436,10 @@ type UserTaskInstance {
priority: String
processInstanceId: String!
processId: String
+ processVersion: String
rootProcessInstanceId: String
rootProcessId: String
+ rootProcessVersion: String
state: String
actualOwner: String
adminGroups: [String!]
@@ -462,6 +470,7 @@ input UserTaskInstanceArgument {
name: StringArgument
priority: StringArgument
processId: StringArgument
+ processVersion: StringArgument
processInstanceId: IdArgument
actualOwner: StringArgument
potentialUsers: StringArrayArgument
@@ -478,6 +487,7 @@ input UserTaskInstanceArgument {
slaDueDate: DateArgument
rootProcessInstanceId: StringArgument
rootProcessId: StringArgument
+ rootProcessVersion: StringArgument
externalReferenceId: StringArgument
endpoint: StringArgument
}
@@ -533,6 +543,9 @@ input UserTaskInstanceOrderBy {
name: OrderBy
priority: OrderBy
processId: OrderBy
+ processVersion: OrderBy
+ rootProcessId: OrderBy
+ rootProcessVersion: OrderBy
completed: OrderBy
started: OrderBy
referenceName: OrderBy
@@ -552,10 +565,12 @@ input Pagination {
type Job {
id: String!
processId: String
+ processVersion: String
processInstanceId: String
nodeInstanceId: String
rootProcessInstanceId: String
rootProcessId: String
+ rootProcessVersion: String
status: JobStatus!
expirationTime: DateTime
priority: Int
@@ -591,10 +606,12 @@ input JobArgument {
not: JobArgument
id: IdArgument
processId: StringArgument
+ processVersion: StringArgument
processInstanceId: IdArgument
nodeInstanceId: IdArgument
rootProcessInstanceId: IdArgument
rootProcessId: StringArgument
+ rootProcessVersion: StringArgument
status: JobStatusArgument
expirationTime: DateArgument
priority: NumericArgument
@@ -605,7 +622,9 @@ input JobArgument {
input JobOrderBy {
processId: OrderBy
+ processVersion: OrderBy
rootProcessId: OrderBy
+ rootProcessVersion: OrderBy
status: OrderBy
expirationTime: OrderBy
priority: OrderBy
diff --git
a/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/mapper/ProcessInstanceEntityMapper.java
b/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/mapper/ProcessInstanceEntityMapper.java
index 746a11372..36e3dfc68 100644
---
a/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/mapper/ProcessInstanceEntityMapper.java
+++
b/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/mapper/ProcessInstanceEntityMapper.java
@@ -22,10 +22,7 @@ import org.kie.kogito.index.jpa.model.MilestoneEntity;
import org.kie.kogito.index.jpa.model.ProcessInstanceEntity;
import org.kie.kogito.index.model.Milestone;
import org.kie.kogito.index.model.ProcessInstance;
-import org.mapstruct.AfterMapping;
-import org.mapstruct.InheritInverseConfiguration;
-import org.mapstruct.Mapper;
-import org.mapstruct.MappingTarget;
+import org.mapstruct.*;
import org.mapstruct.factory.Mappers;
@Mapper(suppressTimestampInGenerated = true)
@@ -38,9 +35,11 @@ public interface ProcessInstanceEntityMapper {
@InheritInverseConfiguration
Milestone mapMilestoneToModel(MilestoneEntity pi);
+ @Mapping(source = "processVersion", target = "version")
ProcessInstanceEntity mapToEntity(ProcessInstance pi);
@InheritInverseConfiguration
+ @Mapping(source = "version", target = "processVersion")
ProcessInstance mapToModel(ProcessInstanceEntity pi);
@AfterMapping
diff --git
a/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/model/ProcessInstanceEntity.java
b/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/model/ProcessInstanceEntity.java
index e5e77752e..052f4bd05 100644
---
a/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/model/ProcessInstanceEntity.java
+++
b/data-index/data-index-storage/data-index-storage-jpa-common/src/main/java/org/kie/kogito/index/jpa/model/ProcessInstanceEntity.java
@@ -51,6 +51,8 @@ public class ProcessInstanceEntity extends AbstractEntity {
private String id;
private String processId;
private String version;
+ @Column(name = "version", insertable = false, updatable = false)
+ private String processVersion;
private String processName;
private Integer state;
private String businessKey;
diff --git
a/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/child.bpmn
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/child.bpmn
new file mode 100644
index 000000000..67de05643
--- /dev/null
+++
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/child.bpmn
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+-->
+<bpmn2:definitions
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
+ xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+ xmlns:drools="http://www.jboss.org/drools"
+ id="child"
+ xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0
bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd
http://www.omg.org/spec/DD/20100524/DI DI.xsd "
+ exporter="jBPM Process Modeler"
+ exporterVersion="2.0"
+ targetNamespace="http://www.omg.org/bpmn20"
+>
+ <bpmn2:itemDefinition id="_dataItem" structureRef="String" />
+ <bpmn2:itemDefinition id="_stringItem" structureRef="String" />
+ <bpmn2:itemDefinition id="__SCRIPT_TASK_dataInputXItem"
structureRef="String" />
+ <bpmn2:itemDefinition id="__SCRIPT_TASK_dataOutputXItem"
structureRef="String" />
+ <bpmn2:itemDefinition id="__USER_TASK_SkippableInputXItem"
structureRef="Object" />
+ <bpmn2:itemDefinition id="__USER_TASK_TaskNameInputXItem"
structureRef="Object" />
+ <bpmn2:itemDefinition id="__USER_TASK_dataInputXItem" structureRef="String"
/>
+ <bpmn2:itemDefinition id="__USER_TASK_dataOutputXItem" structureRef="String"
/>
+ <bpmn2:collaboration id="_CHILD_COLLAB_ID" name="Default Collaboration">
+ <bpmn2:participant id="_CHILD_PARTICIPANT_ID" name="Pool Participant"
processRef="child" />
+ </bpmn2:collaboration>
+ <bpmn2:process
+ id="child"
+ drools:packageName="com.example"
+ drools:version="1.0"
+ drools:adHoc="false"
+ name="child"
+ isExecutable="true"
+ processType="Public"
+ >
+ <bpmn2:extensionElements>
+ <drools:metaData name="customDescription">
+ <drools:metaValue><![CDATA[Child subprocess that uses root_process_id
for filtering]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:property id="data" itemSubjectRef="_dataItem" name="data">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue><![CDATA[input,output]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="parentProcessId" itemSubjectRef="_dataItem"
name="parentProcessId">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue><![CDATA[input]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="childStatus" itemSubjectRef="_stringItem"
name="childStatus"/>
+ <bpmn2:sequenceFlow
+ id="_SF_START_TO_SCRIPT"
+ sourceRef="_START_EVENT"
+ targetRef="_SCRIPT_TASK"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_SCRIPT_TO_USERTASK"
+ sourceRef="_SCRIPT_TASK"
+ targetRef="_USER_TASK"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_USERTASK_TO_GATEWAY"
+ sourceRef="_USER_TASK"
+ targetRef="_CONVERGING_GATEWAY"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_TIMER_TO_GATEWAY"
+ sourceRef="_BOUNDARY_TIMER"
+ targetRef="_CONVERGING_GATEWAY"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_GATEWAY_TO_END"
+ sourceRef="_CONVERGING_GATEWAY"
+ targetRef="_END_EVENT"
+ />
+
+ <bpmn2:startEvent id="_START_EVENT" name="Start">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Start]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:outgoing>_SF_START_TO_SCRIPT</bpmn2:outgoing>
+ </bpmn2:startEvent>
+
+ <bpmn2:scriptTask id="_SCRIPT_TASK" name="Process Data"
scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Process Data]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_START_TO_SCRIPT</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_SCRIPT_TO_USERTASK</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_SCRIPT_TASK_dataInputX" drools:dtype="String"
itemSubjectRef="__SCRIPT_TASK_dataInputXItem" name="data" />
+ <bpmn2:dataOutput id="_SCRIPT_TASK_dataOutputX" drools:dtype="String"
itemSubjectRef="__SCRIPT_TASK_dataOutputXItem" name="data" />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_SCRIPT_TASK_dataInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_SCRIPT_TASK_dataOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>data</bpmn2:sourceRef>
+ <bpmn2:targetRef>_SCRIPT_TASK_dataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_SCRIPT_TASK_dataOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>data</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:script><![CDATA[
+System.out.println("Child subprocess executing for parent: " +
kcontext.getProcessInstance().getParentProcessInstanceId());
+kcontext.setVariable("data", "processed-" + data);]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:userTask id="_USER_TASK" name="Approve Child Task">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Approve Child Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_SCRIPT_TO_USERTASK</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_USERTASK_TO_END</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_USER_TASK_TaskNameInputX" drools:dtype="Object"
itemSubjectRef="__USER_TASK_TaskNameInputXItem" name="TaskName" />
+ <bpmn2:dataInput id="_USER_TASK_SkippableInputX" drools:dtype="Object"
itemSubjectRef="__USER_TASK_SkippableInputXItem" name="Skippable" />
+ <bpmn2:dataInput id="_USER_TASK_dataInputX" drools:dtype="String"
itemSubjectRef="__USER_TASK_dataInputXItem" name="data" />
+ <bpmn2:dataOutput id="_USER_TASK_dataOutputX" drools:dtype="String"
itemSubjectRef="__USER_TASK_dataOutputXItem" name="data" />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_USER_TASK_TaskNameInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_USER_TASK_SkippableInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_USER_TASK_dataInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_USER_TASK_dataOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_USER_TASK_TaskNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[ChildApproval]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_USER_TASK_TaskNameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_USER_TASK_SkippableInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_USER_TASK_SkippableInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>data</bpmn2:sourceRef>
+ <bpmn2:targetRef>_USER_TASK_dataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_USER_TASK_dataOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>data</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner>
+ <bpmn2:resourceAssignmentExpression>
+ <bpmn2:formalExpression>#{parentProcessId}</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:boundaryEvent id="_BOUNDARY_TIMER" name="Auto Complete"
attachedToRef="_USER_TASK" cancelActivity="true">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Auto Complete]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:outgoing>_SF_TIMER_TO_GATEWAY</bpmn2:outgoing>
+ <bpmn2:timerEventDefinition>
+ <bpmn2:timeDuration
xsi:type="bpmn2:tFormalExpression">PT24H</bpmn2:timeDuration>
+ </bpmn2:timerEventDefinition>
+ </bpmn2:boundaryEvent>
+ <bpmn2:exclusiveGateway id="_CONVERGING_GATEWAY" name="Converge"
gatewayDirection="Converging">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Converge]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_USERTASK_TO_GATEWAY</bpmn2:incoming>
+ <bpmn2:incoming>_SF_TIMER_TO_GATEWAY</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_GATEWAY_TO_END</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="_END_EVENT" name="End">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[End]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_GATEWAY_TO_END</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="child">
+ <bpmndi:BPMNShape id="shape__START_EVENT" bpmnElement="_START_EVENT">
+ <dc:Bounds height="56" width="56" x="100" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__SCRIPT_TASK" bpmnElement="_SCRIPT_TASK">
+ <dc:Bounds height="102" width="154" x="206" y="77" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__USER_TASK" bpmnElement="_USER_TASK">
+ <dc:Bounds height="102" width="154" x="410" y="77" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__BOUNDARY_TIMER"
bpmnElement="_BOUNDARY_TIMER">
+ <dc:Bounds height="56" width="56" x="459" y="151" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__CONVERGING_GATEWAY"
bpmnElement="_CONVERGING_GATEWAY">
+ <dc:Bounds height="56" width="56" x="614" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__END_EVENT" bpmnElement="_END_EVENT">
+ <dc:Bounds height="56" width="56" x="720" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge_shape__START_EVENT_to_shape__SCRIPT_TASK"
bpmnElement="_SF_START_TO_SCRIPT">
+ <di:waypoint x="156" y="128" />
+ <di:waypoint x="206" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__SCRIPT_TASK_to_shape__USER_TASK"
bpmnElement="_SF_SCRIPT_TO_USERTASK">
+ <di:waypoint x="360" y="128" />
+ <di:waypoint x="410" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__USER_TASK_to_shape__CONVERGING_GATEWAY"
bpmnElement="_SF_USERTASK_TO_GATEWAY">
+ <di:waypoint x="564" y="128" />
+ <di:waypoint x="614" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__BOUNDARY_TIMER_to_shape__CONVERGING_GATEWAY"
bpmnElement="_SF_TIMER_TO_GATEWAY">
+ <di:waypoint x="487" y="207" />
+ <di:waypoint x="487" y="240" />
+ <di:waypoint x="642" y="240" />
+ <di:waypoint x="642" y="156" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__CONVERGING_GATEWAY_to_shape__END_EVENT"
bpmnElement="_SF_GATEWAY_TO_END">
+ <di:waypoint x="670" y="128" />
+ <di:waypoint x="720" y="128" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git
a/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/parent.bpmn
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/parent.bpmn
new file mode 100644
index 000000000..ad86c6af9
--- /dev/null
+++
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/parent.bpmn
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+-->
+<bpmn2:definitions
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
+ xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+ xmlns:drools="http://www.jboss.org/drools"
+ id="parent"
+ xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0
bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd
http://www.omg.org/spec/DD/20100524/DI DI.xsd "
+ exporter="jBPM Process Modeler"
+ exporterVersion="2.0"
+ targetNamespace="http://www.omg.org/bpmn20"
+>
+ <bpmn2:itemDefinition id="_dataItem" structureRef="String" />
+ <bpmn2:itemDefinition id="__SUBPROCESS_dataInputXItem" structureRef="String"
/>
+ <bpmn2:itemDefinition id="__SUBPROCESS_dataOutputXItem"
structureRef="String" />
+ <bpmn2:itemDefinition id="__SUBPROCESS_parentProcessIdInputXItem"
structureRef="String" />
+ <bpmn2:itemDefinition id="__USER_TASK_SkippableInputXItem"
structureRef="Object" />
+ <bpmn2:itemDefinition id="__USER_TASK_TaskNameInputXItem"
structureRef="Object" />
+ <bpmn2:itemDefinition id="__USER_TASK_dataInputXItem" structureRef="String"
/>
+ <bpmn2:itemDefinition id="__USER_TASK_dataOutputXItem" structureRef="String"
/>
+ <bpmn2:collaboration id="_PARENT_COLLAB_ID" name="Default Collaboration">
+ <bpmn2:participant id="_PARENT_PARTICIPANT_ID" name="Pool Participant"
processRef="parent" />
+ </bpmn2:collaboration>
+ <bpmn2:process
+ id="parent"
+ drools:packageName="com.example"
+ drools:version="1.0"
+ drools:adHoc="false"
+ name="parent"
+ isExecutable="true"
+ processType="Public"
+ >
+ <bpmn2:property id="data" itemSubjectRef="_dataItem" name="data">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue><![CDATA[input,output]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:property id="parentProcessId" itemSubjectRef="_dataItem"
name="parentProcessId">
+ <bpmn2:extensionElements>
+ <drools:metaData name="customTags">
+ <drools:metaValue><![CDATA[input]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:property>
+ <bpmn2:sequenceFlow
+ id="_SF_START_TO_FORK"
+ sourceRef="_START_EVENT"
+ targetRef="_PARALLEL_FORK"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_FORK_TO_USERTASK"
+ sourceRef="_PARALLEL_FORK"
+ targetRef="_USER_TASK"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_FORK_TO_SUBPROCESS"
+ sourceRef="_PARALLEL_FORK"
+ targetRef="_CALL_CHILD_SUBPROCESS"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_USERTASK_TO_JOIN"
+ sourceRef="_USER_TASK"
+ targetRef="_PARALLEL_JOIN"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_SUBPROCESS_TO_JOIN"
+ sourceRef="_CALL_CHILD_SUBPROCESS"
+ targetRef="_PARALLEL_JOIN"
+ />
+ <bpmn2:sequenceFlow
+ id="_SF_JOIN_TO_END"
+ sourceRef="_PARALLEL_JOIN"
+ targetRef="_END_EVENT"
+ />
+ <bpmn2:startEvent id="_START_EVENT" name="Start">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Start]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:outgoing>_SF_START_TO_FORK</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ <bpmn2:parallelGateway id="_PARALLEL_FORK" name="Fork"
gatewayDirection="Diverging">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Fork]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_START_TO_FORK</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_FORK_TO_USERTASK</bpmn2:outgoing>
+ <bpmn2:outgoing>_SF_FORK_TO_SUBPROCESS</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:userTask id="_USER_TASK" name="Approve Parent Task">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Approve Parent Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_FORK_TO_USERTASK</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_USERTASK_TO_JOIN</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_USER_TASK_TaskNameInputX" drools:dtype="Object"
itemSubjectRef="__USER_TASK_TaskNameInputXItem" name="TaskName" />
+ <bpmn2:dataInput id="_USER_TASK_SkippableInputX" drools:dtype="Object"
itemSubjectRef="__USER_TASK_SkippableInputXItem" name="Skippable" />
+ <bpmn2:dataInput id="_USER_TASK_dataInputX" drools:dtype="String"
itemSubjectRef="__USER_TASK_dataInputXItem" name="data" />
+ <bpmn2:dataOutput id="_USER_TASK_dataOutputX" drools:dtype="String"
itemSubjectRef="__USER_TASK_dataOutputXItem" name="data" />
+ <bpmn2:inputSet>
+ <bpmn2:dataInputRefs>_USER_TASK_TaskNameInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_USER_TASK_SkippableInputX</bpmn2:dataInputRefs>
+ <bpmn2:dataInputRefs>_USER_TASK_dataInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+ <bpmn2:dataOutputRefs>_USER_TASK_dataOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_USER_TASK_TaskNameInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[ParentApproval]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_USER_TASK_TaskNameInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:targetRef>_USER_TASK_SkippableInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[false]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_USER_TASK_SkippableInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>data</bpmn2:sourceRef>
+ <bpmn2:targetRef>_USER_TASK_dataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_USER_TASK_dataOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>data</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:potentialOwner>
+ <bpmn2:resourceAssignmentExpression>
+ <bpmn2:formalExpression>parent</bpmn2:formalExpression>
+ </bpmn2:resourceAssignmentExpression>
+ </bpmn2:potentialOwner>
+ </bpmn2:userTask>
+ <bpmn2:callActivity id="_CALL_CHILD_SUBPROCESS" name="Call Child Process"
calledElement="child">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Call Child Process]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_FORK_TO_SUBPROCESS</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_SUBPROCESS_TO_JOIN</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput id="_CALL_CHILD_SUBPROCESS_dataInputX"
drools:dtype="String" itemSubjectRef="__SUBPROCESS_dataInputXItem" name="data"
/>
+ <bpmn2:dataInput id="_CALL_CHILD_SUBPROCESS_parentProcessIdInputX"
drools:dtype="String" itemSubjectRef="__SUBPROCESS_parentProcessIdInputXItem"
name="parentProcessId" />
+ <bpmn2:dataOutput id="_CALL_CHILD_SUBPROCESS_dataOutputX"
drools:dtype="String" itemSubjectRef="__SUBPROCESS_dataOutputXItem" name="data"
/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_CALL_CHILD_SUBPROCESS_dataInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_CALL_CHILD_SUBPROCESS_parentProcessIdInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_CALL_CHILD_SUBPROCESS_dataOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>data</bpmn2:sourceRef>
+ <bpmn2:targetRef>_CALL_CHILD_SUBPROCESS_dataInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>parentProcessId</bpmn2:sourceRef>
+
<bpmn2:targetRef>_CALL_CHILD_SUBPROCESS_parentProcessIdInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+ <bpmn2:sourceRef>_CALL_CHILD_SUBPROCESS_dataOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>data</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:callActivity>
+ <bpmn2:parallelGateway id="_PARALLEL_JOIN" name="Join"
gatewayDirection="Converging">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Join]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_USERTASK_TO_JOIN</bpmn2:incoming>
+ <bpmn2:incoming>_SF_SUBPROCESS_TO_JOIN</bpmn2:incoming>
+ <bpmn2:outgoing>_SF_JOIN_TO_END</bpmn2:outgoing>
+ </bpmn2:parallelGateway>
+ <bpmn2:endEvent id="_END_EVENT" name="End">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[End]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_SF_JOIN_TO_END</bpmn2:incoming>
+ </bpmn2:endEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="parent">
+ <bpmndi:BPMNShape id="shape__START_EVENT" bpmnElement="_START_EVENT">
+ <dc:Bounds height="56" width="56" x="100" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__PARALLEL_FORK" bpmnElement="_PARALLEL_FORK">
+ <dc:Bounds height="56" width="56" x="206" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__USER_TASK" bpmnElement="_USER_TASK">
+ <dc:Bounds height="102" width="154" x="312" y="30" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__CALL_CHILD_SUBPROCESS"
bpmnElement="_CALL_CHILD_SUBPROCESS">
+ <dc:Bounds height="102" width="154" x="312" y="170" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__PARALLEL_JOIN" bpmnElement="_PARALLEL_JOIN">
+ <dc:Bounds height="56" width="56" x="516" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__END_EVENT" bpmnElement="_END_EVENT">
+ <dc:Bounds height="56" width="56" x="622" y="100" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="edge_shape__START_EVENT_to_shape__PARALLEL_FORK"
bpmnElement="_SF_START_TO_FORK">
+ <di:waypoint x="156" y="128" />
+ <di:waypoint x="206" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__PARALLEL_FORK_to_shape__USER_TASK"
bpmnElement="_SF_FORK_TO_USERTASK">
+ <di:waypoint x="234" y="128" />
+ <di:waypoint x="234" y="81" />
+ <di:waypoint x="312" y="81" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__PARALLEL_FORK_to_shape__CALL_CHILD_SUBPROCESS"
bpmnElement="_SF_FORK_TO_SUBPROCESS">
+ <di:waypoint x="234" y="128" />
+ <di:waypoint x="234" y="221" />
+ <di:waypoint x="312" y="221" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__USER_TASK_to_shape__PARALLEL_JOIN"
bpmnElement="_SF_USERTASK_TO_JOIN">
+ <di:waypoint x="466" y="81" />
+ <di:waypoint x="544" y="81" />
+ <di:waypoint x="544" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__CALL_CHILD_SUBPROCESS_to_shape__PARALLEL_JOIN"
bpmnElement="_SF_SUBPROCESS_TO_JOIN">
+ <di:waypoint x="466" y="221" />
+ <di:waypoint x="544" y="221" />
+ <di:waypoint x="544" y="128" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="edge_shape__PARALLEL_JOIN_to_shape__END_EVENT"
bpmnElement="_SF_JOIN_TO_END">
+ <di:waypoint x="572" y="128" />
+ <di:waypoint x="622" y="128" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn2:definitions>
diff --git
a/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
index c281a08e3..c077d0d92 100644
---
a/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
+++
b/kogito-apps-quarkus/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
@@ -25,8 +25,7 @@ import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import static io.restassured.RestAssured.given;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@QuarkusIntegrationTest
@@ -39,13 +38,14 @@ class JPAQuarkusAddonDataIndexIT {
@Test
void testDataIndexAddon() {
String processDefId = "hello";
+ String processDefVersion = "1.0";
given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
"\\\"}}){ id, version, name } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessDefinitions.size()", is(1))
- .body("data.ProcessDefinitions[0].id", is("hello"))
- .body("data.ProcessDefinitions[0].version", is("1.0"))
+ .body("data.ProcessDefinitions[0].id", is(processDefId))
+ .body("data.ProcessDefinitions[0].version",
is(processDefVersion))
.body("data.ProcessDefinitions[0].name", is("hello"));
given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessInstances{ id } }\" }")
@@ -63,7 +63,8 @@ class JPAQuarkusAddonDataIndexIT {
.extract().path("id");
given().contentType(ContentType.JSON)
- .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + processInstanceId + "\\\"}}){ id, state, diagram, source,
nodeDefinitions { name } } }\" }")
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + processInstanceId
+ + "\\\"}}){ id, state, diagram, source,
nodeDefinitions { name }, processId, processVersion } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessInstances.size()", is(1))
@@ -71,7 +72,72 @@ class JPAQuarkusAddonDataIndexIT {
.body("data.ProcessInstances[0].state", is("COMPLETED"))
.body("data.ProcessInstances[0].diagram", is(notNullValue()))
.body("data.ProcessInstances[0].source", is(notNullValue()))
- .body("data.ProcessInstances[0].nodeDefinitions.size()",
is(2));
+ .body("data.ProcessInstances[0].nodeDefinitions.size()", is(2))
+ .body("data.ProcessInstances[0].processId", is(processDefId))
+ .body("data.ProcessInstances[0].processVersion",
is(processDefVersion));
+ }
+
+ @Test
+ void testProcessRelevantInformationAcrossSchema() {
+ String parentDefId = "parent";
+ String parentDefVersion = "1.0";
+ String childDefId = "child";
+ String childDefVersion = "1.0";
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessDefinitions(where: { id: {equal: \\\"" + parentDefId +
+ "\\\"}}){ id, version, name } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessDefinitions.size()", is(1))
+ .body("data.ProcessDefinitions[0].id", is(parentDefId))
+ .body("data.ProcessDefinitions[0].version",
is(parentDefVersion))
+ .body("data.ProcessDefinitions[0].name", is(parentDefId));
+
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessInstances{ id } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()",
is(greaterThanOrEqualTo(0)));
+
+ String parentInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .post("/" + parentDefId)
+ .then()
+ .statusCode(201)
+ .body("id", is(notNullValue()))
+ .extract().path("id");
+
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + parentInstanceId
+ + "\\\"}}){ id, state, diagram, source,
nodeDefinitions { name }, processId, processVersion } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(1))
+ .body("data.ProcessInstances[0].id", is(parentInstanceId))
+ .body("data.ProcessInstances[0].processId", is(parentDefId))
+ .body("data.ProcessInstances[0].processVersion",
is(parentDefVersion));
+
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{UserTaskInstances(where: { and: {
processId: {equal: \\\"" + parentDefId
+ + "\\\"}, processVersion:{equal: \\\"" +
parentDefVersion + "\\\"}}}){ id, processId, processVersion, rootProcessId,
rootProcessVersion } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.UserTaskInstances.size()", is(1))
+ .body("data.UserTaskInstances[0].id", is(notNullValue()))
+ .body("data.UserTaskInstances[0].processId", is(parentDefId))
+ .body("data.UserTaskInstances[0].processVersion",
is(parentDefVersion))
+ .body("data.UserTaskInstances[0].rootProcessId",
is(nullValue()))
+ .body("data.UserTaskInstances[0].rootProcessVersion",
is(nullValue()));
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{UserTaskInstances(where: { and:
{rootProcessId: {equal: \\\"" + parentDefId
+ + "\\\"}, rootProcessVersion:{equal: \\\"" +
parentDefVersion + "\\\"}}}){ id, processId, processVersion, rootProcessId,
rootProcessVersion } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.UserTaskInstances.size()", is(1))
+ .body("data.UserTaskInstances[0].id", is(notNullValue()))
+ .body("data.UserTaskInstances[0].processId", is(childDefId))
+ .body("data.UserTaskInstances[0].processVersion",
is(childDefVersion))
+ .body("data.UserTaskInstances[0].rootProcessId",
is(parentDefId))
+ .body("data.UserTaskInstances[0].rootProcessVersion",
is(parentDefVersion));
}
@Test
diff --git
a/kogito-apps-quarkus/jobs-quarkus/kogito-addons-quarkus-embedded-jobs/src/test/java/org/kie/kogito/app/jobs/jpa/quarkus/QuarkusJPAJobStoreTest.java
b/kogito-apps-quarkus/jobs-quarkus/kogito-addons-quarkus-embedded-jobs/src/test/java/org/kie/kogito/app/jobs/jpa/quarkus/QuarkusJPAJobStoreTest.java
index 69ab81e98..45b373b4c 100644
---
a/kogito-apps-quarkus/jobs-quarkus/kogito-addons-quarkus-embedded-jobs/src/test/java/org/kie/kogito/app/jobs/jpa/quarkus/QuarkusJPAJobStoreTest.java
+++
b/kogito-apps-quarkus/jobs-quarkus/kogito-addons-quarkus-embedded-jobs/src/test/java/org/kie/kogito/app/jobs/jpa/quarkus/QuarkusJPAJobStoreTest.java
@@ -88,6 +88,6 @@ public class QuarkusJPAJobStoreTest {
listener.setCount(4);
jobsService.scheduleJob(jobDescription);
- Awaitility.await().atMost(Duration.ofSeconds(5L)).untilAsserted(() ->
assertThat(exceptionHandler.isError()).isTrue());
+ Awaitility.await().atMost(Duration.ofSeconds(10L)).untilAsserted(() ->
assertThat(exceptionHandler.isError()).isTrue());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]