Deterministic UML Models for Interconnected Activities and State Machines