Flowable task complete issue - UserTask should not be signalled before complete


We are facing below issue details:-

We are using flowable version 6.6.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 stage.
We have a BPM flow refer below flow diagram just for reference.

in which sometimes while completing a “E” stage which is after few parallel stages(“B”, “C”), we are facing an issue “UserTask should not be signalled before complete” in BPM logs

java.lang.Exception: UserTask should not be signalled before complete
       at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
       at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
       at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
       at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
       at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
       at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
       at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
       at sun.reflect.GeneratedMethodAccessor777.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)

Temporary Solution:-
We have analysed the issue and found a temporary solution that in “ACT_RU_TASK” table we get multiple records for that task.
We were able to complete the stage “E” after removing those multiple records and keeping a single record in “ACT_RU_TASK” table.

We are looking after the root cause of this problem and need a permanent solution.

That particular exception is thrown here: flowable-engine/UserTaskActivityBehavior.java at main · flowable/flowable-engine · GitHub

and it happens when trying to complete a task, when it’s aready been completed during the same transaction. Are you deleting the process instances potentially beforehand or simultaneously?

Note sure what this means, can you clarify?


We are not deleting the process instances potentially refer below code that we are using for completing task.


We found that there were two records in “ACT_RU_TASK” table when we got this issue.

So after deleting previous records we are able to complete task.