Cache is not cleared after deletion of process definition

Abierto
#4,039 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java
Área
backend

Línea de trabajo

Empieza reproduciendo la secuencia usando repositoryService.getProcessDefinition después de eliminar todas las versiones de process-definition con cascade false, seguido de getIdentityLinksForProcessDefinition. Rastrea las rutas de caché y de consulta a la base de datos del servicio de repositorio; se considera terminado cuando getProcessDefinition lanza FlowableObjectNotFoundException de forma consistente después de la eliminación.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug
In my app I use repository service to get all versions of a process definitions and I delete all of them (with cascade false).
When I try to get all the instances (including the ones that are related with a deleted process definition), I make a first call to get the process definition and a second call to get the identity links of the process definition. The first call returns the process definition (although is deleted) but the second one throws exception that it doesn't find it (which is the correct behavior).

Expected behavior
The repositoryService.getProcessDefinition should throw FlowableObjectNotFoundException.

Code
processDefinition = repositoryService.getProcessDefinition(workflowDefinitionId); List<IdentityLink> candidates = repositoryService.getIdentityLinksForProcessDefinition(processDefinition.getId());

Additional context
Flowable version: 7.1.0
Spring boot

Additional comments
It seems that the repositoryService.getProcessDefinition uses cache so I suppose that it fetches the process definition from here while repositoryService.getIdentityLinksForProcessDefinition(processDefinition.getId()); searches at the database. Why the cache is not cleared after deleting the process definition? The strange this is that it works sometimes and some other times it doesn't.

Lenguaje dominante
Java
Estrellas
9.5k
Forks
2.9k
Merge medio
7 h 8 min
PR fusionados (30 d)
2

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flowable/flowable-engine

Todos los issues de flowable/flowable-engine

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.