# Famous One Task Process - Can't close task

**URL:** <https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387>\
**Category:** Flowable Engine\
**Created:** [August 21, 2019, 2:49pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387 "2019-08-21T14:49:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 21, 2019, 2:49pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/1 "2019-08-21T14:49:50Z")

</div>

In our application, we’ve been noticing the following error on some server environments but not others (ones that happen to have less memory).

`org.flowable.common.engine.api.FlowableException: UserTask should not be signalled before complete`

I could reproduce it using the “Famous One Task Process” by essentially opening up flowable-task, starting the process, and clicking Complete on the generated task. On any other servers, this completes just fine. Basically, this happens when completing any UserTask on these particular servers where others behave just fine. We’re installing these the same way each time and hosting in Tomcat.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/a/ac90c6b656eadb33bac7be4b28189cdd2be788be.png)

Any idea what could trigger this behavior?

---

<div class="post-metadata">

**Author:** ![PHH](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/phh/32/94_2.png) [@PHH](https://forum.flowable.org/u/PHH)\
**Post date:** [August 21, 2019, 3:13pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/2 "2019-08-21T15:13:20Z")

</div>

Probably need a lot more of the exception to get some clues.

Cheers  
Paul.

---

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 21, 2019, 4:50pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/3 "2019-08-21T16:50:47Z")

</div>

Here’s the first half of the stack trace:

2019-08-21 10:47:13.826 ERROR 5091 — [io-8888-exec-43] o.f.u.t.s.r.FlowableTaskActionService : Error completing task AC78BF40-C421-11E9-88B9-0A02A07B244C

org.flowable.common.engine.api.FlowableException: UserTask should not be signalled before complete  
at org.flowable.engine.impl.bpmn.behavior.UserTaskActivityBehavior.trigger(UserTaskActivityBehavior.java:246) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.agenda.TriggerExecutionOperation.run(TriggerExecutionOperation.java:64) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:88) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.3.1.jar:6.3.1]  
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:71) ~[flowable-engine-common-6.3.1.jar:6.3.1]  
at org.flowable.idm.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:49) ~[flowable-idm-spring-6.3.1.jar:6.3.1]  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.flowable.idm.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:46) ~[flowable-idm-spring-6.3.1.jar:6.3.1]  
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.3.1.jar:6.3.1]  
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.3.1.jar:6.3.1]  
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) ~[flowable-engine-common-6.3.1.jar:6.3.1]  
at org.flowable.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:208) ~[flowable-engine-6.3.1.jar:6.3.1]  
at org.flowable.ui.task.service.runtime.FlowableTaskActionService.completeTask(FlowableTaskActionService.java:65) [flowable-ui-task-logic-6.3.1.jar:6.3.1]  
at org.flowable.ui.task.service.runtime.FlowableTaskActionService$$FastClassBySpringCGLIB$$e0796198.invoke() [flowable-ui-task-logic-6.3.1.jar:6.3.1]  
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) [spring-tx-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) [spring-tx-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) [spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]  
at org.flowable.ui.task.service.runtime.FlowableTaskActionService$$EnhancerBySpringCGLIB$$1bf6aa78.completeTask() [flowable-ui-task-logic-6.3.1.jar:6.3.1]  
at org.flowable.ui.task.rest.runtime.TaskActionResource.completeTask(TaskActionResource.java:38) [flowable-ui-task-rest-6.3.1.jar:6.3.1]

---

<div class="post-metadata">

**Author:** ![dbmalkovsky](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/dbmalkovsky/32/31_2.png) [@dbmalkovsky](https://forum.flowable.org/u/dbmalkovsky)\
**Post date:** [August 21, 2019, 8:25pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/4 "2019-08-21T20:25:37Z")

</div>

Usually when I hear “all the machines are all installed the same” my first reaction is some network issue (firewall, routing, co-location vs distributed, etc.) But I think here the clue might be “low memory”.

This is the [line of code throwing the exception.](https://github.com/flowable/flowable-engine/blob/flowable-6.3.1/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/UserTaskActivityBehavior.java#L246)

It would appear that task isn’t marked as `deleted` in the database yet which may occur because the database transaction hasn’t completed because of resource constraints (memory). Just a guess on my part.

FWIW, that particular area of code has received a far amount of attention since 6.3.1.

Good luck,  
David

---

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 22, 2019, 12:41pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/5 "2019-08-22T12:41:59Z")

</div>

Thanks for the insight. I too was wondering if somehow this wasn’t deleting because I was looking at the same line of code.

---

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 22, 2019, 12:58pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/6 "2019-08-22T12:58:18Z")

</div>

It’s probably worth mentioning when I’m saying lower memory, I’m talking about 1gb allocated (which doesn’t seem that low). It’s the only difference I’ve been able to tell. Also, when I’m completing the task in flowable-task, it consistently throws this. So it’s not like it’s immediately after the process instantiation.

---

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 22, 2019, 1:20pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/7 "2019-08-22T13:20:04Z")

</div>

Actually, we may have introduced this as we noticed that these instances are using an unsupported database that we’ve made some updates for. Sorry for the noise!

---

<div class="post-metadata">

**Author:** ![railrhoad](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@railrhoad](https://forum.flowable.org/u/railrhoad)\
**Post date:** [August 26, 2019, 2:00pm UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/8 "2019-08-26T14:00:19Z")

</div>

Just to close the loop, we realized our db was set up for DISTINCT optimization which means a Select Distinct would return upper case collation for any IDs that were indexed (which is most IDs). A proper Task ID was coming in on the url, but one of the distinct calls was returning a upper cased version of the Task ID which down stream causes the issue.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [August 28, 2019, 4:04am UTC](https://forum.flowable.org/t/famous-one-task-process-cant-close-task/4387/9 "2019-08-28T04:04:48Z")

</div>

Thanks for posting back the cause of the problem. This was the first time I heard about such a configuration :-).
