Handling action running and state flow for messages