# Flowable Task Completion Issue - UserTask should not be signalled before complete

**URL:** <https://forum.flowable.org/t/flowable-task-completion-issue-usertask-should-not-be-signalled-before-complete/11268>\
**Category:** Flowable Engine\
**Created:** [February 15, 2024, 1:36pm UTC](https://forum.flowable.org/t/flowable-task-completion-issue-usertask-should-not-be-signalled-before-complete/11268 "2024-02-15T13:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali.dal](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@ali.dal](https://forum.flowable.org/u/ali.dal)\
**Post date:** [February 15, 2024, 1:36pm UTC](https://forum.flowable.org/t/flowable-task-completion-issue-usertask-should-not-be-signalled-before-complete/11268/1 "2024-02-15T13:36:58Z")

</div>

Hi,

We are facing below issue details:

**Prerequisite:**  
We are using flowable version 6.5.0 as a dependency in spring boot application.

**Problem statement:**  
We are getting a issue “UserTask should not be signalled before complete" while completing a specific task.

**Exception:**

```auto
Caused by: org.flowable.common.engine.api.FlowableException: UserTask should not be signalled before complete
	at org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior.trigger(UserTaskActivityBehavior.java:271)
	at org.flowable.engine.impl.agenda.TriggerExecutionOperation.run(TriggerExecutionOperation.java:65)
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:88)
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72)
	at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56)
	at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25)
	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)
	at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56)
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
	at org.flowable.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:213)

```

Upon investigation we found duplicate entries against same process instance id in table **ACT\_RU\_TASK**. Removing duplicate entries fixes the issue temporary and arises again.

It would be really helpful if we be provided for the root cause and permanent solution to this issue.  
Here are few questions also which can help us understand this problem:

1. How/when the records get inserted into the **ACT\_RU\_TASK**?
2. How to avoid duplicate entries for the same process instance id?
3. Based on what the records get deleted from **ACT\_RU\_TASK**?

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [June 11, 2024, 2:20pm UTC](https://forum.flowable.org/t/flowable-task-completion-issue-usertask-should-not-be-signalled-before-complete/11268/2 "2024-06-11T14:20:21Z")

</div>

Hey @ali.dal,

It is really strange that you got into this error. You said that you are using 6.5.0, that version was released in February 2020, I would advise you to upgrade to a newer version.

Nevertheless, the entries in `ACT_RU_TASK` are being added in `UserTaskActivityBehavior#execute`. Once a task is completed it will be removed from the `ACT_RU_TASK` table. Flowable does not create duplicates in that table. If you think it does, then please create a test case that demonstrates the problem.

Cheers,  
Filip
