      Registry will save
      */
     public func registryWillSave() {
-    }
+
+    }
+
+    /**
+     Restarts the tasks Group
+     */
+    private func _restartTasksGroups(){
+        // Pause the taskGroup
+        if let document=self as? BartlebyDocument{
+            for taskGroup in document.tasksGroups{
+                if taskGroup.totalTaskCount()>0{
+                    // We reset to Paused to force the restart
+                    taskGroup.status=TasksGroup.Status.Paused
+                    do {
+                        bprint("Starting task Group \(taskGroup.UID)", file:#file, function:#function, line:#line)
+                        try taskGroup.start()
+                    } catch let e {
+                        bprint("Error while restarting taskGroup \(e)", file:#file, function:#function, line:#line)
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     Restarts the tasks Group
+     */
+    private func _pauseTasksGroups(){
+        // Pause the taskGroup
+        if let document=self as? BartlebyDocument{
+            for taskGroup in document.tasksGroups{
+                if taskGroup.totalTaskCount()>0{
+                    taskGroup.pause()
+                }
+            }
+        }
+    }
+
 
     // MARK: - SSE
 
     // SSE server sent event source
     internal var _sse:EventSource?
 
-    /// The online flag is driving the SSE connection process.
-    public var online:Bool=false{
-        willSet{
-            // Transition on line
-            if newValue==true && online==false{
-                bprint("SSE is transitioning online",file:#file,function:#function,line:#line,category: "SSE")
-                self._connectToSSE()
-            }
-            // Transition off line
-            if newValue==false && online==true{
-                bprint("SSE is transitioning offline",file:#file,function:#function,line:#line,category: "SSE")
-                self._closeSSE()
-            }
-
-            if newValue==online{
-                bprint("Neutral online var setting",file:#file,function:#function,line:#line,category: "SSE")
-            }
-        }
-        didSet{
-            self.registryMetadata.online=online
-        }
-    }
-
-
     /**
      Connect to SSE
      */
     private func _connectToSSE() {
+        bprint("SSE is transitioning online",file:#file,function:#function,line:#line,category: "SSE")
         // The connection is restricted to identified users
         // `PERMISSION_BY_IDENTIFICATION` the current user must be in the dataspace.
         LoginUser.execute(self.currentUser, withPassword: self.currentUser.password, sucessHandler: {

            } else {
                // ERROR
            }
            
            dispatch_async(GlobalQueue.Main.get(), {
                self.registryDidLoad()
            })

                        if let trigger:Trigger = Mapper<Trigger>().map(jsonTrigger){
                            self._triggeredDataBuffer[trigger]=dictionary
                        }else{
                            bprint("Trigger json mapping issue \(jsonTrigger)", file: #file, function: #function, line: #line, category: bprintCategoryFor(Trigger), decorative: false)
                        }
                    }
                }
