Index: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java
===================================================================
--- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1216)
+++ trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1294)
@@ -17,14 +17,15 @@
 import java.util.List;
 
-import de.ugoe.cs.autoquest.eventcore.IEventTarget;
-import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.Event;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIterationInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptionalInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelectionInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceList;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequenceInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
@@ -43,9 +44,9 @@
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewEventTask(IEventType, IEventTarget)
+     * @see ITaskFactory#createNewEventTask(String)
      */
     @Override
-    public IEventTask createNewEventTask(IEventType eventType, IEventTarget eventTarget) {
-        return new EventTask(eventType, eventTarget);
+    public IEventTask createNewEventTask(String description) {
+        return new EventTask(description);
     }
 
@@ -83,17 +84,81 @@
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewTaskInstance(ITask)
+     * @see ITaskFactory#createNewTaskInstance(IEventTask, Event)
      */
     @Override
-    public ITaskInstance createNewTaskInstance(ITask task) {
-        return new TaskInstance(task);
+    public IEventTaskInstance createNewTaskInstance(IEventTask task, Event event) {
+        if (!(task instanceof EventTask)) {
+            throw new IllegalArgumentException
+                ("illegal type of event task provided: " + task.getClass());
+        }
+        
+        EventTaskInstance instance = new EventTaskInstance(task, event);
+        ((EventTask) task).addInstance(instance);
+        
+        return instance;
     }
 
     /* (non-Javadoc)
-     * @see ITaskFactory#createNewTaskInstanceList()
+     * @see ITaskFactory#createNewTaskInstance(ISequence)
      */
     @Override
-    public ITaskInstanceList createNewTaskInstanceList() {
-        return new TaskInstance(new Sequence());
+    public ISequenceInstance createNewTaskInstance(ISequence sequence) {
+        if (!(sequence instanceof Sequence)) {
+            throw new IllegalArgumentException
+                ("illegal type of sequence provided: " + sequence.getClass());
+        }
+        
+        SequenceInstance instance = new SequenceInstance(sequence);
+        ((Sequence) sequence).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(IIteration)
+     */
+    @Override
+    public IIterationInstance createNewTaskInstance(IIteration iteration) {
+        if (!(iteration instanceof Iteration)) {
+            throw new IllegalArgumentException
+                ("illegal type of iteration provided: " + iteration.getClass());
+        }
+        
+        IterationInstance instance = new IterationInstance(iteration);
+        ((Iteration) iteration).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(IOptional)
+     */
+    @Override
+    public IOptionalInstance createNewTaskInstance(IOptional optional) {
+        if (!(optional instanceof Optional)) {
+            throw new IllegalArgumentException
+                ("illegal type of optional provided: " + optional.getClass());
+        }
+        
+        OptionalInstance instance = new OptionalInstance(optional);
+        ((Optional) optional).addInstance(instance);
+        
+        return instance;
+    }
+
+    /* (non-Javadoc)
+     * @see ITaskFactory#createNewTaskInstance(ISelection)
+     */
+    @Override
+    public ISelectionInstance createNewTaskInstance(ISelection selection) {
+        if (!(selection instanceof Selection)) {
+            throw new IllegalArgumentException
+                ("illegal type of optional provided: " + selection.getClass());
+        }
+        
+        SelectionInstance instance = new SelectionInstance(selection);
+        ((Selection) selection).addInstance(instance);
+        
+        return instance;
     }
 
