@Managed
interface Person {
    void setFirstName(String n);

    String getFirstName()

    void setLastName(String n);

    String getLastName()
}

// tag::configure-and-create-rules[]
model {
    person {
        println "configuring person"
        println "last name is $lastName, should be Smythe"
        lastName = "Smythe"
    }
    person(Person) {
        println "creating person"
        firstName = "John"
        lastName = "Smith"
    }
}
// end::configure-and-create-rules[]
model {
    tasks {
        showPerson(Task) {
            def p = $.person
            doLast {
                println "Hello $p.firstName $p.lastName!"
            }
        }
    }
}
