Index: trunk/grails-app/conf/BootStrap.groovy
===================================================================
--- trunk/grails-app/conf/BootStrap.groovy	(revision 126)
+++ trunk/grails-app/conf/BootStrap.groovy	(revision 127)
@@ -242,8 +242,8 @@
         def taskPriorityInstance
 
+        taskPriorityInstance = new TaskPriority(name:"Normal")
+        BootStrapSaveAndTest(taskPriorityInstance)
+
         taskPriorityInstance = new TaskPriority(name:"Low")
-        BootStrapSaveAndTest(taskPriorityInstance)
-
-        taskPriorityInstance = new TaskPriority(name:"Normal")
         BootStrapSaveAndTest(taskPriorityInstance)
 
Index: trunk/grails-app/conf/SecurityConfig.groovy
===================================================================
--- trunk/grails-app/conf/SecurityConfig.groovy	(revision 126)
+++ trunk/grails-app/conf/SecurityConfig.groovy	(revision 127)
@@ -1,3 +1,5 @@
 security {
+
+    def authenticateService
 
 	// see DefaultSecurityConfig.groovy for all settable/overridable properties
@@ -46,5 +48,5 @@
 
     //We always want to go to the home page so that bookmarks are not used.
-    defaultTargetUrl = '/appCore/home'
+    defaultTargetUrl = '/appCore/welcome'
     alwaysUseDefaultTargetUrl = true
 
@@ -61,3 +63,15 @@
     cacheUsers = false
 
+//    //List for and events and run the closure(s) that follow.
+//    //Unfortunately the session is not available yet so many things can't be done here, us an defaultTargetUrl and controller.
+//    useSecurityEventListener = true
+//
+//    onAuthenticationSuccessEvent = { e, appCtx ->
+//        def p = e.source.principal
+//        def personInstance = Person.findByLoginName(p.username)
+//        println p.username
+//        println personInstance.loginName
+//        println personInstance.firstName
+//    }
+
 }
Index: trunk/grails-app/controllers/AppCoreController.groovy
===================================================================
--- trunk/grails-app/controllers/AppCoreController.groovy	(revision 126)
+++ trunk/grails-app/controllers/AppCoreController.groovy	(revision 127)
@@ -10,4 +10,13 @@
     //def allowedMethods = [delete:'POST', save:'POST', update:'POST']
 
+    def welcome = {
+        def personInstance = Person.get(authenticateService.userDomain().id)
+        flash.message = "Welcome, ${personInstance.firstName} ${personInstance.lastName}."
+
+        def sess = getSession()
+        sess.setMaxInactiveInterval(personInstance.sessionTimeout)
+        redirect(action:home)
+    }
+
     def home = {
     }
@@ -15,4 +24,25 @@
     def options = {
     }
+
+    def changeSessionTimeout = {
+        if (request.method == 'GET') {
+            def personInstance = Person.get(authenticateService.userDomain().id)
+            return [ personInstance : personInstance ]       
+        }
+        if (request.method == 'POST') {
+            def personInstance = Person.get(authenticateService.userDomain().id)
+//             personInstance.sessionTimeout = params.sessionTimeout.toInteger()
+                personInstance.properties = params
+                if (!personInstance.hasErrors() && personInstance.save()) {
+                    def sess = getSession()
+                    sess.setMaxInactiveInterval(personInstance.sessionTimeout)
+                    flash.message = "Session timeout changed."
+                    redirect(action:options)
+                }
+                else {
+                    render(view:'changeSessionTimeout',model:[personInstance:personInstance])
+                }
+        }
+    }         
 
     def changePassword = {
Index: trunk/grails-app/domain/MaintenanceAction.groovy
===================================================================
--- trunk/grails-app/domain/MaintenanceAction.groovy	(revision 126)
+++ trunk/grails-app/domain/MaintenanceAction.groovy	(revision 127)
@@ -1,5 +1,5 @@
-class MaintenanceAction {
+class TaskAction {
+    Task task
     MaintenancePolicy maintenancePolicy
-    PlannedMaintenance plannedMaintenance
     SystemSection systemSection
     Asset asset
@@ -8,12 +8,12 @@
     SubAssembly subAssembly
     ComponentItem componentItem
-    String maintenanceAction
+    String action
     String reasoning = ""
-    Integer pmStepNumber
+    Integer stepNumber
     boolean isActive = true
 
 //     static hasMany = []
 
-    static belongsTo = [PlannedMaintenance]
+//     static belongsTo = []
 
     static constraints = {
@@ -24,5 +24,5 @@
         subAssembly(blank:true, nullable:true)
         componentItem(blank:true, nullable:true)
-        pmStepNumber(blank:true, nullable:true)
+        stepNumber(blank:true, nullable:true)
     }
 
Index: trunk/grails-app/domain/Person.groovy
===================================================================
--- trunk/grails-app/domain/Person.groovy	(revision 126)
+++ trunk/grails-app/domain/Person.groovy	(revision 127)
@@ -13,4 +13,7 @@
     String lastName
     String employeeID
+
+    /* Set after login by 'welcome' action, default to 12 hours, aka "sess.setMaxInactiveInterval(seconds) */
+    Integer sessionTimeout = 720
 
 	/** MD5 Password */
@@ -42,4 +45,5 @@
         //So we need to use pass for validation then encode it for above.
         pass(blank: false, minSize:4)
+        sessionTimeout(min:60, max:720)
 
 	}
Index: trunk/grails-app/domain/RecurringSchedule.groovy
===================================================================
--- trunk/grails-app/domain/RecurringSchedule.groovy	(revision 126)
+++ trunk/grails-app/domain/RecurringSchedule.groovy	(revision 127)
@@ -1,11 +1,11 @@
-class RecurringSchedule {
+class TaskRecurringSchedule {
 
     Task task
+//     Task lastGeneratedSubTask
     Period period
-    PlannedMaintenance plannedMaintenance
 
     Integer recurEvery
     Date startDate = new Date()
-    Date lastExecutedDate
+    Date lastGeneratedDate
     Date nextDueDate
     boolean isActive = true
@@ -16,6 +16,5 @@
 
     static constraints = {
-        plannedMaintenance(blank:true, nullable:true)
-        lastExecutedDate(blank:true, nullable:true)
+//         lastGeneratedDate(blank:true, nullable:true)
     }
 
Index: trunk/grails-app/views/appCore/changeSessionTimeout.gsp
===================================================================
--- trunk/grails-app/views/appCore/changeSessionTimeout.gsp	(revision 127)
+++ trunk/grails-app/views/appCore/changeSessionTimeout.gsp	(revision 127)
@@ -0,0 +1,49 @@
+<head>
+	<meta name="layout" content="main" />
+	<title>Change Session Timeout</title>
+</head>
+
+<body onload="document.changeSessionTimeoutForm.sessionTimeout.focus();">
+	<div class="nav">
+		<span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
+    </div>
+
+	<div class="body">
+		<h1>Change Session Timeout</h1>
+		<g:if test="${flash.message}">
+		<div class="message">${flash.message}</div>
+		</g:if>
+		<g:hasErrors bean="${personInstance}">
+		<div class="errors">
+			<g:renderErrors bean="${personInstance}" as="list" />
+		</div>
+		</g:hasErrors>
+
+		<g:form name="changeSessionTimeoutForm" id="changeSessionTimeout">
+			<div class="dialog">
+				<table>
+				<tbody>
+
+					<tr class="prop">
+						<td valign="top" class="name">
+                            <label for="sessionTimeout">Session timeout:</label>
+                        </td>
+
+                        <td valign="top" class="value">
+						<input valign="top" class="duration ${hasErrors(bean:personInstance,field:'sessionTimeout','errors')}"
+                             type="text" id="sessionTimeout" name="sessionTimeout" value="${fieldValue(bean:personInstance,field:'sessionTimeout')}"/>
+                            seconds
+					</tr>
+
+				</tbody>
+				</table>
+			</div>
+
+			<div class="buttons">
+				<span class="button"><g:actionSubmit class="save" value="Save" action="changeSessionTimeout"/></span>
+			</div>
+		</g:form>
+
+	</div>
+
+</body>
Index: trunk/grails-app/views/appCore/options.gsp
===================================================================
--- trunk/grails-app/views/appCore/options.gsp	(revision 126)
+++ trunk/grails-app/views/appCore/options.gsp	(revision 127)
@@ -17,5 +17,7 @@
             <div class="dialog">
             <a href="${createLink(action:'changePassword')}">Change Password</a>
-
+            <br />
+            <br />
+            <a href="${createLink(action:'changeSessionTimeout')}">Change Session Timeout</a>
             </div>
         </div>
