Index: trunk/grails-app/domain/Assembly.groovy
===================================================================
--- trunk/grails-app/domain/Assembly.groovy	(revision 129)
+++ trunk/grails-app/domain/Assembly.groovy	(revision 131)
@@ -1,8 +1,11 @@
 class Assembly {
+
+    AssetType assetType
+
     String name
     String description = ""
     boolean isActive = true
 
-    static hasMany = [assetTypes: AssetType, subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
+    static hasMany = [subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
 
     static belongsTo = [AssetType]
Index: trunk/grails-app/domain/Asset.groovy
===================================================================
--- trunk/grails-app/domain/Asset.groovy	(revision 129)
+++ trunk/grails-app/domain/Asset.groovy	(revision 131)
@@ -8,5 +8,6 @@
     boolean isActive = true
 
-    static hasMany = [maintenanceActions: MaintenanceAction, assetExtendedAttributes: AssetExtendedAttribute]
+    static hasMany = [maintenanceActions: MaintenanceAction, 
+                                    assetExtendedAttributes: AssetExtendedAttribute]
 
     static belongsTo = [SystemSection, AssetType]
Index: trunk/grails-app/domain/ComponentItem.groovy
===================================================================
--- trunk/grails-app/domain/ComponentItem.groovy	(revision 129)
+++ trunk/grails-app/domain/ComponentItem.groovy	(revision 131)
@@ -1,3 +1,5 @@
 class ComponentItem {
+
+    SubAssembly subAssembly
 
     String name
@@ -5,5 +7,5 @@
     boolean isActive = true
 
-    static hasMany = [subAssemblies: SubAssembly, maintenanceActions: MaintenanceAction]
+    static hasMany = [maintenanceActions: MaintenanceAction]
 
     static belongsTo = [SubAssembly]
Index: trunk/grails-app/domain/MaintenanceAction.groovy
===================================================================
--- trunk/grails-app/domain/MaintenanceAction.groovy	(revision 131)
+++ trunk/grails-app/domain/MaintenanceAction.groovy	(revision 131)
@@ -0,0 +1,36 @@
+class MaintenanceAction {
+
+    TaskProcedure taskProcedure
+    MaintenancePolicy maintenancePolicy
+    SystemSection systemSection
+    Asset asset
+    AssetType assetType
+    Assembly assembly
+    SubAssembly subAssembly
+    ComponentItem componentItem
+
+    String description
+    String reasoning = ""
+    Integer procedureStepNumber
+    boolean isActive = true
+
+//     static hasMany = []
+
+//     static belongsTo = []
+
+    static constraints = {
+        maintenancePolicy(blank:true, nullable:true)
+        systemSection(blank:true, nullable:true)
+        asset(blank:true, nullable:true)
+        assetType(blank:true, nullable:true)
+        assembly(blank:true, nullable:true)
+        subAssembly(blank:true, nullable:true)
+        componentItem(blank:true, nullable:true)
+        procedureStepNumber(blank:true, nullable:true)
+    }
+
+    String toString() {
+        "${this.description}"
+    }
+}
+
Index: trunk/grails-app/domain/Period.groovy
===================================================================
--- trunk/grails-app/domain/Period.groovy	(revision 129)
+++ trunk/grails-app/domain/Period.groovy	(revision 131)
@@ -1,7 +1,8 @@
 class Period {
+
     String period
     boolean isActive = true
 
-    static hasMany = [recurringSchedules: RecurringSchedule]
+    static hasMany = [taskRecurringSchedules: TaskRecurringSchedule]
 // 
 //     static belongsTo = []
Index: trunk/grails-app/domain/SubAssembly.groovy
===================================================================
--- trunk/grails-app/domain/SubAssembly.groovy	(revision 129)
+++ trunk/grails-app/domain/SubAssembly.groovy	(revision 131)
@@ -1,3 +1,5 @@
 class SubAssembly {
+
+    Assembly assembly
 
     String name
@@ -5,5 +7,6 @@
     boolean isActive = true
 
-    static hasMany = [assemblies: Assembly, componentItems: ComponentItem, maintenanceActions: MaintenanceAction]
+    static hasMany = [componentItems: ComponentItem,
+                                    maintenanceActions: MaintenanceAction]
 
     static belongsTo = [Assembly]
Index: trunk/grails-app/domain/Task.groovy
===================================================================
--- trunk/grails-app/domain/Task.groovy	(revision 129)
+++ trunk/grails-app/domain/Task.groovy	(revision 131)
@@ -8,5 +8,6 @@
     Person leadPerson
     Asset primaryAsset
-    RecurringSchedule recurringSchedule
+    TaskRecurringSchedule taskRecurringSchedule
+    TaskProcedure taskProcedure
 
     String description
@@ -25,16 +26,20 @@
                         inventoryMovements: InventoryMovement]
 
+    static mappedBy = [taskRecurringSchedule:"task"]
+
     static belongsTo = [TaskGroup, TaskStatus, Task, Person]
 
     static constraints = {
+        description(blank:false,maxSize:75)
+        comment()
         targetStartDate()
-        description(blank:false,maxSize:75)
+        targetCompletionDate()
         leadPerson()
         taskPriority()
         taskStatus()
         parentTask(blank: true, nullable:true)
-        comment()
         primaryAsset(blank: true, nullable:true)
-        recurringSchedule(blank: true, nullable:true)
+        taskRecurringSchedule(blank: true, nullable:true)
+        taskProcedure(blank: true, nullable:true)
         
     }
Index: trunk/grails-app/domain/TaskAction.groovy
===================================================================
--- trunk/grails-app/domain/TaskAction.groovy	(revision 129)
+++ 	(revision )
@@ -1,33 +1,0 @@
-class TaskAction {
-    Task task
-    MaintenancePolicy maintenancePolicy
-    SystemSection systemSection
-    Asset asset
-    AssetType assetType
-    Assembly assembly
-    SubAssembly subAssembly
-    ComponentItem componentItem
-    String action
-    String reasoning = ""
-    Integer stepNumber
-    boolean isActive = true
-
-//     static hasMany = []
-
-//     static belongsTo = []
-
-    static constraints = {
-        systemSection(blank:true, nullable:true)
-        asset(blank:true, nullable:true)
-        assetType(blank:true, nullable:true)
-        assembly(blank:true, nullable:true)
-        subAssembly(blank:true, nullable:true)
-        componentItem(blank:true, nullable:true)
-        stepNumber(blank:true, nullable:true)
-    }
-
-    String toString() {
-        "${this.action}"
-    }
-}
-
Index: trunk/grails-app/domain/TaskProcedure.groovy
===================================================================
--- trunk/grails-app/domain/TaskProcedure.groovy	(revision 131)
+++ trunk/grails-app/domain/TaskProcedure.groovy	(revision 131)
@@ -0,0 +1,19 @@
+class TaskProcedure {
+
+    String name
+    String description = ""
+    Boolean isActive = true
+
+    static hasMany = [tasks: Task, maintenanceActions: MaintenanceAction]
+
+//     static belongsTo = []
+
+    static constraints = {
+        name(maxSize:75,unique:true,blank:false)
+        description(maxSize:100)
+    }
+
+    String toString() {
+        "${this.name}"
+    }
+}
Index: trunk/grails-app/domain/TaskReccuringSchedule.groovy
===================================================================
--- trunk/grails-app/domain/TaskReccuringSchedule.groovy	(revision 129)
+++ 	(revision )
@@ -1,25 +1,0 @@
-class TaskRecurringSchedule {
-
-    Task task
-//     Task lastGeneratedSubTask
-    Period period
-
-    Integer recurEvery
-    Date startDate = new Date()
-    Date lastGeneratedDate
-    Date nextDueDate
-    boolean isActive = true
-
-//     static hasMany = []
-
-    static belongsTo = [Task]
-
-    static constraints = {
-//         lastGeneratedDate(blank:true, nullable:true)
-    }
-
-    String toString() {
-        "Recur every ${recurEvery} ${period}"
-    }
-}
-
Index: trunk/grails-app/domain/TaskRecurringSchedule.groovy
===================================================================
--- trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 131)
+++ trunk/grails-app/domain/TaskRecurringSchedule.groovy	(revision 131)
@@ -0,0 +1,26 @@
+class TaskRecurringSchedule {
+
+    Task task
+    Task lastGeneratedSubTask
+    Period period
+
+    Integer recurEvery
+    Date startDate = new Date()
+    Date lastGeneratedDate
+    Date nextDueDate
+    boolean isEnabled = true
+
+//     static hasMany = []
+
+    static belongsTo = [Task]
+
+    static constraints = {
+        lastGeneratedDate(blank:true, nullable:true)
+        lastGeneratedSubTask(blank:true, nullable:true)
+    }
+
+    String toString() {
+        "Recur every ${recurEvery} ${period}"
+    }
+}
+
