The Check In After Task Execution option can be selected to automatically release the document lock after the top level task has completed execution. Otherwise, the document lock will be released when the current OnBase session ends.
Note:
Check In actions should be as close to Check Out actions as possible.