Book a Demo

Author Topic: Modeling Event Publish/Subscribe behaivor  (Read 3289 times)

andrewd

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Modeling Event Publish/Subscribe behaivor
« on: October 15, 2014, 07:00:42 am »
When I create a static diagram of a component or interface, I can specify the interface functions as public operations.  This is fine for a polling environment, but I also want a way to show when a component generates an event that other code can subscribe to.

For example if component A generates event E1, I would like to show that component B subscribes to that event and the callback function in component B that would get called.  Maybe specifying callback functions is too close to implementation, and there is another way to describe this a the architecture/design level.

I currently heavily use the public operations in the sequence diagrams, so I would also want to show the event/callback in the sequence diagram as well.
Any thoughts on best practice for this?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Modeling Event Publish/Subscribe behaivor
« Reply #1 on: October 15, 2014, 10:16:54 am »
I don't see the problem. If you offer a Subscribe method on the one side you will have some Callback on the other side. First message from subscriber to Subscribe. Later you'll get Callbacks. Both can be visible members of your interface on the respective side.

q.