How can i overwrite the "complete process" button in ProcActionsFrame?

企业微信截图_20180508145337
I want click the button to save data and enter next process

There is an example in the documentation: https://doc.cuba-platform.com/bpm-6.8/qs_contract_edit_controller.html.
The .setBeforeCompleteTaskPredicate(this::commit) line tells that the editor will be commited before you complete the process task.