I have caught a event click in eventbus and then tried to change businessobject name. But in the diagram name is not changing. Its working only when I do drag after that. So after investigating, I thought to fire element changed. But it is going to endless loop with events. Can anyone suggest me how I can fire element changed to update name of the element.
could you please explain what exactly you are trying to achieve?
If you always want to rename certain elements as part of a certain command, you could use the CommandInterceptor. Please refer to this thread, which is about a very similar use case (set an initial label on element creation).