Where several actions are brought on one bill of exchange, promissory note, or other obligation or instrument in writing, against several parties, who might have been joined as defendants in the same action, no costs shall be recovered by the plaintiff in more than one of such actions, if the parties proceeded against in the other actions were, at the commencement of the previous action, openly within the state.