It is simply correct to say, "I met Tomi when he was attending a party." This is because of the verb that was earlier used. The verb was in the past tense, which shows that the event where Tomi was being met was a past event. So, the verb that would follow should be in the past form "was."
Also, it would be was and not were because the event has the only person in it. This makes the singular "was" right, and the plural "were" wrong. The English language is one of the most spoken languages in the world.
This can be due to the fact that some countries were colonized by the English speaking countries, such as Britain and America. Still, as this language seem easy for some, it is quite difficult for some people. Nevertheless, learning the concords in the English language would help to understand a lot about the language.