Index: trunk/grails-app/domain/DocumentReference.groovy
===================================================================
--- trunk/grails-app/domain/DocumentReference.groovy	(revision 798)
+++ trunk/grails-app/domain/DocumentReference.groovy	(revision 798)
@@ -0,0 +1,23 @@
+class DocumentReference {
+
+    String name
+    String location
+
+    Boolean toBeDeleted
+    Boolean isNew
+    static transients = [ 'toBeDeleted', 'isNew' ]
+
+//     static hasMany = []
+
+    static belongsTo = [TaskProcedure]
+
+    static constraints = {
+        name(blank:false,maxSize:75)
+        location(blank:false,maxSize:500)
+    }
+
+    String toString() {
+        "${this.name} - ${this.location}"
+    }
+}
+
Index: trunk/grails-app/domain/MaintenanceAction.groovy
===================================================================
--- trunk/grails-app/domain/MaintenanceAction.groovy	(revision 751)
+++ trunk/grails-app/domain/MaintenanceAction.groovy	(revision 798)
@@ -8,11 +8,14 @@
 
     String description
-    String reasoning = ""
+    String pageRef = ""
     Integer procedureStepNumber
-    boolean isActive = true
+
+    Boolean toBeDeleted
+    Boolean isNew
+    static transients = [ 'toBeDeleted', 'isNew' ]
 
 //     static hasMany = []
 
-//     static belongsTo = []
+    static belongsTo = [TaskProcedure]
 
     static constraints = {
@@ -22,7 +25,6 @@
         maintenancePolicy(nullable:true)
         procedureStepNumber(nullable:true)
-        description()
-        reasoning()
-        isActive()
+        description(blank:false,maxSize:100)
+        pageRef(maxSize:100)
     }
 
Index: trunk/grails-app/domain/TaskProcedure.groovy
===================================================================
--- trunk/grails-app/domain/TaskProcedure.groovy	(revision 751)
+++ trunk/grails-app/domain/TaskProcedure.groovy	(revision 798)
@@ -1,19 +1,45 @@
+import org.apache.commons.collections.list.LazyList
+import org.apache.commons.collections.FactoryUtils
+
 class TaskProcedure {
 
-    String name
-    String description = ""
-    Boolean isActive = true
+    Task linkedTask
+    Person createdBy
+    Person lastUpdatedBy
+    Date dateCreated = new Date() // autoTimestamp
+    Date lastUpdated = new Date() // autoTimestamp
 
-    static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction]
+    def getDescription() { linkedTask.description }
+    def getAsset() { linkedTask.primaryAsset }
+
+    List maintenanceActions = new ArrayList()
+    List documentReferences = new ArrayList()
+
+    static hasMany = [tasks: Task,
+                                    maintenanceActions: MaintenanceAction,
+                                    documentReferences: DocumentReference]
+
+    def getMaintenanceActionLazyList() {
+        return LazyList.decorate(maintenanceActions, FactoryUtils.instantiateFactory(MaintenanceAction.class))
+    }
+
+    def getDocumentReferenceLazyList() {
+        return LazyList.decorate(documentReferences, FactoryUtils.instantiateFactory(DocumentReference.class))
+    }
+
+    static mappedBy = [tasks:"taskProcedure"]
+
+    static mapping = {
+        maintenanceActions cascade:"all-delete-orphan"
+        documentReferences cascade:"all-delete-orphan"
+    }
 
 //     static belongsTo = []
 
     static constraints = {
-        name(maxSize:75,unique:true,blank:false)
-        description(maxSize:100)
     }
 
     String toString() {
-        "${this.name}"
+        "${this.id}"
     }
 }
