How to persist task process representation once workflow has finished

For my particular use case I need to access the full historic task representation for the entire business flow regardless if the process has finished. Currently, as soon as the process reaches the end this valuable data is cleared and I cannot access it.

Rather than having to save this data manually when the process reaches the end can you configure this data to persist?

Thanks

This is actually the default behavior of Flowable: there always is a historic counterpart stored of your runtime data, at any point in time. If your process finished, the historic data remains. Have a look at the historyService API.

Can you please provide an example?

About the API? Well, it’s here for example https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/main/java/org/flowable/engine/HistoryService.java#L58