flowable / flowable/flowable-engine
Cache is not cleared after deletion of process definition
- Lingua principale
- Java
- Stelle
- 9.5k
- Fork
- 2.9k
- Merge medio
- 7h 8m
- PR unite (30g)
- 2
Descrizione
**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 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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo la sequenza usando repositoryService.getProcessDefinition dopo aver eliminato tutte le versioni di process-definition con cascade false, seguito da getIdentityLinksForProcessDefinition. Traccia i percorsi della cache e delle query al database del servizio repository; il lavoro è completato quando getProcessDefinition genera costantemente FlowableObjectNotFoundException dopo l’eliminazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100