TaskService doesn't call HistoryManager to complete task with form


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.


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?

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.