ActionState ExecuteTask(PrimitiveTask task) { ActiveTask = task; ActiveState = task.action(); return(ActiveState); }