diff --git a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-rest/src/test/java/org/activiti/cloud/services/query/rest/ProcessInstanceControllerHelperIT.java b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-rest/src/test/java/org/activiti/cloud/services/query/rest/ProcessInstanceControllerHelperIT.java index 6d1bfc72dc..86d58b2da8 100644 --- a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-rest/src/test/java/org/activiti/cloud/services/query/rest/ProcessInstanceControllerHelperIT.java +++ b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-rest/src/test/java/org/activiti/cloud/services/query/rest/ProcessInstanceControllerHelperIT.java @@ -125,7 +125,7 @@ public void shouldReturnAllProcessInstancesWithVariables() { .willReturn(true); given(securityManager.getAuthenticatedUserId()).willReturn("testuser"); - Set variables = createProcessVariables(processInstanceEntity, 8); + Set variables = createProcessVariables(8); List variableKeys = variables.stream().map(ProcessVariableEntity::getName).collect(Collectors.toList()); Predicate predicate = null; int pageSize = 30; @@ -190,7 +190,7 @@ private ProcessInstanceEntity buildSubprocessInstance(ProcessInstanceEntity pare return subprocessInstance; } - private Set createProcessVariables(ProcessInstanceEntity processInstanceEntity, int count) { + private Set createProcessVariables(int count) { Set variables = new HashSet<>(); for (int i = 0; i < count; i++) { ProcessVariableEntity variable = new ProcessVariableEntity(); diff --git a/activiti-cloud-query-service/activiti-cloud-starter-query/src/test/resources/swagger-expected.json b/activiti-cloud-query-service/activiti-cloud-starter-query/src/test/resources/swagger-expected.json index cc3730b524..b66e9a70d9 100644 --- a/activiti-cloud-query-service/activiti-cloud-starter-query/src/test/resources/swagger-expected.json +++ b/activiti-cloud-query-service/activiti-cloud-starter-query/src/test/resources/swagger-expected.json @@ -199,12 +199,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } } } @@ -1787,12 +1787,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } } } @@ -2371,12 +2371,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_General" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_General" } } } @@ -2476,12 +2476,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } } } @@ -3571,12 +3571,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_ProcessVariables" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_ProcessVariables" } } } @@ -3645,12 +3645,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_General" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_General" } } } @@ -4202,12 +4202,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_General" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ListResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/ListResponseContentQueryCloudProcessInstance_General" } } } @@ -5284,12 +5284,12 @@ "content": { "application/hal+json": { "schema": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_General" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_General" } } } @@ -6755,19 +6755,13 @@ "standalone": { "type": "boolean" }, - "parentTaskId": { - "type": "string" - }, - "taskDefinitionKey": { - "type": "string" - }, - "processDefinitionId": { - "type": "string" - }, "completedDate": { "type": "string", "format": "date-time" }, + "processDefinitionId": { + "type": "string" + }, "processInstanceId": { "type": "string" }, @@ -6783,15 +6777,21 @@ "type": "string" } }, - "businessKey": { + "parentTaskId": { "type": "string" }, - "assignee": { + "taskDefinitionKey": { "type": "string" }, "formKey": { "type": "string" }, + "businessKey": { + "type": "string" + }, + "assignee": { + "type": "string" + }, "createdDate": { "type": "string", "format": "date-time" @@ -6917,10 +6917,50 @@ } } }, - "CloudProcessInstance_ProcessVariables": { - "title": "CloudProcessInstance_ProcessVariables", + "EntriesResponseContentQueryCloudProcessInstance_ProcessVariables": { + "title": "EntriesResponseContentQueryCloudProcessInstance_ProcessVariables", "type": "object", "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_ProcessVariables" + } + }, + "pagination": { + "$ref": "#/components/schemas/PaginationMetadata_ProcessVariables" + } + } + }, + "EntryResponseContentQueryCloudProcessInstance_ProcessVariables": { + "title": "EntryResponseContentQueryCloudProcessInstance_ProcessVariables", + "type": "object", + "properties": { + "entry": { + "$ref": "#/components/schemas/QueryCloudProcessInstance_ProcessVariables" + } + } + }, + "ListResponseContentQueryCloudProcessInstance_ProcessVariables": { + "title": "ListResponseContentQueryCloudProcessInstance_ProcessVariables", + "type": "object", + "properties": { + "list": { + "$ref": "#/components/schemas/EntriesResponseContentQueryCloudProcessInstance_ProcessVariables" + } + } + }, + "QueryCloudProcessInstance_ProcessVariables": { + "title": "QueryCloudProcessInstance_ProcessVariables", + "type": "object", + "properties": { + "subprocesses": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCloudSubprocessInstance_ProcessVariables" + } + }, "serviceFullName": { "type": "string" }, @@ -6945,16 +6985,12 @@ "id": { "type": "string" }, - "processDefinitionId": { - "type": "string" - }, "completedDate": { "type": "string", "format": "date-time" }, - "startDate": { - "type": "string", - "format": "date-time" + "processDefinitionId": { + "type": "string" }, "businessKey": { "type": "string" @@ -6962,6 +6998,13 @@ "initiator": { "type": "string" }, + "startDate": { + "type": "string", + "format": "date-time" + }, + "parentId": { + "type": "string" + }, "status": { "type": "string", "enum": [ @@ -6972,51 +7015,27 @@ "COMPLETED" ] }, - "parentId": { - "type": "string" - }, - "processDefinitionVersion": { - "type": "integer", - "format": "int32" - }, "processDefinitionName": { "type": "string" }, "processDefinitionKey": { "type": "string" - } - } - }, - "EntriesResponseContentCloudProcessInstance_ProcessVariables": { - "title": "EntriesResponseContentCloudProcessInstance_ProcessVariables", - "type": "object", - "properties": { - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_ProcessVariables" - } }, - "pagination": { - "$ref": "#/components/schemas/PaginationMetadata_ProcessVariables" - } - } - }, - "EntryResponseContentCloudProcessInstance_ProcessVariables": { - "title": "EntryResponseContentCloudProcessInstance_ProcessVariables", - "type": "object", - "properties": { - "entry": { - "$ref": "#/components/schemas/CloudProcessInstance_ProcessVariables" + "processDefinitionVersion": { + "type": "integer", + "format": "int32" } } }, - "ListResponseContentCloudProcessInstance_ProcessVariables": { - "title": "ListResponseContentCloudProcessInstance_ProcessVariables", + "QueryCloudSubprocessInstance_ProcessVariables": { + "title": "QueryCloudSubprocessInstance_ProcessVariables", "type": "object", "properties": { - "list": { - "$ref": "#/components/schemas/EntriesResponseContentCloudProcessInstance_ProcessVariables" + "id": { + "type": "string" + }, + "processDefinitionName": { + "type": "string" } } }, @@ -7281,19 +7300,13 @@ "standalone": { "type": "boolean" }, - "parentTaskId": { - "type": "string" - }, - "taskDefinitionKey": { - "type": "string" - }, - "processDefinitionId": { - "type": "string" - }, "completedDate": { "type": "string", "format": "date-time" }, + "processDefinitionId": { + "type": "string" + }, "processInstanceId": { "type": "string" }, @@ -7309,15 +7322,21 @@ "type": "string" } }, - "businessKey": { + "parentTaskId": { "type": "string" }, - "assignee": { + "taskDefinitionKey": { "type": "string" }, "formKey": { "type": "string" }, + "businessKey": { + "type": "string" + }, + "assignee": { + "type": "string" + }, "createdDate": { "type": "string", "format": "date-time" @@ -7353,10 +7372,26 @@ } } }, - "CloudProcessInstance_General": { - "title": "CloudProcessInstance_General", + "EntryResponseContentQueryCloudProcessInstance_General": { + "title": "EntryResponseContentQueryCloudProcessInstance_General", "type": "object", "properties": { + "entry": { + "$ref": "#/components/schemas/QueryCloudProcessInstance_General" + } + } + }, + "QueryCloudProcessInstance_General": { + "title": "QueryCloudProcessInstance_General", + "type": "object", + "properties": { + "subprocesses": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryCloudSubprocessInstance_General" + } + }, "serviceFullName": { "type": "string" }, @@ -7381,16 +7416,12 @@ "id": { "type": "string" }, - "processDefinitionId": { - "type": "string" - }, "completedDate": { "type": "string", "format": "date-time" }, - "startDate": { - "type": "string", - "format": "date-time" + "processDefinitionId": { + "type": "string" }, "businessKey": { "type": "string" @@ -7398,6 +7429,13 @@ "initiator": { "type": "string" }, + "startDate": { + "type": "string", + "format": "date-time" + }, + "parentId": { + "type": "string" + }, "status": { "type": "string", "enum": [ @@ -7408,38 +7446,38 @@ "COMPLETED" ] }, - "parentId": { - "type": "string" - }, - "processDefinitionVersion": { - "type": "integer", - "format": "int32" - }, "processDefinitionName": { "type": "string" }, "processDefinitionKey": { "type": "string" + }, + "processDefinitionVersion": { + "type": "integer", + "format": "int32" } } }, - "EntryResponseContentCloudProcessInstance_General": { - "title": "EntryResponseContentCloudProcessInstance_General", + "QueryCloudSubprocessInstance_General": { + "title": "QueryCloudSubprocessInstance_General", "type": "object", "properties": { - "entry": { - "$ref": "#/components/schemas/CloudProcessInstance_General" + "id": { + "type": "string" + }, + "processDefinitionName": { + "type": "string" } } }, - "EntriesResponseContentCloudProcessInstance_General": { - "title": "EntriesResponseContentCloudProcessInstance_General", + "EntriesResponseContentQueryCloudProcessInstance_General": { + "title": "EntriesResponseContentQueryCloudProcessInstance_General", "type": "object", "properties": { "entries": { "type": "array", "items": { - "$ref": "#/components/schemas/EntryResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntryResponseContentQueryCloudProcessInstance_General" } }, "pagination": { @@ -7447,12 +7485,12 @@ } } }, - "ListResponseContentCloudProcessInstance_General": { - "title": "ListResponseContentCloudProcessInstance_General", + "ListResponseContentQueryCloudProcessInstance_General": { + "title": "ListResponseContentQueryCloudProcessInstance_General", "type": "object", "properties": { "list": { - "$ref": "#/components/schemas/EntriesResponseContentCloudProcessInstance_General" + "$ref": "#/components/schemas/EntriesResponseContentQueryCloudProcessInstance_General" } } }, @@ -7639,13 +7677,13 @@ "ERROR" ] }, + "processDefinitionKey": { + "type": "string" + }, "processDefinitionVersion": { "type": "integer", "format": "int32" }, - "processDefinitionKey": { - "type": "string" - }, "serviceFullName": { "type": "string" }, @@ -7673,10 +7711,10 @@ "executionId": { "type": "string" }, - "processDefinitionId": { + "processInstanceId": { "type": "string" }, - "processInstanceId": { + "processDefinitionId": { "type": "string" }, "elementId": { @@ -7772,9 +7810,6 @@ "type": "string", "format": "date-time" }, - "errorCode": { - "type": "string" - }, "status": { "type": "string", "enum": [ @@ -7783,10 +7818,10 @@ "INTEGRATION_ERROR_RECEIVED" ] }, - "id": { + "errorCode": { "type": "string" }, - "processDefinitionId": { + "id": { "type": "string" }, "connectorType": { @@ -7804,19 +7839,22 @@ "type": "object" } }, - "processInstanceId": { + "processDefinitionId": { "type": "string" }, - "businessKey": { + "processInstanceId": { "type": "string" }, - "executionId": { + "clientType": { "type": "string" }, "appVersion": { "type": "string" }, - "clientType": { + "businessKey": { + "type": "string" + }, + "executionId": { "type": "string" }, "clientId": { @@ -7825,6 +7863,9 @@ "clientName": { "type": "string" }, + "appVersion": { + "type": "string" + }, "rootProcessInstanceId": { "type": "string" },