Your for loop is a little messy. In particular, it's not clear what this is supposed to do:
I would suggest changing this to:
for (id = 0; id < workorder.length; id++)
In any case, you know how many requests there are (workorder.length), so you could keep track of some count that increments with each success callback, and inside the callback check to see if the count == the workorder.length (you'll need to store that value), and if so, call printElement.