I have created a document library named “K2 Workflow Library” in which K2 workflow will be created to discard document check out. Please refer to my previous article to create a K2 workflow in SharePoint 2013 Online.
Go to K2 designer, drag and drop Discard Document Check Out step from the Documents workflow steps in the ribbon interface.
Specify the document and then click on Finish button.
Deploy the workflow. Select a document in “K2 Workflow Library” library which has been checked out and run the workflow. After few minutes the workflow will be completed and the checked out document will be discarded.