There is a distinct link between obedience and righteousness which cannot be broken. Obedience underpins righteousness and without the former, the latter will not stand in judgement. You can find the meaning of obedience and righteousness under this link.