In Josm, I would create the relation first and then open that relation for editing. In the relation edit window you can add all the ways in the expected order and add the roles for the ways.
I am not familiar with using the iD editor.