This is currently not possible. The easiest way is to call a microflow in your Java action which commits the object. Or file a feature request.