Generate Foxx APIs using Statecharts and Domain Driven Design