val source = button("Show Dialog").actionEvents().flatMap { Alert(Alert.AlertType.CONFIRMATION,"Are you sure?") .toObservable() .map { it == ButtonType.OK } }.publish().refCount() source.subscribe { println("SUB 1 received: $it") } source.subscribe { println("SUB 2 received: $it") }