Index: trunk/grails-app/conf/BootStrap.groovy
===================================================================
--- trunk/grails-app/conf/BootStrap.groovy	(revision 127)
+++ trunk/grails-app/conf/BootStrap.groovy	(revision 131)
@@ -216,13 +216,13 @@
 
         taskGroupInstance = new TaskGroup(name:"Engineering Activites",
-                      description:"Engineering daily activities")
+                                                                            description:"Engineering daily activities")
         BootStrapSaveAndTest(taskGroupInstance)
 
         taskGroupInstance = new TaskGroup(name:"Production Activites",
-                      description:"Production daily activities")
+                                                                            description:"Production daily activities")
         BootStrapSaveAndTest(taskGroupInstance)
 
         taskGroupInstance = new TaskGroup(name:"New Projects",
-                      description:" ")
+                                                                            description:" ")
         BootStrapSaveAndTest(taskGroupInstance)
 
@@ -260,5 +260,5 @@
         BootStrapSaveAndTest(taskTypeInstance)
 
-        taskTypeInstance = new TaskType(name:"Planned Maintenance")
+        taskTypeInstance = new TaskType(name:"Preventative Maintenance")
         BootStrapSaveAndTest(taskTypeInstance)
 
@@ -409,20 +409,22 @@
         BootStrapSaveAndTest(assignedPersonInstance)
 
-//RecurringSchedule
-        def recurringScheduleInstance
-
-        //RecurringSchedule #1
-        recurringScheduleInstance = new RecurringSchedule(recurEvery: 1,
+//TaskRecurringSchedule
+        def taskRecurringScheduleInstance
+
+        //TaskRecurringSchedule #1
+        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(1),
+                                                                                                    recurEvery: 1,
                                                                                                     period: Period.get(1),
                                                                                                     task: Task.get(1),
                                                                                                     nextDueDate: new Date())
-        BootStrapSaveAndTest(recurringScheduleInstance)
-
-        //RecurringSchedule #2
-        recurringScheduleInstance = new RecurringSchedule(recurEvery: 1,
-                                                                                                    period: Period.get(2),
+        BootStrapSaveAndTest(taskRecurringScheduleInstance)
+
+        //TaskRecurringSchedule #2
+        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(2),
+                                                                                                    recurEvery: 1,
+                                                                                                    period: Period.get(1),
                                                                                                     task: Task.get(2),
                                                                                                     nextDueDate: new Date())
-        BootStrapSaveAndTest(recurringScheduleInstance)
+        BootStrapSaveAndTest(taskRecurringScheduleInstance)
 
 /*************************
@@ -591,16 +593,10 @@
         BootStrapSaveAndTest(maintenancePolicyInstance)
 
-//PlannedMaintenance
-        def plannedMaintenanceInstance
-
-        //PM #1
-        plannedMaintenanceInstance = new PlannedMaintenance(name: "PM1",
-                                                                                                            recurringSchedule: RecurringSchedule.get(1))
-        BootStrapSaveAndTest(plannedMaintenanceInstance)
-
-        //PM #2
-        plannedMaintenanceInstance = new PlannedMaintenance(name: "PM2",
-                                                                                                            recurringSchedule: RecurringSchedule.get(1))
-        BootStrapSaveAndTest(plannedMaintenanceInstance)
+//TaskProcedure
+        def taskProcedureInstance
+
+        taskProcedureInstance = new TaskProcedure(name: "Daily check")
+        BootStrapSaveAndTest(taskProcedureInstance)
+        taskProcedureInstance.addToTasks(Task.get(1))
 
 //MaintenanceAction
@@ -608,22 +604,22 @@
 
         //MaintenanceAction #1
-        maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Check all E-stops, active E-stop S1-S12 and ensure machine cannot run",
-                                                                                                        pmStepNumber: 1,
+        maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, active E-stop S1-S12 and ensure machine cannot run",
+                                                                                                        procedureStepNumber: 1,
                                                                                                         maintenancePolicy: MaintenancePolicy.get(1),
-                                                                                                        plannedMaintenance: PlannedMaintenance.get(1))
+                                                                                                        taskProcedure: TaskProcedure.get(1))
         BootStrapSaveAndTest(maintenanceActionInstance)
 
         //MaintenanceAction #2
-        maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Do more pushups",
-                                                                                                        pmStepNumber: 2,
+        maintenanceActionInstance = new MaintenanceAction(description: "Do more pushups",
+                                                                                                        procedureStepNumber: 2,
                                                                                                         maintenancePolicy: MaintenancePolicy.get(1),
-                                                                                                        plannedMaintenance: PlannedMaintenance.get(1))
+                                                                                                        taskProcedure: TaskProcedure.get(1))
         BootStrapSaveAndTest(maintenanceActionInstance)
 
         //MaintenanceAction #3
-        maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Ok just one more pushup",
-                                                                                                        pmStepNumber: 3,
+        maintenanceActionInstance = new MaintenanceAction(description: "Ok just one more pushup",
+                                                                                                        procedureStepNumber: 3,
                                                                                                         maintenancePolicy: MaintenancePolicy.get(1),
-                                                                                                        plannedMaintenance: PlannedMaintenance.get(1))
+                                                                                                        taskProcedure: TaskProcedure.get(1))
         BootStrapSaveAndTest(maintenanceActionInstance)
                                                                                                     
@@ -661,5 +657,6 @@
 
         //Assembly #1
-        assemblyInstance = new Assembly(name: "Print Couple")
+        assemblyInstance = new Assembly(name: "Print Couple",
+                                                                        assetType: AssetType.get(1))
         BootStrapSaveAndTest(assemblyInstance)
 //        assemblyInstance.addToMaintenanceActions(MaintenanceAction.get(1))
@@ -667,5 +664,5 @@
         //Assembly #2
         assemblyInstance = new Assembly(name: "Agitator",
-                        lifeplan: LifePlan.get(1))
+                                                                        assetType: AssetType.get(2))
         BootStrapSaveAndTest(assemblyInstance)
 
@@ -674,9 +671,11 @@
 
         //SubAssembly #1
-        subAssemblyInstance = new SubAssembly(name: "Cylinder")
+        subAssemblyInstance = new SubAssembly(name: "Cylinder",
+                                                                                    assembly: Assembly.get(1))
         BootStrapSaveAndTest(subAssemblyInstance)
  
          //SubAssembly #2
-        subAssemblyInstance = new SubAssembly(name: "Gearmotor")
+        subAssemblyInstance = new SubAssembly(name: "Gearmotor",
+                                                                                    assembly: Assembly.get(2))
         BootStrapSaveAndTest(subAssemblyInstance)
 
@@ -685,9 +684,11 @@
     
         //ComponentItem #1
-        componentItemInstance = new ComponentItem(name: "Centre Pulley")
+        componentItemInstance = new ComponentItem(name: "Bearing",
+                                                                                            subAssembly: SubAssembly.get(1))
         BootStrapSaveAndTest(componentItemInstance)
 
          //ComponentItem #2
-        componentItemInstance = new ComponentItem(name: "Bearing")
+        componentItemInstance = new ComponentItem(name: "Drive shaft oil seal",
+                                                                                            subAssembly: SubAssembly.get(2))
         BootStrapSaveAndTest(componentItemInstance)
 
