From e384df95935baa6eeb0ad8651e04d201f56e7515 Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> Date: Thu, 9 Feb 2023 17:39:58 +0100 Subject: [PATCH] [JBPM-9946] servicesorm.xml validation failure (#2269) --- .../main/resources/META-INF/Servicesorm.xml | 674 +++++++++--------- 1 file changed, 331 insertions(+), 343 deletions(-) diff --git a/jbpm-services/jbpm-kie-services/src/main/resources/META-INF/Servicesorm.xml b/jbpm-services/jbpm-kie-services/src/main/resources/META-INF/Servicesorm.xml index e8149e4d1f..169d8e08e5 100644 --- a/jbpm-services/jbpm-kie-services/src/main/resources/META-INF/Servicesorm.xml +++ b/jbpm-services/jbpm-kie-services/src/main/resources/META-INF/Servicesorm.xml @@ -1,12 +1,11 @@ - + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm orm_2_1.xsd" + version="2.1"> - select new org.jbpm.kie.services.impl.model.ProcessInstanceDesc( @@ -363,7 +362,6 @@ - select new org.jbpm.kie.services.impl.model.ProcessInstanceDesc( @@ -392,7 +390,6 @@ - select new org.jbpm.kie.services.impl.model.ProcessInstanceDesc( @@ -738,337 +735,33 @@ + + + + + select d from DeploymentStoreEntry d where d.deploymentId=:deploymentId + + + - + - SELECT coalesce(task_union.id, taskId) AS id, - coalesce(t_status, a_status) AS status, - coalesce(t_activationTime, a_activationTime) AS activationTime, - coalesce(t_name, a_name) AS name, - coalesce(t_description, a_description) AS description, - coalesce(t_priority, a_priority) AS priority, - coalesce(actualowner_id, actualOwner) AS actualOwner, - coalesce(createdby_id, createdBy) AS createdBy, - coalesce(t_deploymentId, a_deploymentId) AS deploymentId, - coalesce(t_processId, a_processId) AS processId, - coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, - coalesce(t_createdOn,a_createdOn) AS createdOn, - coalesce(expirationTime, dueDate) AS expirationTime, - coalesce(t_workItemId,a_workItemId) AS workItemId, - formName, - subject, - plog.correlationKey, - plog.processType - FROM - (SELECT t.id, - t.status AS t_status, - t.activationTime AS t_activationTime, - t.name AS t_name, - t.description AS t_description, - t.priority AS t_priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId AS t_deploymentId, - t.processId AS t_processId, - t.processInstanceId AS t_processInstanceId, - t.createdOn AS t_createdOn, - t.expirationTime, - t.workItemId AS t_workItemId, - t.formName, - t.subject, - a.taskId, - a.status AS a_status, - a.activationTime AS a_activationTime, - a.name AS a_name, - a.description AS a_description, - a.priority AS a_priority, - a.actualOwner, - a.createdBy, - a.deploymentId AS a_deploymentId , - a.processId AS a_processId, - a.processInstanceId AS a_processInstanceId, - a.createdOn AS a_createdOn, - a.dueDate, - a.workItemId AS a_workItemId - FROM AuditTaskImpl a - LEFT OUTER JOIN Task t ON a.taskId = t.id - WHERE a.taskId = :taskId - UNION SELECT t.id, - t.status, - t.activationTime, - t.name, - t.description, - t.priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId, - t.processId, - t.processInstanceId, - t.createdOn, - t.expirationTime, - t.workItemId, - t.formName, - t.subject, - a.taskId, - a.status, - a.activationTime, - a.name, - a.description, - a.priority, - a.actualOwner, - a.createdBy, - a.deploymentId, - a.processId, - a.processInstanceId, - a.createdOn, - a.dueDate, - a.workItemId - FROM Task t - LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId - WHERE t.id = :taskId) task_union - LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId + select d from DeploymentStoreEntry d where d.updateDate >= :ludate - + - + + - SELECT coalesce(task_union.id, taskId) AS id, - coalesce(t_status, a_status) AS status, - coalesce(t_activationTime, a_activationTime) AS activationTime, - coalesce(t_name, a_name) AS name, - coalesce(t_description, a_description) AS description, - coalesce(t_priority, a_priority) AS priority, - coalesce(actualowner_id, actualOwner) AS actualOwner, - coalesce(createdby_id, createdBy) AS createdBy, - coalesce(t_deploymentId, a_deploymentId) AS deploymentId, - coalesce(t_processId, a_processId) AS processId, - coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, - coalesce(t_createdOn,a_createdOn) AS createdOn, - coalesce(expirationTime, dueDate) AS expirationTime, - coalesce(t_workItemId,a_workItemId) AS workItemId, - formName, - subject, - plog.correlationKey, - plog.processType - FROM - (SELECT t.id, - t.status AS t_status, - t.activationTime AS t_activationTime, - t.name AS t_name, - t.description AS t_description, - t.priority AS t_priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId AS t_deploymentId, - t.processId AS t_processId, - t.processInstanceId AS t_processInstanceId, - t.createdOn AS t_createdOn, - t.expirationTime, - t.workItemId AS t_workItemId, - t.formName, - t.subject, - a.taskId, - a.status AS a_status, - a.activationTime AS a_activationTime, - a.name AS a_name, - a.description AS a_description, - a.priority AS a_priority, - a.actualOwner, - a.createdBy, - a.deploymentId AS a_deploymentId , - a.processId AS a_processId, - a.processInstanceId AS a_processInstanceId, - a.createdOn AS a_createdOn, - a.dueDate, - a.workItemId AS a_workItemId - FROM AuditTaskImpl a - LEFT OUTER JOIN Task t ON a.taskId = t.id - WHERE a.workItemId = :workItemId - UNION SELECT t.id, - t.status, - t.activationTime, - t.name, - t.description, - t.priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId, - t.processId, - t.processInstanceId, - t.createdOn, - t.expirationTime, - t.workItemId, - t.formName, - t.subject, - a.taskId, - a.status, - a.activationTime, - a.name, - a.description, - a.priority, - a.actualOwner, - a.createdBy, - a.deploymentId, - a.processId, - a.processInstanceId, - a.createdOn, - a.dueDate, - a.workItemId - FROM Task t - LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId - WHERE t.workItemId = :workItemId) task_union - LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId + select d from DeploymentStoreEntry d where d.state in (:state) - + - - - SELECT coalesce(task_union.id, taskId) AS id, - coalesce(t_status, a_status) AS status, - coalesce(t_activationTime, a_activationTime) AS activationTime, - coalesce(t_name, a_name) AS name, - coalesce(t_description, a_description) AS description, - coalesce(t_priority, a_priority) AS priority, - coalesce(actualowner_id, actualOwner) AS actualOwner, - coalesce(createdby_id, createdBy) AS createdBy, - coalesce(t_deploymentId, a_deploymentId) AS deploymentId, - coalesce(t_processId, a_processId) AS processId, - coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, - coalesce(t_createdOn,a_createdOn) AS createdOn, - coalesce(expirationTime, dueDate) AS expirationTime, - coalesce(t_workItemId,a_workItemId) AS workItemId, - formName, - subject, - plog.correlationKey, - plog.processType - FROM - (SELECT t.id, - t.status AS t_status, - t.activationTime AS t_activationTime, - t.name AS t_name, - t.description AS t_description, - t.priority AS t_priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId AS t_deploymentId, - t.processId AS t_processId, - t.processInstanceId AS t_processInstanceId, - t.createdOn AS t_createdOn, - t.expirationTime, - t.workItemId AS t_workItemId, - t.formName, - t.subject, - a.taskId, - a.status AS a_status, - a.activationTime AS a_activationTime, - a.name AS a_name, - a.description AS a_description, - a.priority AS a_priority, - a.actualOwner, - a.createdBy, - a.deploymentId AS a_deploymentId , - a.processId AS a_processId, - a.processInstanceId AS a_processInstanceId, - a.createdOn AS a_createdOn, - a.dueDate, - a.workItemId AS a_workItemId - FROM AuditTaskImpl a - LEFT OUTER JOIN Task t ON a.taskId = t.id - WHERE a.processInstanceId = :processInstanceId and a.status in ( :statuses) - UNION SELECT t.id, - t.status, - t.activationTime, - t.name, - t.description, - t.priority, - t.actualowner_id, - t.createdby_id, - t.deploymentId, - t.processId, - t.processInstanceId, - t.createdOn, - t.expirationTime, - t.workItemId, - t.formName, - t.subject, - a.taskId, - a.status, - a.activationTime, - a.name, - a.description, - a.priority, - a.actualOwner, - a.createdBy, - a.deploymentId, - a.processId, - a.processInstanceId, - a.createdOn, - a.dueDate, - a.workItemId - FROM Task t - LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId - WHERE t.processInstanceId = :processInstanceId and t.status in ( :statuses)) task_union - LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select d from DeploymentStoreEntry d where d.deploymentId=:deploymentId - - - - - - - - select d from DeploymentStoreEntry d where d.updateDate >= :ludate - - - - - - - - - select d from DeploymentStoreEntry d where d.state in (:state) - - - - - - - - + + + select qd from QueryDefinitionEntity qd where name = :name @@ -1076,16 +769,13 @@ - select qd from QueryDefinitionEntity qd - - + - select @@ -1114,7 +804,7 @@ - + select @@ -1144,7 +834,7 @@ - + select @@ -1174,7 +864,7 @@ - + select @@ -1204,7 +894,7 @@ - + select @@ -1235,7 +925,7 @@ - + select @@ -1297,7 +987,7 @@ - + select @@ -1326,7 +1016,7 @@ - + select @@ -1356,7 +1046,7 @@ - + select @@ -1413,7 +1103,7 @@ - + select @@ -1443,8 +1133,283 @@ - + + + SELECT coalesce(task_union.id, taskId) AS id, + coalesce(t_status, a_status) AS status, + coalesce(t_activationTime, a_activationTime) AS activationTime, + coalesce(t_name, a_name) AS name, + coalesce(t_description, a_description) AS description, + coalesce(t_priority, a_priority) AS priority, + coalesce(actualowner_id, actualOwner) AS actualOwner, + coalesce(createdby_id, createdBy) AS createdBy, + coalesce(t_deploymentId, a_deploymentId) AS deploymentId, + coalesce(t_processId, a_processId) AS processId, + coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, + coalesce(t_createdOn,a_createdOn) AS createdOn, + coalesce(expirationTime, dueDate) AS expirationTime, + coalesce(t_workItemId,a_workItemId) AS workItemId, + formName, + subject, + plog.correlationKey, + plog.processType + FROM + (SELECT t.id, + t.status AS t_status, + t.activationTime AS t_activationTime, + t.name AS t_name, + t.description AS t_description, + t.priority AS t_priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId AS t_deploymentId, + t.processId AS t_processId, + t.processInstanceId AS t_processInstanceId, + t.createdOn AS t_createdOn, + t.expirationTime, + t.workItemId AS t_workItemId, + t.formName, + t.subject, + a.taskId, + a.status AS a_status, + a.activationTime AS a_activationTime, + a.name AS a_name, + a.description AS a_description, + a.priority AS a_priority, + a.actualOwner, + a.createdBy, + a.deploymentId AS a_deploymentId , + a.processId AS a_processId, + a.processInstanceId AS a_processInstanceId, + a.createdOn AS a_createdOn, + a.dueDate, + a.workItemId AS a_workItemId + FROM AuditTaskImpl a + LEFT OUTER JOIN Task t ON a.taskId = t.id + WHERE a.taskId = :taskId + UNION SELECT t.id, + t.status, + t.activationTime, + t.name, + t.description, + t.priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId, + t.processId, + t.processInstanceId, + t.createdOn, + t.expirationTime, + t.workItemId, + t.formName, + t.subject, + a.taskId, + a.status, + a.activationTime, + a.name, + a.description, + a.priority, + a.actualOwner, + a.createdBy, + a.deploymentId, + a.processId, + a.processInstanceId, + a.createdOn, + a.dueDate, + a.workItemId + FROM Task t + LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId + WHERE t.id = :taskId) task_union + LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId + + + + + + + SELECT coalesce(task_union.id, taskId) AS id, + coalesce(t_status, a_status) AS status, + coalesce(t_activationTime, a_activationTime) AS activationTime, + coalesce(t_name, a_name) AS name, + coalesce(t_description, a_description) AS description, + coalesce(t_priority, a_priority) AS priority, + coalesce(actualowner_id, actualOwner) AS actualOwner, + coalesce(createdby_id, createdBy) AS createdBy, + coalesce(t_deploymentId, a_deploymentId) AS deploymentId, + coalesce(t_processId, a_processId) AS processId, + coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, + coalesce(t_createdOn,a_createdOn) AS createdOn, + coalesce(expirationTime, dueDate) AS expirationTime, + coalesce(t_workItemId,a_workItemId) AS workItemId, + formName, + subject, + plog.correlationKey, + plog.processType + FROM + (SELECT t.id, + t.status AS t_status, + t.activationTime AS t_activationTime, + t.name AS t_name, + t.description AS t_description, + t.priority AS t_priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId AS t_deploymentId, + t.processId AS t_processId, + t.processInstanceId AS t_processInstanceId, + t.createdOn AS t_createdOn, + t.expirationTime, + t.workItemId AS t_workItemId, + t.formName, + t.subject, + a.taskId, + a.status AS a_status, + a.activationTime AS a_activationTime, + a.name AS a_name, + a.description AS a_description, + a.priority AS a_priority, + a.actualOwner, + a.createdBy, + a.deploymentId AS a_deploymentId , + a.processId AS a_processId, + a.processInstanceId AS a_processInstanceId, + a.createdOn AS a_createdOn, + a.dueDate, + a.workItemId AS a_workItemId + FROM AuditTaskImpl a + LEFT OUTER JOIN Task t ON a.taskId = t.id + WHERE a.workItemId = :workItemId + UNION SELECT t.id, + t.status, + t.activationTime, + t.name, + t.description, + t.priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId, + t.processId, + t.processInstanceId, + t.createdOn, + t.expirationTime, + t.workItemId, + t.formName, + t.subject, + a.taskId, + a.status, + a.activationTime, + a.name, + a.description, + a.priority, + a.actualOwner, + a.createdBy, + a.deploymentId, + a.processId, + a.processInstanceId, + a.createdOn, + a.dueDate, + a.workItemId + FROM Task t + LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId + WHERE t.workItemId = :workItemId) task_union + LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId + + + + + + + SELECT coalesce(task_union.id, taskId) AS id, + coalesce(t_status, a_status) AS status, + coalesce(t_activationTime, a_activationTime) AS activationTime, + coalesce(t_name, a_name) AS name, + coalesce(t_description, a_description) AS description, + coalesce(t_priority, a_priority) AS priority, + coalesce(actualowner_id, actualOwner) AS actualOwner, + coalesce(createdby_id, createdBy) AS createdBy, + coalesce(t_deploymentId, a_deploymentId) AS deploymentId, + coalesce(t_processId, a_processId) AS processId, + coalesce(t_processInstanceId, a_processInstanceId) AS processInstanceId, + coalesce(t_createdOn,a_createdOn) AS createdOn, + coalesce(expirationTime, dueDate) AS expirationTime, + coalesce(t_workItemId,a_workItemId) AS workItemId, + formName, + subject, + plog.correlationKey, + plog.processType + FROM + (SELECT t.id, + t.status AS t_status, + t.activationTime AS t_activationTime, + t.name AS t_name, + t.description AS t_description, + t.priority AS t_priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId AS t_deploymentId, + t.processId AS t_processId, + t.processInstanceId AS t_processInstanceId, + t.createdOn AS t_createdOn, + t.expirationTime, + t.workItemId AS t_workItemId, + t.formName, + t.subject, + a.taskId, + a.status AS a_status, + a.activationTime AS a_activationTime, + a.name AS a_name, + a.description AS a_description, + a.priority AS a_priority, + a.actualOwner, + a.createdBy, + a.deploymentId AS a_deploymentId , + a.processId AS a_processId, + a.processInstanceId AS a_processInstanceId, + a.createdOn AS a_createdOn, + a.dueDate, + a.workItemId AS a_workItemId + FROM AuditTaskImpl a + LEFT OUTER JOIN Task t ON a.taskId = t.id + WHERE a.processInstanceId = :processInstanceId and a.status in ( :statuses) + UNION SELECT t.id, + t.status, + t.activationTime, + t.name, + t.description, + t.priority, + t.actualowner_id, + t.createdby_id, + t.deploymentId, + t.processId, + t.processInstanceId, + t.createdOn, + t.expirationTime, + t.workItemId, + t.formName, + t.subject, + a.taskId, + a.status, + a.activationTime, + a.name, + a.description, + a.priority, + a.actualOwner, + a.createdBy, + a.deploymentId, + a.processId, + a.processInstanceId, + a.createdOn, + a.dueDate, + a.workItemId + FROM Task t + LEFT OUTER JOIN AuditTaskImpl a ON t.id = a.taskId + WHERE t.processInstanceId = :processInstanceId and t.status in ( :statuses)) task_union + LEFT JOIN ProcessInstanceLog plog ON a_processInstanceId = plog.processInstanceId + + + + SELECT processInstanceId, processId, processName, processVersion, status, externalId, start_date, user_identity, correlationKey @@ -1452,7 +1417,7 @@ WHERE processInstanceId IN (:idList) - + SELECT A1.processInstanceId, A1.variableId, A1.value @@ -1515,4 +1480,27 @@ WHERE A2.id IS NULL AND task.id IN (:idList) + + + + + + + + + + + + + + + + + + + + + + +