# TaskService doesn't call HistoryManager to complete task with form

**URL:** <https://forum.flowable.org/t/taskservice-doesnt-call-historymanager-to-complete-task-with-form/5795>\
**Category:** Flowable Engine\
**Created:** [April 8, 2020, 2:29pm UTC](https://forum.flowable.org/t/taskservice-doesnt-call-historymanager-to-complete-task-with-form/5795 "2020-04-08T14:29:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunofigalves](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/brunofigalves/32/2312_2.png) [@brunofigalves](https://forum.flowable.org/u/brunofigalves)\
**Post date:** [April 8, 2020, 2:29pm UTC](https://forum.flowable.org/t/taskservice-doesnt-call-historymanager-to-complete-task-with-form/5795/1 "2020-04-08T14:29:15Z")

</div>

Hi,

I would to know your opinion about this topic: when we complete a task in _ **FormService** _ with _ **submitTaskFormData** _ method, the _SubmitTaskFormCmd_ class calls the configured history managers (classes that implement _HistoryManager_ interface) in method _ **recordFormPropertiesSubmitted** _.

But if we try to complete with the _ **TaskService** _ in method _ **completeTaskWithForm** _ the _CompleteTaskWithFormCmd_ class will not call _recordFormPropertiesSubmitted_ method in HistoryManager implementations.

I’m thinking of creating a pull request for this topic but I would like to know your point of view.

Thanks,  
Bruno

---

<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:** [April 13, 2020, 10:29am UTC](https://forum.flowable.org/t/taskservice-doesnt-call-historymanager-to-complete-task-with-form/5795/2 "2020-04-13T10:29:15Z")

</div>

Looking at the CompleteTaskWithFormCmd (called from the TaskService), it does different logic. The FormService does look at form properties, but the Task Service uses a different mechanism. The reason for that is that form properties are there from the old days (and kept around for backwards compatibility).

I’m not sure if that would fit within _CompleteTaskWithFormCmd_. How would you do it?

---

<div class="post-metadata">

**Author:** ![brunofigalves](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/brunofigalves/32/2312_2.png) [@brunofigalves](https://forum.flowable.org/u/brunofigalves)\
**Post date:** [April 13, 2020, 2:28pm UTC](https://forum.flowable.org/t/taskservice-doesnt-call-historymanager-to-complete-task-with-form/5795/3 "2020-04-13T14:28:34Z")

</div>

Thanks @joram for your reply. But I still have a question: the main purpose of _CompleteTaskWithFormCmd_ (called _TaskService_) and _SubmitTaskFormCmd_ (called _FormService_) is not the same?  
If I understand correctly, the _FormService_ presented in the _flowable.engine_ package is to maintain backward compatibility, but in this service _HistoryManager_ is called. When I inspect _FormService_ provided in _flowable.form.api_ package we have no service to complete a task with a form.  
To explain a little bit about my use case: I have a _CompositeHistoryManager_, with my own implementation of _HistoryManager_ interface that syncs with a JMS topic that is consumed for an external resource. So, I need to know when a task is completed within the context of a form.  
Therefore, my intention is to call _HistoryManager_ (_recordFormPropertiesSubmitted_ method) within _CompleteTaskWithFormCmd_ but if you have another solution I would really like to know.
