In this paper, coordination and communication problems in Wireless Sensor and Actor Networks (WSANs) are jointly addressed in a unifying framework. A sensor-actor coordination model is proposed based on an event-driven partitioning paradigm. Sensors are partitioned into different sets, and each set is constituted by a data-delivery tree associated with a different actor. The optimal solution for the partitioning strategy is determined by mathematical programming, and a distributed solution is proposed. In addition, a new model for the actor-actor coordination problem is introduced. The actor coordination is formulated as a task assignment optimization problem for a class of coordination problems in which the area to be acted upon needs to be optimally split among different actors. An auction-based distributed solution of the problem is also presented. Performance evaluation shows how global network objectives, such as compliance with real-time constraints and minimum energy consumption, can be achieved in the proposed framework with simple interactions between sensors and actors that are suitable for large-scale networks of energy-constrained devices.