flowable / flowable/flowable-engine

Cache is not cleared after deletion of process definition

Offen
#4,039 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
9.5k
Forks
2.9k
Ø Merge
7 Std. 8 Min.
Gemergte PRs (30 T.)
2

Beschreibung

**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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, die Sequenz mit repositoryService.getProcessDefinition zu reproduzieren, nachdem alle Prozessdefinitionsversionen mit cascade false gelöscht wurden, gefolgt von getIdentityLinksForProcessDefinition. Verfolge die Cache- und Datenbankabfragepfade des Repository-Service; abgeschlossen ist die Untersuchung, wenn getProcessDefinition nach dem Löschen konsistent FlowableObjectNotFoundException auslöst.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.