Hi carmen, sorry to hear you're having issues with your ex, especially because you share a workplace. In any case, I also wanted to say welcome to the community!
When it comes to boundaries, they are a tool we use for ourselves for our own benefit, not necessarily in order to change somebody else, though it can be a possible side effect. Here is a good introduction that you may want to read if you haven't yet done so:
Setting boundaries.
Does he yell or confront you angrily at work? Are there other witnesses to this behavior?
Hang in there, it can be tough to deal with these types of behaviors.