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

    String getLastName()
    void setLastName(String n)
}

// tag::configure-rule[]
model {
    person {
        println "configuring person"
        lastName = "Smith"
    }
}
// end::configure-rule[]
model {
    person(Person) {
        firstName = "John"
    }
    tasks {
        showPerson(Task) {
            def p = $.person
            doLast {
                println "Hello $p.firstName $p.lastName!"
            }
        }
        somethingElse(Task) {
            doLast {
                println "Not using person"
            }
        }
    }
}
