An automated use of choreographies