flowable / flowable/flowable-engine

Deletion of running process fails

Aperta
#3,492 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

Hi,

I have posted the same question in the Flowable forum without getting much traction on the thread (https://forum.flowable.org/t/how-to-delete-a-process/9805) so I try here once again:

Back then in Activiti and up to Flowable 6.2 the following code worked as (at least I) expected:

```
RuntimeService runtimeService = processEngine.getRuntimeService();

String pId = runtimeService.startProcessInstanceById (processDefinition.getId ()).getId ();

System.out.println ("Process " + pId + " started");

// give process some time to "do" something
Thread.sleep (3000);

System.out.println ("Deleting process " + pId);

runtimeService.deleteProcessInstance (pId, null);
System.out.println ("Process deleted");
```

> Process 5 started
> Deleting process 5
> Process deleted

The process starts, runs some time and then gets terminated.

The Flowable version currently in use (6.7.2), however, gives me an exception in line :

` runtimeService.deleteProcessInstance (pId, null);`

> Concurrent update in table “ACT_RU_EXECUTION”: another transaction has updated or deleted the same row [90131-212]

The process used to demonstrate this behavior is trivial: One asynchronous ServiceTask between Start and End events. The task is a Java class simply doing a sleep ().

While I seem to understand what happens, I’m somewhat puzzled.

Is this behavior change intended? If so, what is the recommended way to delete a running process instance?

Thanks, Steffen.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia con il riproduttore che utilizza RuntimeService.deleteProcessInstance e la ServiceTask asincrona che attende tra gli eventi di inizio e fine. Analizza l'aggiornamento concorrente in ACT_RU_EXECUTION e confronta il comportamento con Flowable 6.2. Il lavoro è completo quando il modo supportato per eliminare un'istanza di processo in esecuzione in Flowable 6.7.2 è documentato o implementato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
32/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.