Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/UsedResourcesList.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/UsedResourcesList.java	(revision 539)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/UsedResourcesList.java	(revision 539)
@@ -0,0 +1,12 @@
+package schedframe.scheduling;
+
+import java.util.LinkedList;
+
+public class UsedResourcesList extends LinkedList<ResourceHistoryItem>{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+}
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/resources/LocalResourceManager.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/resources/LocalResourceManager.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/resources/LocalResourceManager.java	(revision 539)
@@ -13,5 +13,4 @@
 import java.util.Properties;
 import java.util.Set;
-import java.util.Stack;
 
 import schedframe.exceptions.ResourceException;
@@ -175,15 +174,4 @@
 		return resourceUnit;
 	}
-	/*public List<AbstractResourceUnit> getAvailableResourceUnits(String resourceName) throws Exception {
-		ComputingResource resource = getResourceByName(resourceName);
-		List<AbstractResourceUnit> resourceUnits = new ArrayList<AbstractResourceUnit>();
-		while(resource != null){
-			for(List<AbstractResourceUnit> resUnits: resource.getResourceCharacteristic().getResourceUnits().values())
-				resUnits.addAll(resourceUnits);
-			resource = resource.getParent();
-		}
-		
-		return resourceUnits;
-	}*/
 
 	public List<? extends ComputingResource> filterResources(Properties properties) {
@@ -242,5 +230,5 @@
 				computingResources = (List<ComputingResource>) getResourcesOfType(StandardResourceType.Core);
 			} catch (ResourceException e) {
-				throw new RuntimeException("GSSIM internal error");
+				throw new RuntimeException("DCWorms internal error");
 			}
 			PEUnit peUnit = new ProcessingElements(computingResources);
@@ -253,5 +241,5 @@
 				computingResources = (List<ComputingResource>) getResourcesOfType(StandardResourceType.Processor);
 			} catch (ResourceException e) {
-				throw new RuntimeException("GSSIM internal error");
+				throw new RuntimeException("DCWorms internal error");
 			}
 			PEUnit peUnit = new ProcessingElements(computingResources);
@@ -318,20 +306,4 @@
 			return false;
 		}
-		/*ResourceUnit peUnit = resources.get(StandardResourceUnitName.PE);
-
-		if (peUnit != null) {
-			if (peUnit instanceof ProcessingElements) {
-				ProcessingElements choosenProcessors = (ProcessingElements) peUnit;
-
-				for (int i = 0; i < choosenProcessors.size(); i++) {
-					choosenProcessors.get(i).setStatus(ResourceStatus.BUSY);
-				}
-			}
-		}*/
-
-		/*Memory m = (Memory) resources.get(StandardResourceUnitName.MEMORY);
-		if (m != null) {
-			m.getProvisioner().setState(ResourceUnitState.BUSY);
-		}*/
 		
 		for(ResourceUnitName resUnitName: resources.keySet()){
@@ -345,19 +317,4 @@
 	public void freeResources(Map<ResourceUnitName, ResourceUnit> resources) {
 		
-		/*ResourceUnit peUnit = resources.get(StandardResourceUnitName.PE);
-		
-		if (peUnit instanceof ProcessingElements) {
-			ProcessingElements processingElements = (ProcessingElements) peUnit;
-
-			for (int i = 0; i < processingElements.size(); i++) {
-				processingElements.get(i).setStatus(ResourceStatus.FREE);
-			}
-		}*/
-
-		/*Memory m = (Memory) resources.get(StandardResourceUnitName.MEMORY);
-		if (m != null) {
-			m.getProvisioner().setState(ResourceUnitState.FREE);
-		}*/
-		
 		for(ResourceUnitName resUnitName: resources.keySet()){
 			ResourceUnit resUnit = resources.get(resUnitName);
@@ -366,4 +323,3 @@
 	}
 
-
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistry.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistry.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistry.java	(revision 539)
@@ -1,8 +1,10 @@
 package schedframe.scheduling.manager.tasks;
 
-import gssim.schedframe.scheduling.ExecTask;
 
 import java.util.List;
 
+import dcworms.schedframe.scheduling.ExecTask;
+
+import schedframe.ExecutablesList;
 import schedframe.scheduling.tasks.JobInterface;
 import schedframe.scheduling.tasks.TaskInterface;
@@ -11,8 +13,4 @@
 public interface JobRegistry {
 
-	//public List<JobInterface<?>> getActiveJobs();
-
-	//public List<TaskInterface<?>> getActiveTasks();
-	
 	public JobInterface<?> getJobInfo(String jobId);
 
@@ -31,10 +29,10 @@
 
 
-	//public List<SubmittedTask> getSubmittedTasks();
+	public ExecutablesList getExecutableTasks(); 
 	
-	public ExecTask getSubmittedTask(String jobId, String taskId);
+	public ExecTask getExecutable(String jobId, String taskId);
 
 	
-	public List<? extends TaskInterface<?>> getReadyTasks(List<JobInterface<?>> jobsList);
+	public List<? extends TaskInterface<?>> getAvailableTasks(List<JobInterface<?>> jobsList);
 
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistryImpl.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistryImpl.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/JobRegistryImpl.java	(revision 539)
@@ -1,31 +1,21 @@
 package schedframe.scheduling.manager.tasks;
 
-import gridsim.Gridlet;
-import gssim.schedframe.scheduling.ExecTask;
-import gssim.schedframe.scheduling.Executable;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.joda.time.DateTime;
 import org.qcg.broker.schemas.resreqs.ParentType;
 import org.qcg.broker.schemas.resreqs.types.TaskStatesName;
 
+import dcworms.schedframe.scheduling.ExecTask;
+
 import qcg.shared.constants.BrokerConstants;
-import schedframe.resources.units.ResourceUnit;
-import schedframe.resources.units.ResourceUnitName;
-import schedframe.scheduling.ResourceHistoryItem;
-import schedframe.scheduling.plan.AllocationInterface;
-import schedframe.scheduling.tasks.AbstractProcesses;
+import schedframe.ExecutablesList;
 import schedframe.scheduling.tasks.JobInterface;
-import schedframe.scheduling.tasks.SubmittedTask;
 import schedframe.scheduling.tasks.Task;
-import simulator.WormsConstants;
 
 public class JobRegistryImpl extends AbstractJobRegistry {
@@ -37,21 +27,17 @@
 	private String context;
 
-	//TO DO - change data structure
-	protected static final List<ExecTask> submittedTasks = Collections.synchronizedList(new ArrayList<ExecTask>());;
-	//protected static final List<ExecTaskInterface> submittedTasks = new CopyOnWriteArrayList<ExecTaskInterface>();
+	//TO DO - consider data structure
+	protected static final ExecutablesList executables = new ExecutablesList();
+	//protected static final List<ExecTask> executables = Collections.synchronizedList(new ArrayList<ExecTask>());;
+	//protected static final List<ExecTaskInterface> executables = new CopyOnWriteArrayList<ExecTaskInterface>();
 
-	public JobRegistryImpl(String context_) {
-		context = context_;
+	public JobRegistryImpl(String context) {
+		this.context = context;
 	}
 
-	/*protected void setContext(String context_) {
-		context = context_;
-	}*/
-
-	public boolean addTask(ExecTask newTask) {
-		if(getSubmittedTask(newTask.getJobId(), newTask.getId()) == null)
-		{
-			synchronized (submittedTasks)  {
-				submittedTasks.add(newTask);
+	public boolean addExecTask(ExecTask newTask) {
+		if(getExecutable(newTask.getJobId(), newTask.getId()) == null) {
+			synchronized (executables)  {
+				executables.add(newTask);
 			}
 			return true;
@@ -60,17 +46,16 @@
 	}
 
+	public ExecutablesList getExecutableTasks() {
+		return executables;
+	}
 	public List<ExecTask> getTasks(int status) {
 		List<ExecTask> taskList = new ArrayList<ExecTask>();
-		synchronized (submittedTasks)  {
-			for (ExecTask task: submittedTasks) {
+		synchronized (executables)  {
+			for (ExecTask task: executables) {
 				if (task.getStatus() == status) {
-					//SubmittedTask subTask = (SubmittedTask) task;
 					List<String> visitedResource = task.getVisitedResources();
-					if(ArrayUtils.contains(visitedResource.toArray(new String[visitedResource.size()]), context)){
+					if(ArrayUtils.contains(visitedResource.toArray(new String[visitedResource.size()]), context)) {
 						taskList.add(task);
 					}
-					/*if(subTask.getVisitedResources().contains(context)){
-						taskList.add(subTask);
-					}*/
 				}
 			}
@@ -80,49 +65,23 @@
 
 	public List<ExecTask> getQueuedTasks() {
-		return getTasks(Gridlet.QUEUED);
+		return getTasks(DCWormsTags.QUEUED);
 	}
 	
 	public List<ExecTask> getRunningTasks() {
-		return getTasks(Gridlet.INEXEC);
+		return getTasks(DCWormsTags.INEXEC);
 	}
 	
 	public List<ExecTask> getReadyTasks() {
-		return getTasks(Gridlet.READY);
+		return getTasks(DCWormsTags.READY);
 	}
 	
 	public List<ExecTask> getFinishedTasks() {
-		return getTasks(Gridlet.SUCCESS);
+		return getTasks(DCWormsTags.SUCCESS);
 	}
 	
-	
-	public List<ExecTask> getAllSubmittedTasks() {
-		List<ExecTask> taskList;
-		synchronized (submittedTasks)  {
-			taskList = new ArrayList<ExecTask>(submittedTasks);
-		}
-		return taskList;
-	}
-
-	public List<SubmittedTask> getSubmittedTasks() {
-		List<SubmittedTask> taskList = new ArrayList<SubmittedTask>();
-		synchronized (submittedTasks)  {
-			for (ExecTask task : submittedTasks) {
-				SubmittedTask subTask = (SubmittedTask) task;
-				List<String> visitedResource = subTask.getVisitedResources();
-				if(ArrayUtils.contains(visitedResource.toArray(new String[visitedResource.size()]), context)){
-					taskList.add(subTask);
-				}
-				/*if(subTask.getVisitedResources().contains(context)){
-					taskList.add(subTask);
-				}*/
-			}
-		}
-		return taskList;
-	}
-	
-	public ExecTask getSubmittedTask(String jobId, String taskId){
-		synchronized (submittedTasks)  {
-			for (ExecTask task : submittedTasks) {
-				if (task.getJobId().compareTo(jobId) == 0 && task.getId().compareTo(taskId)==0) {
+	public ExecTask getExecutable(String jobId, String taskId){
+		synchronized (executables)  {
+			for (ExecTask task : executables) {
+				if (task.getJobId().compareTo(jobId) == 0 && task.getId().compareTo(taskId) == 0) {
 					return task;
 				}
@@ -131,9 +90,8 @@
 		return null;
 	}
-	
 
 	@SuppressWarnings("unchecked")
-	public List<Task> getReadyTasks(List<JobInterface<?>> wuList) {
-		List<Task> readyTasks = new ArrayList<Task>();
+	public List<Task> getAvailableTasks(List<JobInterface<?>> wuList) {
+		List<Task> availableTasks = new ArrayList<Task>();
 		List<Task> waitingTasks = new ArrayList<Task>();
 		
@@ -143,195 +101,17 @@
 		}
 
-		readyTasks.addAll(getPrecedenceConstrainedReadyTasks(waitingTasks));
-		return readyTasks;
-	}
-	
-	public Executable getTaskExecutable(Integer executableId){
-		synchronized (submittedTasks)  {
-			for (ExecTask task : submittedTasks) {
-				SubmittedTask subTask = (SubmittedTask) task;
-				Executable exec = (Executable)subTask.getGridlet();
-				if (exec.getGridletID() == executableId) {
-					return exec;
-				}
-			}
-		}
-		return null;
-	}
-	
-	public List<Executable> getJobExecutables(String jobId){
-		List<Executable> list = new ArrayList<Executable>();
-		synchronized (submittedTasks)  {
-			for(int i = 0; i < submittedTasks.size(); i++){
-				SubmittedTask subTask = (SubmittedTask) submittedTasks.get(i);
-				Executable exec = (Executable)subTask.getGridlet();
-				
-				if(exec.getJobId().equals(jobId))
-					list.add(exec);
-			}
-		}
-		return list;
-	}
-	
-	public JobRegistryImpl clone() {
-		JobRegistryImpl jr = null;
-		try {
-			jr = (JobRegistryImpl) super.clone();
-		} catch (CloneNotSupportedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-		return jr;
-	}
-
-	/*public AbstractExecutable getTaskExecutabls(String jobId, String taskId){
-		List<AbstractExecutable> list = new ArrayList<AbstractExecutable>();
-		synchronized (submittedTasks)  {
-			for(int i = 0; i < size(); i++){
-				SubmittedTask subTask = (SubmittedTask) submittedTasks.get(i);
-				AbstractExecutable exec = (AbstractExecutable)subTask.getGridlet();
-				
-				if(exec.getJobId().equals(jobId) && exec.getId().equals(taskId))
-					return exec;
-			}
-		}
-		return null;
-	}*/
-	
-	
-	public Executable createExecutable(Task task, AllocationInterface allocation) {
-
-		String refersTo = allocation.getProcessGroupId(); // null;//allocation.getRefersTo();
-		if(refersTo == null)
-			refersTo = task.getId();
-			
-		Executable exec = null;
-
-		if(refersTo.equals(task.getId())){
-			exec = new Executable(task);
-		} else {
-			List<AbstractProcesses> processes = task.getProcesses();
-			if(processes == null) {
-				try {
-					log.error("Allocation: " + allocation.getDocument() + "\nrefers to unknown task or processes set." +
-							" Set correct value (task id or prcesses set id) for allocation refersTo attribute.");
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-			boolean found = false;
-			for(int j = 0; j < processes.size() && !found; j++){
-				AbstractProcesses procesesSet = processes.get(j);
-				if(refersTo.equals(procesesSet.getId())){
-					exec = new Executable(task, procesesSet);
-					found = true;
-				}
-			}
-			if(!found){
-				log.error("Allocation refers to unknown proceses set.");
-			}
-		}
-		
-	//	exec.setUserID(task.getSenderId());
-		exec.setLength(task.getLength());
-		exec.setReservationId(allocation.getReservationId());
-			
-		/*HostInterface<?> host = allocation.getHost();
-		ComputingResourceTypeInterface<?> crt = host.getMachineParameters();
-		if(crt != null){
-			ComputingResourceTypeItemInterface<?> crti = crt.getComputingResourceTypeItem(0);
-			if(crti != null){
-				ParameterPropertyInterface<?> properties[] = crti.getHostParameter().getProperty();
-				for(int p = 0; p < properties.length; p++){
-					ParameterPropertyInterface<?> property = properties[p];
-					if("chosenCPUs".equals(property.getName())){
-						Object cpuNames = property.getValue();
-						exec.addSpecificResource(ResourceParameterName.FREECPUS, cpuNames);
-					}
-				}
-			}
-		}*/
-		return exec;
-	}
-	
-
-	public List<Executable> createExecutables(Task task) {
-
-		List<AbstractProcesses> processes = task.getProcesses();
-		
-		List<Executable> executables = new ArrayList<Executable>();
-
-		if(processes == null || processes.size()==0){
-			Executable exec = new Executable(task);
-			exec.setUserID(task.getSenderId());
-			exec.setLength(task.getLength());
-			executables.add(exec);
-		} else {
-
-			boolean found = false;
-			for(int j = 0; j < processes.size() && !found; j++){
-				AbstractProcesses procesesSet = processes.get(j);
-				Executable exec = new Executable(task, procesesSet);
-				exec.setUserID(task.getSenderId());
-				exec.setLength(task.getLength());
-				executables.add(exec);
-			}
-		}
-
-		return  executables;
+		availableTasks.addAll(getPrecedenceConstrainedAvailableTasks(waitingTasks));
+		return availableTasks;
 	}
 
 
-	/**************************************/
-	protected static Map<Integer, Map<String, Object>> history = new HashMap<Integer, Map<String,Object>>();
-	
-	public static Map<Integer, Map<String, Object>> getAllocationHistory(){
-		return history;
-	}
-	
-	public void saveHistory (SubmittedTask submittedTask, int estimatedTime, Map<ResourceUnitName, ResourceUnit> choosenResources){
+	private List<Task> getPrecedenceConstrainedAvailableTasks(List<Task> tasks){
 		
-		/*submittedTask.setEstimatedDuration(estimatedTime);
-
-		DateTime currentTime = new DateTime();
-		ResourceHistoryItem resHistItem = new ResourceHistoryItem(choosenResources, currentTime);
-		submittedTask.addUsedResources(resHistItem);*/
-
-		ResourceHistoryItem resHistItem = submittedTask.getUsedResources().getLast();
-		DateTime currentTime = new DateTime();
-		Map<String, Object> historyItem = new HashMap<String, Object>();
-		List<ResourceHistoryItem> list = new ArrayList<ResourceHistoryItem>(1);
-		list.add(resHistItem);
-		historyItem.put(WormsConstants.RESOURCES, list);
-		historyItem.put(WormsConstants.START_TIME, currentTime);
-		currentTime = currentTime.plusSeconds(estimatedTime);
-		historyItem.put(WormsConstants.END_TIME, currentTime);
-
-		history.put(Integer.valueOf(submittedTask.getGridletID()), historyItem);
-		/*ProcessingElements pes = (ProcessingElements) choosenResources.get(ResourceParameterName.PROCESSINGELEMENTS);
-		for (ComputingResource resource : pes) {
-			//submittedTask.addToResPath(resource.getName());
-			submittedTask.visitResource(resource.getName());
-			ComputingResource parent = resource.getParent();
-			while (parent != null && !submittedTask.getResPath().contains(parent.getName() + "_")) {
-				submittedTask.addToResPath(parent.getName());
-				parent = parent.getParent();
-			}
-			while (parent != null && !submittedTask.getVisitedResources().contains(parent.getName() + "_")) {
-				submittedTask.visitResource(parent.getName());
-				parent = parent.getParent();
-			}
-		}*/
-	}
-
-	private List<Task> getPrecedenceConstrainedReadyTasks(List<Task> tasks){
+		List<Task> availableTasks = new ArrayList<Task>();
+		int size = tasks.size();
 		
-		List<Task> readyTasks = new ArrayList<Task>();
-
-		int size = tasks.size();
 		for(int i = 0; i < size; i++){
 			int parCnt;
-			int previousTaskReadyCnt = 0;
+			int previousTaskSucceedCnt = 0;
 			Task task = tasks.get(i);
 			if(task.getStatus() != (int)BrokerConstants.TASK_STATUS_UNSUBMITTED)
@@ -341,12 +121,9 @@
 			} catch(Exception e){
 				parCnt = 0;
-				//e.printStackTrace();
 			}
-			if(parCnt == 0)
-			{
-				readyTasks.add(task);
+			if(parCnt == 0){
+				availableTasks.add(task);
 			}
-			else
-			{
+			else {
 				for(int j = 0; j < parCnt; j++){
 					ParentType par = task.getDescription().getWorkflow().getParent(j);
@@ -356,16 +133,16 @@
 						}
 					}
-					previousTaskReadyCnt++;
+					previousTaskSucceedCnt++;
 				}
 				
-				if(previousTaskReadyCnt == parCnt && task.getDescription().getWorkflow().getAnd() != null)
-					readyTasks.add(task);
-				else if(previousTaskReadyCnt > 0 && task.getDescription().getWorkflow().getOr() != null)
-					readyTasks.add(task);
-				else if (previousTaskReadyCnt == parCnt)
-					readyTasks.add(task);
+				if(previousTaskSucceedCnt == parCnt && task.getDescription().getWorkflow().getAnd() != null)
+					availableTasks.add(task);
+				else if(previousTaskSucceedCnt > 0 && task.getDescription().getWorkflow().getOr() != null)
+					availableTasks.add(task);
+				else if (previousTaskSucceedCnt == parCnt)
+					availableTasks.add(task);
 			}
 		}		
-		return readyTasks;
+		return availableTasks;
 	}
 	
@@ -380,3 +157,4 @@
 		return false;
 	}
+
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/AbstractJobRegistry.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/AbstractJobRegistry.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/manager/tasks/AbstractJobRegistry.java	(revision 539)
@@ -2,5 +2,4 @@
 
 
-import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -14,23 +13,16 @@
 
 
-public abstract class AbstractJobRegistry /*extends ConcurrentHashMap<String, Job> */implements JobRegistry, Cloneable{
+public abstract class AbstractJobRegistry /*extends ConcurrentHashMap<String, Job>*/ implements JobRegistry, Cloneable{
 	
 	private static final long serialVersionUID = 8409060063583755824L;
+
 	
-	private static Log log = LogFactory.getLog(AbstractJobRegistry.class);
-	
-	protected static final ConcurrentHashMap<String, Job> jobs = new ConcurrentHashMap<String, Job>();
+	protected static final ConcurrentHashMap<String, JobInterface<?>> jobs = new ConcurrentHashMap<String, JobInterface<?>>();
 	
 	protected AbstractJobRegistry(){
-		//log.warn("Methods from JobRegistry interface are not implemented.");
 	}
 	
 	public boolean addJob(JobInterface<?> job) {
-		try {
-			 jobs.put(job.getId(), (Job) job);
-		} catch (NoSuchFieldException e) {
-			log.error(e.getMessage());
-			return false;
-		}
+		jobs.put(job.getId(),  job);
 		return true;
 	}
@@ -38,5 +30,5 @@
 	public boolean addTask(TaskInterface<?> task) {
 		if(jobs.containsKey(task.getJobId())){
-			jobs.get(task.getJobId()).add((Task)task);
+			getJob(task.getJobId()).add((Task)task);
 			return true;
 		} else {
@@ -45,15 +37,11 @@
 	}
 
-	public Job get(String jobId){
+	public JobInterface<?> getJobInfo(String jobId) {
 		return jobs.get(jobId);
 	}
-	
-	public JobInterface<?> getJobInfo(String jobID) {
-		return jobs.get(jobID);
-	}
 
-	public TaskInterface<?> getTaskInfo(String jobID, String taskId) {
+	public TaskInterface<?> getTaskInfo(String jobId, String taskId) {
 		Task task = null;
-		Job job = jobs.get(jobID);
+		Job job = getJob(jobId);
 		
 		if(job == null)
@@ -63,21 +51,11 @@
 			task = job.getTask(taskId);
 		} catch (NoSuchFieldException e) {
-			log.error(e.getMessage());
 		}
 		return task;
 	}
 	
-	/*public List<JobInterface<?>> getActiveJobs() {
-		log.error("getActiveJobs() not implemented.");
-		return null;
+	public Job getJob(String jobId){
+		return (Job)jobs.get(jobId);
 	}
 
-	public List<TaskInterface<?>> getActiveTasks() {
-		log.error("getActiveTasks() not implemented.");
-		return null;
-	}*/
-
-
-	
-
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/local/LocalManagementSystem.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 539)
@@ -1,14 +1,13 @@
 package schedframe.scheduling.policy.local;
 
+import dcworms.schedframe.scheduling.ExecTask;
+import dcworms.schedframe.scheduling.Executable;
 import eduni.simjava.Sim_event;
 import eduni.simjava.Sim_system;
 import gridsim.Accumulator;
 import gridsim.GridSimTags;
-import gridsim.Gridlet;
 import gridsim.ResourceCalendar;
-import gridsim.gssim.WormsTags;
-import gridsim.gssim.filter.SubTaskFilter;
-import gssim.schedframe.scheduling.ExecTask;
-import gssim.schedframe.scheduling.Executable;
+import gridsim.dcworms.DCWormsTags;
+import gridsim.dcworms.filter.ExecTaskFilter;
 
 import java.util.ArrayList;
@@ -27,9 +26,7 @@
 import qcg.shared.constants.BrokerConstants;
 import schedframe.ResourceController;
-import schedframe.events.scheduling.EventReason;
 import schedframe.events.scheduling.SchedulingEvent;
 import schedframe.events.scheduling.SchedulingEventType;
 import schedframe.events.scheduling.StartTaskExecutionEvent;
-import schedframe.events.scheduling.TaskCanceledEvent;
 import schedframe.events.scheduling.TaskFinishedEvent;
 import schedframe.events.scheduling.TaskRequestedTimeExpiredEvent;
@@ -45,7 +42,8 @@
 import schedframe.scheduling.ResourceHistoryItem;
 import schedframe.scheduling.Scheduler;
-import schedframe.scheduling.UsedResourceList;
+import schedframe.scheduling.TaskList;
+import schedframe.scheduling.TaskListImpl;
+import schedframe.scheduling.UsedResourcesList;
 import schedframe.scheduling.WorkloadUnitHandler;
-import schedframe.scheduling.WorkloadUnitListImpl;
 import schedframe.scheduling.manager.resources.LocalResourceManager;
 import schedframe.scheduling.manager.resources.ManagedResources;
@@ -63,9 +61,8 @@
 import schedframe.scheduling.tasks.Job;
 import schedframe.scheduling.tasks.JobInterface;
-import schedframe.scheduling.tasks.SubmittedTask;
 import schedframe.scheduling.tasks.Task;
 import schedframe.scheduling.tasks.TaskInterface;
 import schedframe.scheduling.tasks.WorkloadUnit;
-import simulator.WormsConstants;
+import simulator.DCWormsConstants;
 import simulator.utils.DoubleMath;
 
@@ -83,6 +80,4 @@
 
 		super(providerId, entityName, execTimeEstimationPlugin, queues);
-
-		//schedulingPlugin = (LocalSchedulingPlugin) InstanceFactory.createInstance(schedulingPluginClassName, LocalSchedulingPlugin.class);
 		
 		if (schedPlugin == null) {
@@ -90,13 +85,11 @@
 		}
 		this.schedulingPlugin =  schedPlugin;
-		accTotalLoad = new Accumulator();
-		moduleList = new ModuleListImpl(1);
-
+		this.moduleList = new ModuleListImpl(1);
+		
+		this.accTotalLoad = new Accumulator();
 	}
 
 	public void init(Scheduler sched, ManagedResources managedResources) {
 		super.init(sched, managedResources);
-		//scheduler = sched;
-		//resourceManager = ResourceManagerFactory.createResourceManager(scheduler);
 		double load = 0;
 		accTotalLoad.add(load);
@@ -112,23 +105,21 @@
 		switch (tag) {
 
-		case WormsTags.TIMER:
+		case DCWormsTags.TIMER:
 			if (pluginSupportsEvent(tag)) {
 				SchedulingEvent event = new SchedulingEvent(SchedulingEventType.TIMER);
-				SchedulingPlanInterface decision =  schedulingPlugin.schedule(event, 
+				SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event, 
 						queues,  getJobRegistry(), getResourceManager(), moduleList);
 				executeSchedulingPlan(decision);
 			}
 			sendTimerEvent();
-
 			break;
 
-		case WormsTags.TASK_READY_FOR_EXECUTION:
-			
-			ExecTask data = (ExecTask) ev.get_data();
-			try {
-				data.setStatus(Gridlet.READY);
+		case DCWormsTags.TASK_READY_FOR_EXECUTION:
+			ExecTask execTask = (ExecTask) ev.get_data();
+			try {
+				execTask.setStatus(DCWormsTags.READY);
 				if (pluginSupportsEvent(tag)) {
-					SchedulingEvent event = new StartTaskExecutionEvent(data.getJobId(), data.getId());
-					SchedulingPlanInterface decision =  schedulingPlugin.schedule(event,
+					SchedulingEvent event = new StartTaskExecutionEvent(execTask.getJobId(), execTask.getId());
+					SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event,
 							queues,  getJobRegistry(), getResourceManager(), moduleList);
 					executeSchedulingPlan(decision);
@@ -139,61 +130,48 @@
 			break;
 
-		case WormsTags.TASK_EXECUTION_FINISHED:
+		case DCWormsTags.TASK_EXECUTION_FINISHED:
 			obj = ev.get_data();
-			ExecTask task = (ExecTask) obj;
-			if (task.getStatus() == Gridlet.INEXEC) {
-				finalizeExecutable(task);
-				SubmittedTask subTask = (SubmittedTask)task;
-				sendFinishedWorkloadUnit((ExecTask)subTask.getGridlet());
-				//task.setGridletStatus(Gridlet.SUCCESS);
-				//task.finalizeGridlet();
-				log.debug(task.getJobId() + "_" + task.getId() + " finished execution on " + new DateTime());
-				log.info(WormsConstants.USAGE_MEASURE_NAME + ": " + calculateTotalLoad(jobRegistry.getRunningTasks().size()));
-				/*UsedResourceList<ResourceHistoryItem> lastUsedList = task.getUsedResources();
-				Map<ResourceUnitName, AbstractResourceUnit> lastUsed = lastUsedList.getLast()
-						.getResourceUnits();
-				getAllocationManager().freeResources(lastUsed);
-				ProcessingElements pes = (ProcessingElements) lastUsed.get(StandardResourceUnitName.PROCESSINGELEMENTS);
-				for (ComputingResource resource : pes) {
-					resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, task));
+			execTask = (ExecTask) obj;
+			if (execTask.getStatus() == DCWormsTags.INEXEC) {
+				
+				finalizeExecutable(execTask);
+				sendFinishedWorkloadUnit(execTask);
+				log.debug(execTask.getJobId() + "_" + execTask.getId() + " finished execution on " + new DateTime());
+				log.info(DCWormsConstants.USAGE_MEASURE_NAME + ": " + calculateTotalLoad(jobRegistry.getRunningTasks().size()));
+				if (pluginSupportsEvent(tag)) {
+					SchedulingEvent event = new TaskFinishedEvent(execTask.getJobId(), execTask.getId());
+					SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
+							queues, getJobRegistry(), getResourceManager(), moduleList);
+					executeSchedulingPlan(decision);
 				}
-				SubTaskFilter filter = new SubTaskFilter(task.getGridletID(), GssimTags.TASK_REQUESTED_TIME_EXPIRED);
-				scheduler.sim_cancel(filter, null);
-				super.sendFinishJob((Executable) task.getGridlet());*/
-			}
+			}
+
+			Job job = jobRegistry.getJob(execTask.getJobId());
+			if(!job.isFinished()){
+				getWorkloadUnitHandler().handleJob(job);
+			}
+			break;
+			
+		case DCWormsTags.TASK_REQUESTED_TIME_EXPIRED:
+			obj = ev.get_data();
+			execTask = (Executable) obj;
 			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new TaskFinishedEvent(task.getJobId(), task.getId());
-				SchedulingPlanInterface decision = schedulingPlugin.schedule(event,
+				SchedulingEvent event = new TaskRequestedTimeExpiredEvent(execTask.getJobId(), execTask.getId());
+				SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(event,
 						queues, getJobRegistry(), getResourceManager(), moduleList);
 				executeSchedulingPlan(decision);
 			}
-			Job job = jobRegistry.get(task.getJobId());
-			if(!job.isFinished()){
-				getWorkloadUnitHandler().handleJob(job);
-			}
-
 			break;
-		case WormsTags.TASK_REQUESTED_TIME_EXPIRED:
-			obj = ev.get_data();
-			task = (SubmittedTask) obj;
-			if (pluginSupportsEvent(tag)) {
-				SchedulingEvent event = new TaskRequestedTimeExpiredEvent(task.getJobId(), task.getId());
-				SchedulingPlanInterface decision = schedulingPlugin.schedule(event,
-						queues, getJobRegistry(), getResourceManager(), moduleList);
-				executeSchedulingPlan(decision);
-			}
-
-			break;
-		case WormsTags.UPDATE:
+			
+		case DCWormsTags.UPDATE:
 			updateProcessingTimes(ev);
 			break;
 		}
 	}
-	
-
-	public void notifyReturnedWorkloadUnit(WorkloadUnit<?> wu) {
-		if (pluginSupportsEvent(WormsTags.TASK_EXECUTION_FINISHED)) {
+
+	public void notifyReturnedWorkloadUnit(WorkloadUnit wu) {
+		if (pluginSupportsEvent(DCWormsTags.TASK_EXECUTION_FINISHED)) {
 			SchedulingEvent event = new SchedulingEvent(SchedulingEventType.TASK_FINISHED);
-			SchedulingPlanInterface decision =  schedulingPlugin.schedule(event,
+			SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event,
 					queues, getJobRegistry(), getResourceManager(), moduleList);
 			executeSchedulingPlan(decision);
@@ -203,117 +181,47 @@
 		//}
 	}
-
-	public void notifyCanceledWorkloadUnit(WorkloadUnit<?> job) {
-
-		if (!pluginSupportsEvent(GridSimTags.GRIDLET_CANCEL))
-			return;
-
-		Executable executable = (Executable) job;
-		String jobID = executable.getJobId();
-
-		SchedulingPlanInterface decision = null;
-
-		try {
-			executable.setStatus((int) BrokerConstants.JOB_STATUS_CANCELED);
-
-			TaskCanceledEvent event = new TaskCanceledEvent(executable.getJobId(), executable.getTaskId());
-			event.setReason(EventReason.RESERVATION_EXCEEDED);
-			decision = schedulingPlugin
-					.schedule(event, queues, getJobRegistry(), getResourceManager(), moduleList);
-
-			if (decision == null)
-				return;
-
-			executeSchedulingPlan(decision);
-
-		} catch (Exception e) {
-			log.error("Exception during scheduling. " + e.getMessage());
-			e.printStackTrace();
-		}
-	}
-	
-	protected void executeSchedulingPlan(SchedulingPlanInterface decision) {
-
-		ArrayList<ScheduledTaskInterface> taskSchedulingDecisions = decision.getTasks();
+	
+	protected void executeSchedulingPlan(SchedulingPlanInterface<?> decision) {
+
+		ArrayList<ScheduledTaskInterface<?>> taskSchedulingDecisions = decision.getTasks();
 		for (int i = 0; i < taskSchedulingDecisions.size(); i++) {
-			try {
-				ScheduledTaskInterface taskDecision = taskSchedulingDecisions.get(i);
-
-				// not scheduled again are returned to the user.
-				if (taskDecision.getStatus() == AllocationStatus.REJECTED) {
-					continue;
+			ScheduledTaskInterface<?> taskDecision = taskSchedulingDecisions.get(i);
+
+			if (taskDecision.getStatus() == AllocationStatus.REJECTED) {
+				continue;
+			}
+
+			ArrayList<AllocationInterface<?>> allocations = taskDecision.getAllocations();
+
+			TaskInterface<?> task = taskDecision.getTask();
+			for (int j = 0; j < allocations.size(); j++) {
+
+				AllocationInterface<?> allocation = allocations.get(j);
+				if (allocation.isProcessing()) {
+					ExecTask exec = (ExecTask) task;					
+					executeTask(exec, allocation.getRequestedResources());
+				} else if(resourceManager.getSchedulerName(allocation.getProviderName()) != null){
+					allocation.setProviderName(resourceManager.getSchedulerName(allocation.getProviderName()));
+					submitTask(task, allocation);
+				} else {
+					ExecTask exec = (ExecTask) task;
+					executeTask(exec, chooseResourcesForExecution(allocation.getProviderName(), exec));
 				}
-
-				ArrayList<AllocationInterface> allocations = taskDecision.getAllocations();
-
-				WorkloadUnit<?> task = taskDecision.getTask();
-				for (int j = 0; j < allocations.size(); j++) {
-
-					AllocationInterface allocation = allocations.get(j);
-					if (allocation.isProcessing()) {
-						
-						ExecTask exec = (ExecTask) task;
-						
-
-						//Executable e = (Executable)task;
-						/*SubmittedTask submittedTask = jobRegistry.getSubmittedTask(e.getJobId(), e.getId());
-						if(submittedTask == null)
-						{	submittedTask = new SubmittedTask(e);
-							jobRegistry.addTask(submittedTask);
-						}*/
-
-						/*e.visitResource(scheduler.get_name());
-						Scheduler parentScheduler = scheduler.getParent();
-						while (parentScheduler != null && !e.getVisitedResources().contains(parentScheduler.get_name())) {
-							e.visitResource(parentScheduler.get_name());
-							parentScheduler = parentScheduler.getParent();
-						}*/
-						
-												
-						executeTask(exec, allocation.getRequestedResources());
-					//} else if(GridSim.getEntityId(allocation.getProviderName()) != -1 || scheduler.getScheduler(allocation.getProviderName())!=null){
-					} else if(resourceManager.getSchedulerName(allocation.getProviderName()) != null){
-						allocation.setProviderName(resourceManager.getSchedulerName(allocation.getProviderName()));
-						submitWorkloadUnit(task, allocation);
-					} else {
-
-						ExecTask exec = (ExecTask) task;
-						
-							//Executable exec = jobRegistry.createExecutable(t, allocation);
-							//exec.setResourceParameter(scheduler.get_id(), 1);
-						/*e.visitResource(scheduler.get_name());
-						Scheduler parentScheduler = scheduler.getParent();
-						while (parentScheduler != null && !e.getVisitedResources().contains(parentScheduler.get_name())) {
-							e.visitResource(parentScheduler.get_name());
-							parentScheduler = parentScheduler.getParent();
-						}*/
-						executeTask(exec, chooseResourcesForExecution(allocation.getProviderName(), (ExecTask)task));
-					}
-				}
-
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
+			}
+
 		}
 	}
 
 	protected void executeTask(ExecTask task, Map<ResourceUnitName, ResourceUnit> choosenResources) {
-	//	Executable exec = (Executable) task;
-	
-		SubmittedTask submittedTask = (SubmittedTask)task;
+
+		Executable exec = (Executable)task;
 		boolean allocationStatus = getAllocationManager().allocateResources(choosenResources);
 		if(allocationStatus == false)
 			return;
 		removeFromQueue(task);
-		//SubmittedTask submittedTask = (SubmittedTask)task;
-		/* submittedTask = jobRegistry.getSubmittedTask(exec.getJobId(), exec.getId());
-		if(submittedTask == null)
-		{	submittedTask = new SubmittedTask(exec);
-			jobRegistry.addTask(submittedTask);
-		}*/
-		double completionPercentage = (submittedTask.getLength() - submittedTask.getRemainingGridletLength())/submittedTask.getLength();
+
 		SchedulingEvent event = new SchedulingEvent(SchedulingEventType.START_TASK_EXECUTION);
 		int time = Double.valueOf(
-				execTimeEstimationPlugin.execTimeEstimation(event, choosenResources, task, completionPercentage)).intValue();
+				execTimeEstimationPlugin.execTimeEstimation(event, task, choosenResources, exec.getCompletionPercentage())).intValue();
 		log.debug(task.getJobId() + "_" + task.getId() + " starts executing on " + new DateTime()
 				+ " will finish after " + time);
@@ -322,31 +230,34 @@
 			return;
 
-		submittedTask.setEstimatedDuration(time);
+		exec.setEstimatedDuration(time);
 		DateTime currentTime = new DateTime();
 		ResourceHistoryItem resHistItem = new ResourceHistoryItem(choosenResources, currentTime);
-		submittedTask.addUsedResources(resHistItem);
-		submittedTask.setFinishTime(currentTime.getMillis() / 1000);
-		
-		jobRegistry.saveHistory(submittedTask, time, choosenResources);
-		
-		scheduler.sendInternal(time, WormsTags.TASK_EXECUTION_FINISHED,
-				submittedTask);
-
+		exec.addUsedResources(resHistItem);
 		try {
-			long expectedDuration = submittedTask.getExpectedDuration().getMillis() / 1000;
-			scheduler.sendInternal(expectedDuration, WormsTags.TASK_REQUESTED_TIME_EXPIRED, submittedTask);
+			exec.setStatus(DCWormsTags.INEXEC);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		scheduler.sendInternal(time, DCWormsTags.TASK_EXECUTION_FINISHED, exec);
+
+		try {
+			long expectedDuration = exec.getExpectedDuration().getMillis() / 1000;
+			scheduler.sendInternal(expectedDuration, DCWormsTags.TASK_REQUESTED_TIME_EXPIRED, exec);
 		} catch (NoSuchFieldException e) {
-			double t = submittedTask.getEstimatedDuration();
-			scheduler.sendInternal(t, WormsTags.TASK_REQUESTED_TIME_EXPIRED, submittedTask);
-		}
-		
-		submittedTask.setGridletStatus(Gridlet.INEXEC);
-		log.info(WormsConstants.USAGE_MEASURE_NAME + ": " + calculateTotalLoad(jobRegistry.getRunningTasks().size()));
+			double t = exec.getEstimatedDuration();
+			scheduler.sendInternal(t, DCWormsTags.TASK_REQUESTED_TIME_EXPIRED, exec);
+		}
+
+		log.info(DCWormsConstants.USAGE_MEASURE_NAME + ": " + calculateTotalLoad(jobRegistry.getRunningTasks().size()));
 		
 		PEUnit peUnit = (PEUnit)choosenResources.get(StandardResourceUnitName.PE);
-		if(peUnit instanceof ProcessingElements){
+		
+		notifyComputingResources(peUnit, EnergyEventType.TASK_STARTED, exec);
+		
+		/*if(peUnit instanceof ProcessingElements){
 			ProcessingElements pes = (ProcessingElements) peUnit;
 			for (ComputingResource resource : pes) {
-				resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, submittedTask));
+				resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_STARTED, exec));
 			}
 		} else {
@@ -355,12 +266,9 @@
 				resource = ResourceController.getComputingResourceByName(peUnit.getResourceId());
 			} catch (ResourceException e) {
-				
-			}
-			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, submittedTask));
-		}
-		/*ProcessingElements pes = (ProcessingElements) choosenResources.get(StandardResourceUnitName.PE);
-		for (ComputingResource resource : pes) {
-			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_STARTED, submittedTask));
-		}*/
+				return;
+			}
+			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_STARTED, exec));
+		}
+*/
 
 		/*for(ExecTaskInterface etask : jobRegistry.getRunningTasks()){
@@ -371,48 +279,22 @@
 	}
 	
-	public void finalizeExecutable(ExecTask exec){
-		
-		SubmittedTask subTask = (SubmittedTask)exec;
-		subTask.setGridletStatus(Gridlet.SUCCESS);
-		subTask.finalizeGridlet();
-		UsedResourceList<ResourceHistoryItem> lastUsedList = subTask.getUsedResources();
-		Map<ResourceUnitName, ResourceUnit> lastUsed = lastUsedList.getLast()
-				.getResourceUnits();
-		getAllocationManager().freeResources(lastUsed);
-		
-		PEUnit peUnit = (PEUnit)lastUsed.get(StandardResourceUnitName.PE);
-		if(peUnit instanceof ProcessingElements){
-			ProcessingElements pes = (ProcessingElements) peUnit;
-			for (ComputingResource resource : pes) {
-				resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, subTask));
-			}
-		} else {
-			ComputingResource resource = null;
-			try {
-				resource = ResourceController.getComputingResourceByName(peUnit.getResourceId());
-			} catch (ResourceException e) {
-				
-			}
-			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, subTask));
-		}
-		/*ProcessingElements pes = (ProcessingElements) lastUsed.get(StandardResourceUnitName.PE);
-		for (ComputingResource resource : pes) {
-			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, subTask));
-		}*/
-		SubTaskFilter filter = new SubTaskFilter(subTask.getGridletID(), WormsTags.TASK_REQUESTED_TIME_EXPIRED);
+	public void finalizeExecutable(ExecTask execTask){
+		
+		Executable exec = (Executable)execTask;
+		exec.finalizeExecutable();
+		
+		ExecTaskFilter filter = new ExecTaskFilter(exec.getUniqueId(), DCWormsTags.TASK_REQUESTED_TIME_EXPIRED);
 		scheduler.sim_cancel(filter, null);
 		
-		Executable executable = (Executable) subTask.getGridlet();
-		Job job = jobRegistry.get(executable.getJobId());
-
-		Task task = null;
+		Task task;
+		Job job = jobRegistry.getJob(exec.getJobId());
 		try {
-			task = job.getTask(executable.getTaskId());
+			task = job.getTask(exec.getTaskId());
 		} catch (NoSuchFieldException e) {
-			e.printStackTrace();
-		}
-		if(executable.getProcessesId() == null){
-			try {
-				task.setStatus(executable.getStatus());
+			return;
+		}
+		if(exec.getProcessesId() == null){
+			try {
+				task.setStatus(exec.getStatus());
 			} catch (Exception e) {
 				e.printStackTrace();
@@ -422,10 +304,33 @@
 			for(int i = 0; i < processesList.size(); i++){
 				AbstractProcesses processes = processesList.get(i);
-				if(processes.getId().equals(executable.getProcessesId())){
-					processes.setStatus(executable.getStatus());
+				if(processes.getId().equals(exec.getProcessesId())){
+					processes.setStatus(exec.getStatus());
 					break;
 				}
 			}
 		}
+		
+		UsedResourcesList lastUsedList = exec.getUsedResources();
+		Map<ResourceUnitName, ResourceUnit> lastUsed = lastUsedList.getLast()
+				.getResourceUnits();
+		getAllocationManager().freeResources(lastUsed);
+		
+		PEUnit peUnit = (PEUnit)lastUsed.get(StandardResourceUnitName.PE);
+		notifyComputingResources(peUnit, EnergyEventType.TASK_FINISHED, exec);
+		/*if(peUnit instanceof ProcessingElements){
+			ProcessingElements pes = (ProcessingElements) peUnit;
+			for (ComputingResource resource : pes) {
+				resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, exec));
+			}
+		} else {
+			ComputingResource resource = null;
+			try {
+				resource = ResourceController.getComputingResourceByName(peUnit.getResourceId());
+			} catch (ResourceException e) {
+				return;
+			}
+			resource.handleEvent(new EnergyEvent(EnergyEventType.TASK_FINISHED, exec));
+		}*/
+
 		//sendFinishedWorkloadUnit(executable);
 	}
@@ -441,15 +346,32 @@
 		while (iter.hasNext()) {
 			ExecTask task = iter.next();
-			SubmittedTask subTask = (SubmittedTask)task;
-			UsedResourceList<ResourceHistoryItem> usedResourcesList = subTask.getUsedResources();
-			ResourceUnit unit = usedResourcesList.getLast().getResourceUnits()
+			Executable exec = (Executable)task;
+			exec.setCompletionPercentage(exec.getCompletionPercentage() + 100 * timeSpan/exec.getEstimatedDuration());
+			
+			UsedResourcesList usedResourcesList = exec.getUsedResources();
+			PEUnit peUnit = (PEUnit)usedResourcesList.getLast().getResourceUnits()
 					.get(StandardResourceUnitName.PE);
-
-			double load = getMIShare(timeSpan, (PEUnit) unit);
-			subTask.updateGridletFinishedSoFar(load);
+			double load = getMIShare(timeSpan, peUnit);
 			addTotalLoad(load);
 		}
 	}
-
+	private void notifyComputingResources(PEUnit peUnit, EnergyEventType eventType, Object obj){
+
+		if(peUnit instanceof ProcessingElements){
+			ProcessingElements pes = (ProcessingElements) peUnit;
+			for (ComputingResource resource : pes) {
+				resource.handleEvent(new EnergyEvent(eventType, obj));
+			}
+		} else {
+			ComputingResource resource = null;
+			try {
+				resource = ResourceController.getComputingResourceByName(peUnit.getResourceId());
+			} catch (ResourceException e) {
+				return;
+			}
+			resource.handleEvent(new EnergyEvent(eventType, obj));
+		}
+	}
+	
 	private double getMIShare(double timeSpan, PEUnit pes) {
 		double localLoad;
@@ -470,7 +392,7 @@
 	protected void updateProcessingTimes(Sim_event ev) {
 		updateProcessingProgress();
-		for (ExecTask task : jobRegistry.getRunningTasks()) {
-			SubmittedTask subTask = (SubmittedTask)task;
-			List<String> visitedResource = subTask.getVisitedResources();
+		for (ExecTask execTask : jobRegistry.getRunningTasks()) {
+			Executable exec = (Executable)execTask;
+			List<String> visitedResource = exec.getVisitedResources();
 			String originResource = ev.get_data().toString();
 			if(!ArrayUtils.contains(visitedResource.toArray(new String[visitedResource.size()]), originResource)){
@@ -478,20 +400,16 @@
 			}
 			
-			Map<ResourceUnitName, ResourceUnit> choosenResources = subTask.getUsedResources().getLast().getResourceUnits();
-			double completionPercentage = (task.getLength() - subTask.getRemainingGridletLength())/task.getLength();
-			double time = execTimeEstimationPlugin.execTimeEstimation(new SchedulingEvent(SchedulingEventType.RESOURCE_STATE_CHANGED), 
-					choosenResources, task, completionPercentage);
-
-			/*if(!subTask.getVisitedResources().contains(ev.get_data().toString())) {
+			Map<ResourceUnitName, ResourceUnit> choosenResources = exec.getUsedResources().getLast().getResourceUnits();
+			int time =  Double.valueOf(execTimeEstimationPlugin.execTimeEstimation(new SchedulingEvent(SchedulingEventType.RESOURCE_STATE_CHANGED), 
+					execTask, choosenResources, exec.getCompletionPercentage())).intValue();
+
+			//check if the new estimated end time is equal to the previous one; if yes the continue without update
+			if( DoubleMath.subtract((exec.getExecStartTime() + exec.getEstimatedDuration()), (new DateTime().getMillis()/1000 + time)) == 0.0){
 				continue;
-			}*/
-			//check if the new estimated end time is equal to the previous one; if yes the continue without update
-			if( DoubleMath.subtract((subTask.getExecStartTime() + subTask.getEstimatedDuration()), (new DateTime().getMillis()/1000 + time)) == 0.0){
-				continue;
-			}
-			SubTaskFilter filter = new SubTaskFilter(subTask.getGridletID(), WormsTags.TASK_EXECUTION_FINISHED);
+			}
+			exec.setEstimatedDuration(time);
+			ExecTaskFilter filter = new ExecTaskFilter(exec.getUniqueId(), DCWormsTags.TASK_EXECUTION_FINISHED);
 			scheduler.sim_cancel(filter, null);
-			scheduler.sendInternal(time, WormsTags.TASK_EXECUTION_FINISHED, task);
-
+			scheduler.sendInternal(time, DCWormsTags.TASK_EXECUTION_FINISHED, execTask);
 		}
 	}	
@@ -511,5 +429,4 @@
 				numberOfPE = numberOfPE + resUnit.getAmount();
 			}
-			//numberOfPE = getResourceManager().getPE().size();
 		} catch (Exception e) {
 			numberOfPE = 1;
@@ -532,5 +449,6 @@
 			ExecTask task) {
 
-		ResourceManager resourceManager = this.resourceManager;
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
+		LocalResourceManager resourceManager = getResourceManager();
 		if(resourceName != null){
 			ComputingResource resource = null;
@@ -540,9 +458,6 @@
 				return null;
 			}
-
 			resourceManager = new LocalResourceManager(resource);
 		}
-		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
-
 
 		int cpuRequest;
@@ -553,15 +468,14 @@
 		}
 
-		//PEUnit processingUnits = null;
 		if (cpuRequest != 0) {
 			
 			List<ResourceUnit> availableUnits = null;
 			try {
-				availableUnits = getResourceManager().getPE();
+				availableUnits = resourceManager.getPE();
 			} catch (ResourceException e) {
 				return null;
 			}
+			
 			List<ResourceUnit> choosenPEUnits = new ArrayList<ResourceUnit>();
-
 			for (int i = 0; i < availableUnits.size() && cpuRequest > 0; i++) {
 				PEUnit peUnit = (PEUnit) availableUnits .get(i);
@@ -576,67 +490,16 @@
 				return null;
 			}
-
-			/*try {
-				List<? extends ComputingResource> processingElements = resourceManager.getResourcesOfType(StandardResourceType.Processor);
-				List<ComputingResource> choosenResources = new ArrayList<ComputingResource>();
-				int peSize = processingElements.size();
-				for (int i = 0; i < peSize && cpuRequest > 0; i++) {
-					if (processingElements.get(i).getStatus() == ResourceStatus.FREE) {
-						choosenResources.add(processingElements.get(i));
-						cpuRequest--;
-					}
-				}
-				if (cpuRequest > 0)
-				{	
-					return null;
-				}
-				processingUnits = new ProcessingElements(choosenResources);
-			} catch (Exception e) {
-	
-				List<ResourceUnit> procResUnit = resourceManager.getDistributedResourceUnits(StandardResourceUnitName.PE);
-
-				for(ResourceUnit resUnit: procResUnit){
-					if (resUnit.getFreeAmount() >= cpuRequest)
-					{	
-						processingUnits = new PEUnit(resUnit.getResourceId(), cpuRequest, cpuRequest);
-						break;
-					} 
-				}
-			}*/
 			map.put(StandardResourceUnitName.PE, choosenPEUnits.get(0));
 		}
-		/*int memoryRequest;
-		try {
-			memoryRequest = Double.valueOf(task.getMemoryRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			memoryRequest = 0;
-		}
-		if (memoryRequest != 0) {
-			List<ResourceUnit> resUnit = resourceManager.getSharedResourceUnits().get(StandardResourceUnitName.MEMORY);
-
-			Memory memory = null;
-			for (ResourceUnit memUnit : resUnit) {
-				Memory m = (Memory) memUnit;
-
-				if (m.getFreeAmount() >= memoryRequest) {	
-					System.out.println(m.getResourceId()+ ";"+m.getAmount()+";"+m.getFreeAmount());
-					memory = new Memory(m, memoryRequest, memoryRequest);
-				}
-			}
-			if(memory == null)
-				return null;
-			map.put(StandardResourceUnitName.MEMORY, memory);
-		}*/
+
 		return  map;
 	}
-
-
-	
-	public void notifySubmittedWorkloadUnit(WorkloadUnit<?> job, boolean ack) {
+	
+	public void notifySubmittedWorkloadUnit(WorkloadUnit wu, boolean ack) {
 		updateProcessingProgress();
-		registerWorkloadUnit(job);
-	}
-
-	private void registerWorkloadUnit(WorkloadUnit<?> wu){
+		registerWorkloadUnit(wu);
+	}
+
+	private void registerWorkloadUnit(WorkloadUnit wu){
 		if(!wu.isRegistered()){
 			wu.register(jobRegistry);
@@ -647,5 +510,5 @@
 	class LocalWorkloadUnitHandler implements WorkloadUnitHandler{
 		
-		public void handleJob(Job job){
+		public void handleJob(JobInterface<?> job){
 
 			if (log.isInfoEnabled())
@@ -654,30 +517,26 @@
 			List<JobInterface<?>> jobsList = new ArrayList<JobInterface<?>>();
 			jobsList.add(job);
-			WorkloadUnitListImpl readyTasks = new WorkloadUnitListImpl();
-			for(Task task: jobRegistry.getReadyTasks(jobsList)){
+			TaskListImpl availableTasks = new TaskListImpl();
+			for(Task task: jobRegistry.getAvailableTasks(jobsList)){
 				task.setStatus((int)BrokerConstants.TASK_STATUS_QUEUED);
-				readyTasks.add(task);
-			}
-
-			for(WorkloadUnit<?> e:readyTasks){	
-				registerWorkloadUnit(e);
-			}
-		}
-		
-		public void handleTask(TaskInterface<?> ti){
-			Task task = (Task)ti;
-			
-			if(task.getProcesses() == null){
+				availableTasks.add(task);
+			}
+
+			for(TaskInterface<?> task: availableTasks){	
+				registerWorkloadUnit(task);
+			}
+		}
+		
+		public void handleTask(TaskInterface<?> t){
+			Task task = (Task)t;
+			List<AbstractProcesses> processes = task.getProcesses();
+
+			if(processes == null || processes.size() == 0){
 				Executable exec = new Executable(task);
-				exec.setUserID(task.getSenderId());
-				exec.setLength(task.getLength());
 				registerWorkloadUnit(exec);
 			} else {
-				List<AbstractProcesses> processesList = task.getProcesses();
-				for(int i = 0; i < processesList.size(); i++){	
-					AbstractProcesses processes = processesList.get(i);
-					Executable exec = new Executable(task, processes);
-					exec.setUserID(task.getSenderId());
-					exec.setLength(task.getLength());
+				for(int j = 0; j < processes.size(); j++){
+					AbstractProcesses procesesSet = processes.get(j);
+					Executable exec = new Executable(task, procesesSet);
 					registerWorkloadUnit(exec);
 				}
@@ -686,49 +545,25 @@
 		
 		public void handleExecutable(ExecTask task){
+			
 			Executable exec = (Executable) task;
-
-			// int cost =
-			// this.resourceManager.getResourceCharacteristic().getResUnits() !=
-			// null ?
-			// this.resourceManager.getResourceCharacteristic().getResUnits().get(ResourceParameterName.COST).getAmount()
-			// : 1;
-
-			exec.visitResource(scheduler.get_name());
+			jobRegistry.addExecTask(exec);
+			
+			exec.trackResource(scheduler.get_name());
 			Scheduler parentScheduler = scheduler.getParent();
-			while (parentScheduler != null && !exec.getVisitedResources().contains(parentScheduler.get_name())) {
-				exec.visitResource(parentScheduler.get_name());
+			List<String> visitedResource = exec.getVisitedResources();
+			String [] visitedResourcesArray = visitedResource.toArray(new String[visitedResource.size()]);
+			while (parentScheduler != null && !ArrayUtils.contains(visitedResourcesArray, parentScheduler.get_name())) {
+				exec.trackResource(parentScheduler.get_name());
 				parentScheduler = parentScheduler.getParent();
 			}
-			
-			exec.setResourceParameter(scheduler.get_id(), 1);
-			SubmittedTask subTask = new SubmittedTask(exec);
-			jobRegistry.addTask(subTask);
-			WorkloadUnitListImpl newTasks = new WorkloadUnitListImpl();
-			newTasks.add(subTask);
-		
-			schedulingPlugin.placeJobsInQueues(newTasks, queues, getResourceManager(), moduleList);
-
-			if (subTask.getStatus() == Gridlet.QUEUED) {
+			exec.setSchedulerName(scheduler.get_id());
+			
+			TaskList newTasks = new TaskListImpl();
+			newTasks.add(exec);
+		
+			schedulingPlugin.placeTasksInQueues(newTasks, queues, getResourceManager(), moduleList);
+
+			if (exec.getStatus() == DCWormsTags.QUEUED) {
 				sendExecutableReadyEvent(exec);
-			}
-		}
-		
-		public void handleSubmittedTask(SubmittedTask task){
-
-			task.visitResource(scheduler.get_name());
-			Scheduler parentScheduler = scheduler.getParent();
-			while (parentScheduler != null && !task.getVisitedResources().contains(parentScheduler.get_name())) {
-				task.visitResource(parentScheduler.get_name());
-				parentScheduler = parentScheduler.getParent();
-			}
-
-			jobRegistry.addTask(task);
-			WorkloadUnitListImpl newTasks = new WorkloadUnitListImpl();
-			newTasks.add(task);
-		
-			schedulingPlugin.placeJobsInQueues(newTasks, queues, getResourceManager(), moduleList);
-
-			if (task.getStatus() == Gridlet.QUEUED) {
-				sendExecutableReadyEvent(task);
 			}
 		}
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GridBroker.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GridBroker.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GridBroker.java	(revision 539)
@@ -19,5 +19,4 @@
 public class GridBroker extends GlobalManagementSystem { 
 
-	
 	private static Log log = LogFactory.getLog(GridBroker.class);
 
@@ -27,25 +26,11 @@
 	public GridBroker(String name, SchedulingPlugin schedulingPlugin, ExecutionTimeEstimationPlugin execTimeEstimationPlugin, TaskQueueList queues) throws Exception {
 		super(name, "BROKER",  schedulingPlugin, execTimeEstimationPlugin, queues);
-		
-		//make use of plug-in interface
-		
-		//Properties prop = new Properties();
-		//prop.put("plugin.name", name);
-		//prop.put("plugin.utils.timeoperations", "gssim.scheduling.plugin.local.GssimTimeOperations");
-		//schedulingPlugin.init(prop);
+
 		otherGridSchedulersIds = new HashSet<Integer>();
-		
 		moduleList = new ModuleListImpl(2);
-		//this.moduleList.add(new GridResourceDiscovery(this.getScheduler()));
-		//moduleList.add(new GridReservationManagerNew(this));
-		
-		if(log.isDebugEnabled())
-			log.debug(name + ": Creating a broker interface object");
 	}
 
 	public void init(Scheduler scheduler, ManagedResources managedResources) {
 		super.init(scheduler, managedResources);
-		//this.scheduler = scheduler;
-		//this.resourceManager = ResourceManagerFactory.createResourceManager(scheduler, managedResources);
 		this.moduleList.add((GridResourceDiscovery)resourceManager);
 	}
@@ -57,5 +42,4 @@
 		}
 		return providerIds;
-		//return GridSim.getGridResourceList();
 	}
 
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GlobalManagementSystem.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GlobalManagementSystem.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/global/GlobalManagementSystem.java	(revision 539)
@@ -11,14 +11,12 @@
 import org.qcg.broker.schemas.schedulingplan.types.AllocationStatus;
 
+import dcworms.schedframe.scheduling.ExecTask;
+import dcworms.schedframe.scheduling.Executable;
+
 import qcg.shared.constants.BrokerConstants;
-
-import schedframe.events.scheduling.EventReason;
-import schedframe.events.scheduling.SchedulingEvent;
 import schedframe.events.scheduling.TaskArrivedEvent;
-import schedframe.events.scheduling.TaskCanceledEvent;
 import schedframe.events.scheduling.TimerEvent;
-import schedframe.scheduling.Scheduler;
+import schedframe.scheduling.TaskListImpl;
 import schedframe.scheduling.WorkloadUnitHandler;
-import schedframe.scheduling.WorkloadUnitListImpl;
 import schedframe.scheduling.plan.AllocationInterface;
 import schedframe.scheduling.plan.ScheduledTaskInterface;
@@ -31,17 +29,12 @@
 import schedframe.scheduling.tasks.Job;
 import schedframe.scheduling.tasks.JobInterface;
-import schedframe.scheduling.tasks.SubmittedTask;
 import schedframe.scheduling.tasks.Task;
 import schedframe.scheduling.tasks.TaskInterface;
 import schedframe.scheduling.tasks.WorkloadUnit;
-
 import eduni.simjava.Sim_event;
 import gridsim.GridSim;
 import gridsim.GridSimTags;
-import gridsim.Gridlet;
 import gridsim.IO_data;
-import gridsim.gssim.WormsTags;
-import gssim.schedframe.scheduling.ExecTask;
-import gssim.schedframe.scheduling.Executable;
+import gridsim.dcworms.DCWormsTags;
 
 public class GlobalManagementSystem extends AbstractManagementSystem {
@@ -54,7 +47,4 @@
 		super(providerId, entityName,  execTimeEstimationPlugin, queues);
 
-		/*schedulingPlugin = (GlobalSchedulingPlugin) InstanceFactory.createInstance(
-				schedulingPluginClassName,
-				GlobalSchedulingPlugin.class);*/
 		if(schedPlugin == null){
 			throw new Exception("Can not create global scheduling plugin instance");
@@ -69,8 +59,8 @@
 		switch (tag) {
 
-		case WormsTags.TIMER:
-			if (pluginSupportsEvent(WormsTags.TIMER)) {
+		case DCWormsTags.TIMER:
+			if (pluginSupportsEvent(DCWormsTags.TIMER)) {
 				TimerEvent event = new  TimerEvent();
-				SchedulingPlanInterface decision =  schedulingPlugin.schedule(event, 
+				SchedulingPlanInterface<?> decision =  schedulingPlugin.schedule(event, 
 						queues,  getJobRegistry(), getResourceManager(), moduleList);
 				executeSchedulingPlan(decision);
@@ -81,5 +71,5 @@
 	}
 	
-	public void notifySubmittedWorkloadUnit(WorkloadUnit<?> wu, boolean ack) {
+	public void notifySubmittedWorkloadUnit(WorkloadUnit wu, boolean ack) {
 		if (!pluginSupportsEvent(GridSimTags.GRIDLET_SUBMIT)) {
 			log.error("Plugin " + schedulingPlugin.getClass()
@@ -90,54 +80,29 @@
 		
 		registerWorkloadUnit(wu);
-		/*Job job = (Job) wu;
-		jobRegistry.addJob(job);
-
-		if (log.isInfoEnabled())
-			log.info("Received job " + job.getId() + " at " + new DateTime(DateTimeUtilsExt.currentTimeMillis()));
-
+
+	}
+	
+	private void registerWorkloadUnit(WorkloadUnit wu){
+		if(!wu.isRegistered()){
+			wu.register(jobRegistry);
+		}
+		wu.accept(getWorkloadUnitHandler());
+	}
+	
+
+	protected void schedule(JobInterface<?> job){
 		List<JobInterface<?>> jobsList = new ArrayList<JobInterface<?>>();
 		jobsList.add(job);
-		WorkloadUnitList readyWorkloadUnits = new WorkloadUnitList();
-		readyWorkloadUnits.addAll(jobRegistry.getReadyTasks(jobsList));
-		schedulingPlugin.placeJobsInQueues(readyWorkloadUnits, queues, getResourceManager(), moduleList);
-
-		schedule(new TaskArrivedEvent());*/
-
-	}
-	
-	private void registerWorkloadUnit(WorkloadUnit<?> wu){
-		if(!wu.isRegistered()){
-			wu.register(jobRegistry);
-		}
-		wu.accept(getWorkloadUnitHandler());
-	}
-	
-
-	protected void scheduleReadyTasks(Job job){
-		List<JobInterface<?>> jobsList = new ArrayList<JobInterface<?>>();
-		jobsList.add(job);
-		WorkloadUnitListImpl readyWorkloadUnits = new WorkloadUnitListImpl();
-		readyWorkloadUnits.addAll(jobRegistry.getReadyTasks(jobsList));
-		schedulingPlugin.placeJobsInQueues(readyWorkloadUnits, queues, getResourceManager(), moduleList);
-
-		schedule(new TaskArrivedEvent());
-	}
-	
-	protected void schedule(SchedulingEvent schedulingEvent) {
-
-		try {
-			SchedulingPlanInterface decision = schedulingPlugin.schedule(
-					schedulingEvent, queues, getJobRegistry(),  getResourceManager(), moduleList);
-			if (decision == null)
-				return;
-
+		TaskListImpl readyTasks = new TaskListImpl();
+		readyTasks.addAll(jobRegistry.getAvailableTasks(jobsList));
+		
+		schedulingPlugin.placeTasksInQueues(readyTasks, queues, getResourceManager(), moduleList);
+		SchedulingPlanInterface<?> decision = schedulingPlugin.schedule(
+				new TaskArrivedEvent(), queues, getJobRegistry(),  getResourceManager(), moduleList);
+		if (decision != null)
 			executeSchedulingPlan(decision);
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public void notifyReturnedWorkloadUnit(WorkloadUnit<?> wu) {
+	}
+
+	public void notifyReturnedWorkloadUnit(WorkloadUnit wu) {
 		Executable exec = (Executable) wu;
 
@@ -149,12 +114,11 @@
 		
 		try {
-			Job job = jobRegistry.get(exec.getJobId());
-			/*Task task = job.getTask(exec.getTaskId());
+			Job job = jobRegistry.getJob(exec.getJobId());
+			Task task = job.getTask(exec.getTaskId());
 			if(exec.getProcessesId() == null){
 				try {
 					task.setStatus(exec.getStatus());
 				} catch (Exception e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
+
 				}
 			} else {
@@ -167,5 +131,5 @@
 					}
 				}
-			}*/
+			}
 			
 			if(job.isFinished()){
@@ -173,12 +137,5 @@
 			}
 			else {
-				scheduleReadyTasks(job);
-				/*List<JobInterface<?>> jobs = new ArrayList<JobInterface<?>>();
-				jobs.add(jobRegistry.getJobInfo(job.getId()));
-				WorkloadUnitList readyWorkloadUnits = new WorkloadUnitList();
-				readyWorkloadUnits.addAll(jobRegistry.getReadyTasks(jobs));
-				schedulingPlugin.placeJobsInQueues(readyWorkloadUnits, queues,
-						getResourceManager(), moduleList);
-				schedule(new TaskArrivedEvent());*/
+				schedule(job);
 			}
 			
@@ -189,67 +146,91 @@
 	}
 
-	public void notifyCanceledWorkloadUnit(WorkloadUnit<?> wu){;
-
-		Executable task = (Executable) wu;
-		String jobID = task.getJobId();
-		String taskID = task.getId();
-		
-		if(log.isDebugEnabled())
-			log.debug("Received canceled job" + jobID + "_" + taskID);
-		
-		TaskInterface<?> ti = jobRegistry.getTaskInfo(jobID, taskID) ;
-		try {
-
-			ti.setStatus((int)BrokerConstants.JOB_STATUS_CANCELED);
-			
-			TaskCanceledEvent event = new TaskCanceledEvent(jobID, taskID);
-			event.setReason(EventReason.RESERVATION_EXCEEDED);
-			schedule(event);
-			
-		} catch (Exception e) {
-			log.error("Exception during scheduling. " + e.getMessage());
-			e.printStackTrace();
-		}
-	}
-	
-	protected void executeSchedulingPlan(SchedulingPlanInterface decision) {
-
-		ArrayList<ScheduledTaskInterface> taskSchedulingDecisions = decision.getTasks();
+	protected void executeSchedulingPlan(SchedulingPlanInterface<?> decision) {
+
+		ArrayList<ScheduledTaskInterface<?>> taskSchedulingDecisions = decision.getTasks();
 		for (int i = 0; i < taskSchedulingDecisions.size(); i++) {
 
-			try {
-				ScheduledTaskInterface taskDecision = taskSchedulingDecisions.get(i);
-	
-				//log.info(decision.getDocument());
-	
-				String jobID = taskDecision.getJobId();
-				String taskID = taskDecision.getTaskId();
-				
-				// Task allocations that were rejected because of lack of resources or which were canceled and 
-				// not scheduled again are returned to the user.
-				if(taskDecision.getStatus() == AllocationStatus.REJECTED){
-					Job job = jobRegistry.get(jobID);
-					scheduler.send(job.getSenderId(), GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_RETURN, job);
-					continue;
-				}
-				
-				ArrayList<AllocationInterface> allocations = taskDecision.getAllocations();
-
-				Task task = (Task) jobRegistry.getTaskInfo(jobID, taskID);
-				for (int j = 0; j < allocations.size(); j++) {
-
-					AllocationInterface allocation = allocations.get(j);
-					Executable exec = jobRegistry.createExecutable(task, allocation);
-					submitWorkloadUnit(exec, allocation);
-					task.setStatus((int)BrokerConstants.TASK_STATUS_QUEUED);
-				}								
-
-			}catch (Exception e){
-				e.printStackTrace();
-			}
-		}
-	}
-
-	protected void submitWorkloadUnit(WorkloadUnit<?> job, AllocationInterface allocation) {
+			ScheduledTaskInterface<?> taskDecision = taskSchedulingDecisions.get(i);
+
+			//log.info(decision.getDocument());
+
+			String jobID = taskDecision.getJobId();
+			String taskID = taskDecision.getTaskId();
+			
+			// Task allocations that were rejected because of lack of resources or which were canceled and 
+			// not scheduled again are returned to the user.
+			if(taskDecision.getStatus() == AllocationStatus.REJECTED){
+				Job job = jobRegistry.getJob(jobID);
+				scheduler.send(job.getSenderId(), GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_RETURN, job);
+				continue;
+			}
+			
+			Task task = (Task) jobRegistry.getTaskInfo(jobID, taskID);
+			
+			ArrayList<AllocationInterface<?>> allocations = taskDecision.getAllocations();
+			for (int j = 0; j < allocations.size(); j++) {
+
+				AllocationInterface<?> allocation = allocations.get(j);
+				Executable exec = createExecutable(task, allocation);
+				submitTask(exec, allocation);
+				task.setStatus((int)BrokerConstants.TASK_STATUS_QUEUED);
+			}								
+		}
+	}
+
+	private Executable createExecutable(Task task, AllocationInterface<?> allocation) {
+
+		String refersTo = allocation.getProcessGroupId(); // null;//allocation.getRefersTo();
+		if(refersTo == null)
+			refersTo = task.getId();
+			
+		Executable exec = null;
+
+		if(refersTo.equals(task.getId())){
+			exec = new Executable(task);
+		} else {
+			List<AbstractProcesses> processes = task.getProcesses();
+			if(processes == null) {
+				try {
+					log.error("Allocation: " + allocation.getDocument() + "\nrefers to unknown task or processes set." +
+							" Set correct value (task id or prcesses set id) for allocation refersTo attribute.");
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+			boolean found = false;
+			for(int j = 0; j < processes.size() && !found; j++){
+				AbstractProcesses procesesSet = processes.get(j);
+				if(refersTo.equals(procesesSet.getId())){
+					exec = new Executable(task, procesesSet);
+					found = true;
+				}
+			}
+			if(!found){
+				log.error("Allocation refers to unknown proceses set.");
+			}
+		}
+
+		exec.setReservationId(allocation.getReservationId());
+			
+		/*HostInterface<?> host = allocation.getHost();
+		ComputingResourceTypeInterface<?> crt = host.getMachineParameters();
+		if(crt != null){
+			ComputingResourceTypeItemInterface<?> crti = crt.getComputingResourceTypeItem(0);
+			if(crti != null){
+				ParameterPropertyInterface<?> properties[] = crti.getHostParameter().getProperty();
+				for(int p = 0; p < properties.length; p++){
+					ParameterPropertyInterface<?> property = properties[p];
+					if("chosenCPUs".equals(property.getName())){
+						Object cpuNames = property.getValue();
+						exec.addSpecificResource(ResourceParameterName.FREECPUS, cpuNames);
+					}
+				}
+			}
+		}*/
+		return exec;
+	}
+	
+	protected void submitTask(TaskInterface<?> task, AllocationInterface<?> allocation) {
 
 		String providerName = allocation.getProviderName();
@@ -257,30 +238,24 @@
 			return;
 		}
-		TaskInterface<?> task = (TaskInterface<?>) job;
 		removeFromQueue(task);
 		
 		int resID = GridSim.getEntityId(providerName);
-		IO_data data = new IO_data(job, 0, resID);
+		IO_data data = new IO_data(task, 0, resID);
 		scheduler.send(scheduler.getOutputPort(), GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, data);	
-		
-		//scheduler.send(providerName, GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, job);			
+		//scheduler.send(providerName, GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, job);	
+		
 		if(log.isDebugEnabled())
-			try {
-				log.debug("Submitted job " + job.getId() + " to " + providerName);
-			} catch (NoSuchFieldException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
+			log.debug("Submitted job " + task.getId() + " to " + providerName);
+
 	}
 
 	class GlobalWorkloadUnitHandler implements  WorkloadUnitHandler{
 
-		public void handleJob(Job job){
-
-			jobRegistry.addJob(job);
+		public void handleJob(JobInterface<?> job){
 			if (log.isInfoEnabled())
 				log.info("Received job " + job.getId() + " at " + new DateTime(DateTimeUtilsExt.currentTimeMillis()));
 
-			scheduleReadyTasks(job);
+			jobRegistry.addJob(job);
+			schedule(job);
 		}
 		
@@ -292,8 +267,4 @@
 			throw new RuntimeException("Not implemented since it isn't expected that tasks are send directly to the global scheduler.");
 		}
-
-		public void handleSubmittedTask(SubmittedTask task) {
-			throw new RuntimeException("Not implemented since it isn't expected that tasks are send directly to the global scheduler.");
-		}
 	}
 
@@ -301,5 +272,4 @@
 		return new GlobalWorkloadUnitHandler();
 	}
-	
 
 
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/AbstractManagementSystem.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/policy/AbstractManagementSystem.java	(revision 539)
@@ -8,7 +8,10 @@
 import org.joda.time.DateTimeUtilsExt;
 
+import dcworms.schedframe.scheduling.ExecTask;
+import dcworms.schedframe.scheduling.Executable;
+import dcworms.schedframe.scheduling.queues.AbstractStatsSupportingQueue;
+
 import schedframe.PluginConfiguration;
 import schedframe.events.scheduling.SchedulingEventType;
-import schedframe.resources.units.StandardResourceUnitName;
 import schedframe.scheduling.Scheduler;
 import schedframe.scheduling.WorkloadUnitHandler;
@@ -16,6 +19,6 @@
 import schedframe.scheduling.manager.resources.ResourceManager;
 import schedframe.scheduling.manager.resources.ResourceManagerFactory;
+import schedframe.scheduling.manager.tasks.JobRegistry;
 import schedframe.scheduling.manager.tasks.JobRegistryImpl;
-import schedframe.scheduling.manager.tasks.JobRegistry;
 import schedframe.scheduling.plan.AllocationInterface;
 import schedframe.scheduling.plan.SchedulingPlanInterface;
@@ -27,15 +30,12 @@
 import schedframe.scheduling.queue.TaskQueueList;
 import schedframe.scheduling.tasks.Job;
+import schedframe.scheduling.tasks.TaskInterface;
 import schedframe.scheduling.tasks.WorkloadUnit;
-import simulator.WormsConstants;
+import simulator.DCWormsConstants;
 import eduni.simjava.Sim_event;
 import gridsim.GridSim;
 import gridsim.GridSimTags;
-import gridsim.Gridlet;
 import gridsim.IO_data;
-import gridsim.gssim.WormsTags;
-import gssim.schedframe.scheduling.ExecTask;
-import gssim.schedframe.scheduling.Executable;
-import gssim.schedframe.scheduling.queues.AbstractStatsSupportingQueue;
+import gridsim.dcworms.DCWormsTags;
 
 public abstract class AbstractManagementSystem {
@@ -45,15 +45,13 @@
 	protected String name;
 
+	protected TaskQueueList queues;
 	protected ResourceManager resourceManager;
-
-	protected TaskQueueList queues;
-
+	protected JobRegistryImpl jobRegistry;
+	protected ModuleList moduleList;
+	
 	protected SchedulingPlugin schedulingPlugin;
-
 	protected ExecutionTimeEstimationPlugin execTimeEstimationPlugin;
 
-	protected ModuleList moduleList;
-	
-	protected JobRegistryImpl jobRegistry;
+	protected Scheduler scheduler;
 	
 
@@ -67,4 +65,17 @@
 	}
 	
+	public void init(Scheduler sched, ManagedResources managedResources) {
+		scheduler = sched;
+		resourceManager = ResourceManagerFactory.createResourceManager(scheduler, managedResources);
+		scheduler.set_stat(DCWormsConstants.getResourcesStatisticsObject(queues.size()));
+		for(int i = 0; i < queues.size(); i++){
+			TaskQueue q = queues.get(i);
+			if(q instanceof AbstractStatsSupportingQueue<?>){
+				AbstractStatsSupportingQueue<?> queue = (AbstractStatsSupportingQueue<?>) q;
+				queue.setStats(scheduler.get_stat(), DCWormsConstants.TASKS_QUEUE_LENGTH_MEASURE_NAME + "_" + Integer.toString(i));
+			}
+		}
+	}
+	
 	public void processEvent(Sim_event ev) {
 		processOtherEvent(ev);
@@ -81,10 +92,7 @@
 	}
 	
+	
 	public String getName() {
 		return name;
-	}
-
-	public PluginConfiguration getSchedulingPluginConfiguration() {
-		return schedulingPlugin.getConfiguration();
 	}
 	
@@ -106,4 +114,12 @@
 		return jobRegistry;
 	}
+	
+	public Scheduler getScheduler() {
+		return scheduler;
+	}
+	
+	public PluginConfiguration getSchedulingPluginConfiguration() {
+		return schedulingPlugin.getConfiguration();
+	}
 
 	public boolean pluginSupportsEvent(int eventType){
@@ -111,68 +127,38 @@
 	}
 
-	public abstract void notifySubmittedWorkloadUnit(WorkloadUnit<?> wu, boolean ack);
-
-	public abstract void notifyCanceledWorkloadUnit(WorkloadUnit<?> wu);
-
-	public abstract void notifyReturnedWorkloadUnit(WorkloadUnit<?> wu);
-
-	protected abstract void executeSchedulingPlan(SchedulingPlanInterface decision);
-
-
-
+	public TaskQueueList getQueues(){
+		return queues;
+	}
+	
+	public Map<String, Integer> getQueuesSize() {
+		Map<String, Integer> queue_size = new HashMap<String, Integer>();
+		for (TaskQueue queue : queues) {
+			queue_size.put(queue.getName(), queue.size());
+		}
+		return queue_size;
+	}
+	
 	//POPRAWIC  (ale co? bo teraz chyba jest ok)
-	protected void submitWorkloadUnit(WorkloadUnit<?> wu, AllocationInterface allocation) {
+	protected void submitTask(TaskInterface<?> task, AllocationInterface<?> allocation) {
 		String providerName = allocation.getProviderName();
 		if (providerName == null) {
 			return;
 		}
-		//Executable exec = (Executable) wu;
-		removeFromQueue(wu);
-		scheduler.send(providerName, GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, wu);	
-	}
-	
-	protected boolean sendCanceledWorkloadUnit(int tag, Executable task, int executableId, int destId) {
-		
-		if (tag != GridSimTags.GRIDLET_CANCEL) {
-			return false;
-		}
-
-		long taskSize = 0;
-		if (task != null) {
-			taskSize = task.getGridletOutputSize();
-		}
-
-		// if no Gridlet found, then create a new Gridlet but set its status
-		// to FAILED. Then, most importantly, set the resource parameters
-		// because the user will search/filter based on a resource ID.
-		else if (task == null) {
-			try {
-				taskSize = 100;
-				task = jobRegistry.getTaskExecutable(executableId);
-				task.setGridletStatus(Gridlet.FAILED);
-				int cost = resourceManager.getSharedResourceUnits().get(StandardResourceUnitName.COST) != null ? resourceManager
-						.getSharedResourceUnits().get(StandardResourceUnitName.COST).get(0).getAmount()
-						: 1;
-				task.setResourceParameter(scheduler.get_id(), cost);
-			} catch (Exception e) {
-				// empty ...
-			}
-		}
-		scheduler.send(scheduler.getOutputPort(), GridSimTags.SCHEDULE_NOW, tag,  new IO_data(task, taskSize, destId));
-
-		return true;
-	}
-
-	protected boolean sendFinishedWorkloadUnit(WorkloadUnit<?> wu) {
+		removeFromQueue(task);
+		scheduler.send(providerName, GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, task);	
+	}
+
+	protected boolean sendFinishedWorkloadUnit(WorkloadUnit wu) {
 		
 		Executable exec = (Executable) wu;
 		if(scheduler.getParent() == null)
 		{
-			Job job = jobRegistry.get(exec.getJobId());
+			Job job = jobRegistry.getJob(exec.getJobId());
 
 			if(job.isFinished()){
 				scheduler.send(job.getSenderId(), GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_RETURN, job);
 				return true;
-			}else return true;
+			}
+			else return true;
 		}
 	
@@ -183,10 +169,4 @@
 
 	protected void sendExecutableReadyEvent(ExecTask exec) {
-
-		/*if (wu instanceof JobInterface) {
-			scheduler.sendInternal(Long.valueOf(0).doubleValue(), GssimTags.TASK_READY_FOR_EXECUTION,
-					wu);
-			return;
-		}*/
 
 		long delay = 0;
@@ -201,5 +181,5 @@
 		}
 
-		scheduler.sendInternal(Long.valueOf(delay).doubleValue(), WormsTags.TASK_READY_FOR_EXECUTION,
+		scheduler.sendInternal(Long.valueOf(delay).doubleValue(), DCWormsTags.TASK_READY_FOR_EXECUTION,
 				exec);
 	}
@@ -213,5 +193,5 @@
 				if (obj != null) {
 					int delay = (Integer) obj;
-					scheduler.sendInternal(delay, WormsTags.TIMER, null);
+					scheduler.sendInternal(delay, DCWormsTags.TIMER, null);
 				}
 			}
@@ -219,8 +199,8 @@
 	}
 	
-	protected boolean removeFromQueue(WorkloadUnit<?> wu) {
+	protected boolean removeFromQueue(TaskInterface<?> task) {
 		for(TaskQueue queue : queues){
-			if(queue.contains(wu)){
-				queue.remove(wu);
+			if(queue.contains(task)){
+				queue.remove(task);
 				return true;
 			}
@@ -228,37 +208,12 @@
 		return false;
 	}
-
-	public TaskQueueList getAccessQueues(){
-		return queues;
-	}
-	
-	public Map<String, Integer> getQueuesSize() {
-		Map<String, Integer> queue_size = new HashMap<String, Integer>();
-		for (TaskQueue queue : queues) {
-			queue_size.put(queue.getName(), queue.size());
-		}
-		return queue_size;
-	}
-
-	public void init(Scheduler sched, ManagedResources managedResources) {
-		scheduler = sched;
-		resourceManager = ResourceManagerFactory.createResourceManager(scheduler, managedResources);
-		scheduler.set_stat(WormsConstants.getResourcesStatisticsObject(queues.size()));
-		for(int i = 0; i < queues.size(); i++){
-			TaskQueue q = queues.get(i);
-			if(q instanceof AbstractStatsSupportingQueue<?>){
-				AbstractStatsSupportingQueue<?> queue = (AbstractStatsSupportingQueue<?>) q;
-				queue.setStats(scheduler.get_stat(), WormsConstants.TASKS_QUEUE_LENGTH_MEASURE_NAME + "_" + Integer.toString(i));
-			}
-		}
-	}
-
-	protected Scheduler scheduler;
-
-	public Scheduler getScheduler() {
-		return scheduler;
-	}
 	
 	public abstract WorkloadUnitHandler getWorkloadUnitHandler();
+	
+	public abstract void notifySubmittedWorkloadUnit(WorkloadUnit wu, boolean ack);
+
+	public abstract void notifyReturnedWorkloadUnit(WorkloadUnit wu);
+
+	protected abstract void executeSchedulingPlan(SchedulingPlanInterface<?> decision);
 
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/WorkloadUnitHandler.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/WorkloadUnitHandler.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/WorkloadUnitHandler.java	(revision 539)
@@ -1,17 +1,15 @@
 package schedframe.scheduling;
 
-import schedframe.scheduling.tasks.Job;
-import schedframe.scheduling.tasks.SubmittedTask;
+import dcworms.schedframe.scheduling.ExecTask;
+import schedframe.scheduling.tasks.JobInterface;
 import schedframe.scheduling.tasks.TaskInterface;
-import gssim.schedframe.scheduling.ExecTask;
 
-public 	interface WorkloadUnitHandler{
+public interface WorkloadUnitHandler{
 	
-	public void handleJob(Job job);
+	public void handleJob(JobInterface<?> job);
 	
 	public void handleTask(TaskInterface<?> task);
 	
 	public void handleExecutable(ExecTask task);
-	
-	public void handleSubmittedTask(SubmittedTask task);
+
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskListImpl.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskListImpl.java	(revision 539)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskListImpl.java	(revision 539)
@@ -0,0 +1,19 @@
+package schedframe.scheduling;
+
+import java.util.ArrayList;
+
+import schedframe.scheduling.tasks.TaskInterface;
+
+
+public class TaskListImpl extends ArrayList<TaskInterface<?>> implements TaskList {
+
+	private static final long serialVersionUID = -3824600938144742457L;
+
+	public TaskListImpl(){
+		super();
+	}
+	
+	public TaskListImpl(int initialSize){
+		super(initialSize);
+	}	
+}
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/Cluster.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/Cluster.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/Cluster.java	(revision 539)
@@ -13,5 +13,5 @@
 import gridsim.GridSimTags;
 import gridsim.IO_data;
-import gridsim.gssim.WormsTags;
+import gridsim.dcworms.DCWormsTags;
 
 public class Cluster extends Scheduler{
@@ -23,5 +23,5 @@
 	protected void processOtherRequest(Sim_event ev) {
 		switch (ev.get_tag()) {
-		case WormsTags.QUERY_RESOURCE_DESC:
+		case DCWormsTags.QUERY_RESOURCE_DESC:
 			SchedulerDescription desc = new SchedulerDescription(new LocalSystem(get_name(), null, null));
 			Map<ResourceUnitName, List<ResourceUnit>> units = managementSystem.getResourceManager().getSharedResourceUnits();
@@ -30,5 +30,5 @@
 
 			IO_data data = new IO_data(desc, 0, ev.get_src());
-			send(ev.get_src(), GridSimTags.SCHEDULE_NOW, WormsTags.QUERY_RESOURCE_DESC_RESULT, data);
+			send(ev.get_src(), GridSimTags.SCHEDULE_NOW, DCWormsTags.QUERY_RESOURCE_DESC_RESULT, data);
 			break;
 
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/GridResourceDiscovery.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/GridResourceDiscovery.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/GridResourceDiscovery.java	(revision 539)
@@ -5,5 +5,5 @@
 import gridsim.GridSimTags;
 import gridsim.IO_data;
-import gridsim.gssim.WormsTags;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -58,9 +58,9 @@
 		for(int i = 0; i < resourceList.size(); i++){
 			int resourceId = resourceList.get(i).get_id();
-			gridBroker.send(resourceId, GridSimTags.SCHEDULE_NOW, WormsTags.QUERY_RESOURCE_DESC, null);
+			gridBroker.send(resourceId, GridSimTags.SCHEDULE_NOW, DCWormsTags.QUERY_RESOURCE_DESC, null);
 		}
 		
 		//filter only the query response messages
-		Sim_type_p pred = new Sim_type_p(WormsTags.QUERY_RESOURCE_DESC_RESULT);
+		Sim_type_p pred = new Sim_type_p(DCWormsTags.QUERY_RESOURCE_DESC_RESULT);
 		Sim_event ev = new Sim_event();
 		
@@ -80,9 +80,9 @@
 		for(int i = 0; i < gridBroker.getChildren().size(); i++){
 			int resourceId = gridBroker.getChildren().get(i).get_id();
-			gridBroker.send(resourceId, GridSimTags.SCHEDULE_NOW, WormsTags.QUERY_RESOURCE_DESC, null);
+			gridBroker.send(resourceId, GridSimTags.SCHEDULE_NOW, DCWormsTags.QUERY_RESOURCE_DESC, null);
 		}
 		
 		//filter only the query response messages
-		Sim_type_p pred = new Sim_type_p(WormsTags.QUERY_RESOURCE_DESC_RESULT);
+		Sim_type_p pred = new Sim_type_p(DCWormsTags.QUERY_RESOURCE_DESC_RESULT);
 		Sim_event ev = new Sim_event();
 		
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskList.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskList.java	(revision 539)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/TaskList.java	(revision 539)
@@ -0,0 +1,10 @@
+package schedframe.scheduling;
+
+import java.util.List;
+
+import schedframe.scheduling.tasks.TaskInterface;
+
+
+public interface TaskList extends List<TaskInterface<?>>{
+
+}
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/queue/TaskQueue.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/queue/TaskQueue.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/queue/TaskQueue.java	(revision 539)
@@ -1,13 +1,13 @@
 package schedframe.scheduling.queue;
 
-import gridsim.Gridlet;
-import gssim.schedframe.scheduling.queues.AbstractStatsSupportingQueue;
+import gridsim.dcworms.DCWormsTags;
 
 import org.joda.time.DateTime;
 
-import schedframe.scheduling.tasks.WorkloadUnit;
+import dcworms.schedframe.scheduling.queues.AbstractStatsSupportingQueue;
 
-public class TaskQueue extends AbstractStatsSupportingQueue<WorkloadUnit<?>> implements Queue<WorkloadUnit<?>>{
+import schedframe.scheduling.tasks.TaskInterface;
 
+public class TaskQueue extends AbstractStatsSupportingQueue<TaskInterface<?>> implements Queue<TaskInterface<?>>{
 
 	private static final long serialVersionUID = 6576299222910508209L;
@@ -17,35 +17,30 @@
 	protected boolean supportReservation;
 	
-	
 	public TaskQueue (boolean supportReservation){
-		name = "Queue";
-		priority = 0;
+		this.name = "Queue";
+		this.priority = 0;
 		this.supportReservation = supportReservation;
-
 	}
 	
-	public boolean add(WorkloadUnit<?> wu){
+	public boolean add(TaskInterface<?> task){
 		try {
-			wu.setStatus(Gridlet.QUEUED);
+			task.setStatus(DCWormsTags.QUEUED);
 		} catch(Exception e){
 			throw new RuntimeException(e);
 		}
-		//updateStats();
-		return super.add(wu);
+		return super.add(task);
 	}
 	
-	public void add(int pos, WorkloadUnit<?> wu){
+	public void add(int pos, TaskInterface<?> task){
 		try {
-			wu.setStatus(Gridlet.QUEUED);
+			task.setStatus(DCWormsTags.QUEUED);
 		} catch(Exception e){
 			throw new RuntimeException(e);
 		}
-		//updateStats();
-		 super.add(pos, wu);
+		 super.add(pos, task);
 	}
 	
 	public DateTime getArrivalTime(int pos) throws IndexOutOfBoundsException {
-		//return get(pos).getSubmissionTimeToBroker();
-		return null;
+		return get(pos).getSubmissionTimeToBroker();
 	}
 
@@ -69,35 +64,3 @@
 		return supportReservation;
 	}
-	
-	
-	/*public boolean contains (WorkloadUnitInterface<?> wu) {
-		for(int i = 0; i< size();i++){
-			try {
-				if(get(i).getId().equals(wu.getId()))
-					return true;
-			} catch (NoSuchFieldException e) {
-				return false;
-			}
-		}
-		return false;
-	}
-	
-	public boolean remove (WorkloadUnitInterface<?> wu) {
-		boolean found = false;
-		int index = 0;
-		for(int i = 0; i< size() && !found;i++){
-			try {
-				if(get(i).getId().equals(wu.getId()))
-				{
-					found = true;
-					index = i;
-				}
-				
-			} catch (NoSuchFieldException e) {
-				return false;
-			}
-		}
-		remove(index);
-		return true;
-	}*/
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/AbstractProcesses.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/AbstractProcesses.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/AbstractProcesses.java	(revision 539)
@@ -3,5 +3,5 @@
 import schedframe.scheduling.tasks.requirements.ResourceParameterName;
 
-public abstract class AbstractProcesses<T> implements WorkloadUnit<T>{
+public abstract class AbstractProcesses implements WorkloadUnit{
 	
 	
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/JobInterface.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/JobInterface.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/JobInterface.java	(revision 539)
@@ -11,5 +11,5 @@
  *
  */
-public interface JobInterface<T> extends WorkloadUnit<T> {
+public interface JobInterface<T> extends WorkloadUnit, DescriptionContainer<T> {
 
 	/**
@@ -18,5 +18,5 @@
 	 * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained
 	 */
-	public abstract String getId() throws NoSuchFieldException;
+	//public abstract String getId() throws NoSuchFieldException;
 	
 	/**
@@ -44,6 +44,6 @@
 	 * @return constant which represents current status of this job
 	 */
-	public int getStatus();
+	//public int getStatus();
 	
-	public int getUserID();
+	//public int getUserID();
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Task.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Task.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Task.java	(revision 539)
@@ -30,5 +30,4 @@
 import schedframe.scheduling.WorkloadUnitHandler;
 import schedframe.scheduling.manager.tasks.JobRegistryImpl;
-import schedframe.scheduling.policy.AbstractManagementSystem;
 import schedframe.scheduling.tasks.requirements.ResourceParameterName;
 
@@ -38,5 +37,5 @@
  *
  */
-public class Task /*extends AbstractTask*/ implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> {
+public class Task implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> {
 	
 	protected static Unmarshaller unmarshaller;
@@ -72,6 +71,5 @@
 	private int senderId;
 	private long workloadLogWaitTime;
-	//String resPathHistory;
-	
+
 	public Task(org.qcg.broker.schemas.resreqs.Task task){
 		this.task = task;
@@ -80,5 +78,4 @@
 		this.brokerSubmitTime = null;
 		this.duration = null;
-	//	this.gridletID_ = (getJobId() + "_" + getId()).hashCode();
 		prepareTopology();
 	}
@@ -91,5 +88,4 @@
 		this.brokerSubmitTime = null;
 		this.duration = null;
-	//	this.gridletID_ = (getJobId() + getId()).hashCode();
 		prepareTopology();
 	}
@@ -269,5 +265,5 @@
 	}
 
-	public String getUserDn() {
+	public String getUserDN() {
 		return this.task.getUserDN();
 	}
@@ -471,29 +467,11 @@
 	}*/
 
+
 	@Override
-	public List <Task> getTask() {
-		List<Task> tasks = new ArrayList<Task>();
-		tasks.add(this);
-		return tasks;
-	}
-
-	@Override
-	public Task getTask(String taskId) throws NoSuchFieldException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public int getTaskCount() {
+	public int getUserId() {
 		// TODO Auto-generated method stub
 		return 0;
 	}
 
-	@Override
-	public int getUserID() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
 	public boolean isRegistered() {
 		return isRegistered;
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Processes.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Processes.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Processes.java	(revision 539)
@@ -1,5 +1,3 @@
 package schedframe.scheduling.tasks;
-
-import java.util.List;
 
 import org.qcg.broker.schemas.resreqs.ComputingResourceBaseTypeItem;
@@ -196,43 +194,15 @@
 	}
 
-	public org.qcg.broker.schemas.resreqs.Processes getDescription(){
-		return this.pr;
-	}
-
-	@Override
-	public List getTask() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public TaskInterface getTask(String taskId) throws NoSuchFieldException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public int getTaskCount() {
+	public int getStatus() {
+		return this.status;
+	}
+
+	@Override
+	public int getUserId() {
 		// TODO Auto-generated method stub
 		return 0;
 	}
 
-	@Override
-	public int getStatus() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public int getUserID() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public String getDocument() throws Exception {
-		// TODO Auto-generated method stub
-		return null;
-	}
+
 
 	@Override
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Job.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Job.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Job.java	(revision 539)
@@ -18,5 +18,4 @@
 import schedframe.scheduling.WorkloadUnitHandler;
 import schedframe.scheduling.manager.tasks.JobRegistryImpl;
-import schedframe.scheduling.policy.AbstractManagementSystem;
 
 
@@ -179,5 +178,5 @@
 	}
 	
-	public int getUserID(){
+	public int getUserId(){
 		return this.senderId;
 	}
@@ -204,6 +203,6 @@
 		
 		List<Task> readyTasks = new ArrayList<Task>();
-
 		int size = tasks.size();
+		
 		for(int i = 0; i < size; i++){
 			int parCnt;
@@ -216,12 +215,9 @@
 			} catch(Exception e){
 				parCnt = 0;
-				//e.printStackTrace();
-			}
-			if(parCnt == 0)
-			{
+			}
+			if(parCnt == 0) {
 				readyTasks.add(task);
 			}
-			else
-			{
+			else {
 				for(int j = 0; j < parCnt; j++){
 					ParentType par = task.getDescription().getWorkflow().getParent(j);
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java	(revision 539)
@@ -1,52 +1,19 @@
 package schedframe.scheduling.tasks;
 
-import java.util.List;
-
-import schedframe.DescriptionContainer;
 import schedframe.scheduling.WorkloadUnitHandler;
 import schedframe.scheduling.manager.tasks.JobRegistryImpl;
-import schedframe.scheduling.policy.AbstractManagementSystem;
 
-public interface WorkloadUnit<T> extends DescriptionContainer<T> {
+public interface WorkloadUnit {
 
-	/**
-	 * 
-	 * @return job identifier
-	 * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained
-	 */
-	public abstract String getId() throws NoSuchFieldException;
+	public String getId();
 	
-	/**
-	 * 
-	 * @return list of tasks which belongs to this job
-	 */
-	public abstract List<? extends TaskInterface<?>> getTask();
+	public int getUserId();
 	
-	/**
-	 * 
-	 * @param taskId
-	 * @return task with specified taskId
-	 * @throws NoSuchFieldException if task with taskId does not exist in this job
-	 */
-	public abstract TaskInterface<?> getTask(String taskId) throws NoSuchFieldException;
-	
-	/**
-	 * 
-	 * @return number of tasks in this job 
-	 */
-	public abstract int getTaskCount();
-	
-	/**
-	 * 
-	 * @return constant which represents current status of this job
-	 */
 	public int getStatus();
 	
 	public void setStatus(int status) throws Exception;
-	
+
 	public boolean isFinished();
-	
-	public int getUserID();
-	
+
 	public boolean isRegistered();
 
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/TaskInterface.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/TaskInterface.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/TaskInterface.java	(revision 539)
@@ -6,4 +6,5 @@
 import org.joda.time.ReadableDuration;
 
+import schedframe.DescriptionContainer;
 import schedframe.scheduling.tasks.requirements.ResourceParameterName;
 
@@ -14,5 +15,5 @@
  *
  */
-public interface TaskInterface<T> extends WorkloadUnit<T> {
+public interface TaskInterface<T> extends WorkloadUnit, DescriptionContainer<T> {
 	
 	/**
@@ -20,5 +21,5 @@
 	 * @return task identifier
 	 */
-	public abstract String getId();
+	//public abstract String getId();
 	
 	/**
@@ -33,5 +34,5 @@
 	 * submitted this task. 
 	 */
-	public abstract String getUserDn();
+	public abstract String getUserDN();
 	
 	/**
@@ -87,16 +88,10 @@
 	 */
 	public long getLength();
-	
-	/**
-	 * 
-	 * @param length measured in instructions.
-	 */
-	public void setLength(long length);
-	
+
 	/**
 	 * 
 	 * @return constant which represent current task status
 	 */
-	public int getStatus();
+	//public int getStatus();
 	
 	
@@ -107,5 +102,5 @@
 	public List<AbstractProcesses> getProcesses(AbstractProcessesGroup processGroup);
 	
-	public void setStatus(int status) throws Exception;
+	//public void setStatus(int status) throws Exception;
 	
 	public double getCpuCntRequest() throws NoSuchFieldException;
@@ -114,8 +109,5 @@
 	
 	public long getWorkloadLogWaitTime();
-	
-	//public void addToResPath(String resName);
-	
-	//public String getResPath();
+
 		
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/SchedulingPlanInterface.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/SchedulingPlanInterface.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/SchedulingPlanInterface.java	(revision 539)
@@ -99,4 +99,4 @@
 
 
-	public ArrayList<ScheduledTaskInterface> getTasks();
+	public ArrayList<ScheduledTaskInterface<?>> getTasks();
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/ScheduledTask.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/ScheduledTask.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/ScheduledTask.java	(revision 539)
@@ -6,12 +6,10 @@
 import org.exolab.castor.xml.MarshalException;
 import org.exolab.castor.xml.ValidationException;
+import org.qcg.broker.schemas.schedulingplan.types.AllocationStatus;
 
 import schedframe.scheduling.plan.AllocationInterface;
 import schedframe.scheduling.plan.ScheduledTaskInterface;
 import schedframe.scheduling.plan.ScheduledTimeInterface;
-import schedframe.scheduling.tasks.WorkloadUnit;
-
-
-import org.qcg.broker.schemas.schedulingplan.types.AllocationStatus;
+import schedframe.scheduling.tasks.TaskInterface;
 
 public class ScheduledTask implements ScheduledTaskInterface<org.qcg.broker.schemas.schedulingplan.Task> {
@@ -22,10 +20,10 @@
 	public ScheduledTask(){
 		t = new org.qcg.broker.schemas.schedulingplan.Task();
-		allocationList = new ArrayList<AllocationInterface>();
+		allocationList = new ArrayList<AllocationInterface<?>>();
 	}
 	
 	public ScheduledTask(org.qcg.broker.schemas.schedulingplan.Task value){
 		t = value;
-		allocationList = new ArrayList<AllocationInterface>();
+		allocationList = new ArrayList<AllocationInterface<?>>();
 	}
 	
@@ -178,17 +176,17 @@
 	
 
-	protected WorkloadUnit<?> task;
-	protected ArrayList<AllocationInterface> allocationList;
+	protected TaskInterface<?> task;
+	protected ArrayList<AllocationInterface<?>> allocationList;
 
-	public ScheduledTask(WorkloadUnit<?> task){
+	public ScheduledTask(TaskInterface<?> task){
 		this();
 		this.task = task;
 	}
 
-	public ArrayList<AllocationInterface> getAllocations() {
+	public ArrayList<AllocationInterface<?>> getAllocations() {
 		return this.allocationList;
 	}
 	
-	public WorkloadUnit<?> getTask(){
+	public TaskInterface<?> getTask(){
 		return this.task;
 	}
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/SchedulingPlan.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/SchedulingPlan.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/impl/SchedulingPlan.java	(revision 539)
@@ -18,10 +18,10 @@
 	public SchedulingPlan(){
 		sp = new org.qcg.broker.schemas.schedulingplan.SchedulingPlan();
-		taskList = new ArrayList<ScheduledTaskInterface>();
+		taskList = new ArrayList<ScheduledTaskInterface<?>>();
 	}
 	
 	public SchedulingPlan(org.qcg.broker.schemas.schedulingplan.SchedulingPlan value){
 		sp = value;
-		taskList = new ArrayList<ScheduledTaskInterface>();
+		taskList = new ArrayList<ScheduledTaskInterface<?>>();
 	}
 	
@@ -106,7 +106,7 @@
 
 	
-	protected ArrayList<ScheduledTaskInterface> taskList;
+	protected ArrayList<ScheduledTaskInterface<?>> taskList;
 
-	public ArrayList<ScheduledTaskInterface> getTasks() {
+	public ArrayList<ScheduledTaskInterface<?>> getTasks() {
 
 		return this.taskList;
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/ScheduledTaskInterface.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/ScheduledTaskInterface.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plan/ScheduledTaskInterface.java	(revision 539)
@@ -4,5 +4,5 @@
 
 import schedframe.DescriptionContainer;
-import schedframe.scheduling.tasks.WorkloadUnit;
+import schedframe.scheduling.tasks.TaskInterface;
 
 public interface ScheduledTaskInterface<T> extends DescriptionContainer<T> {
@@ -190,7 +190,7 @@
 	
 
-	public ArrayList<AllocationInterface> getAllocations();
+	public ArrayList<AllocationInterface<?>> getAllocations();
 	
-	public WorkloadUnit<?> getTask();
+	public TaskInterface<?> getTask();
 
 }
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/Scheduler.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/Scheduler.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/Scheduler.java	(revision 539)
@@ -8,5 +8,5 @@
 import gridsim.GridSimTags;
 import gridsim.IO_data;
-import gridsim.gssim.WormsTags;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -28,6 +28,6 @@
 import schedframe.scheduling.manager.resources.ManagedResources;
 import schedframe.scheduling.policy.AbstractManagementSystem;
+import schedframe.scheduling.queue.QueueDescription;
 import schedframe.scheduling.queue.TaskQueue;
-import schedframe.scheduling.queue.QueueDescription;
 import schedframe.scheduling.tasks.WorkloadUnit;
 
@@ -117,5 +117,5 @@
 				if (obj != null) {
 					int delay = (Integer) obj;
-					send(this.get_id(), delay, WormsTags.TIMER);
+					send(this.get_id(), delay, DCWormsTags.TIMER);
 				}
 			}
@@ -133,13 +133,4 @@
 				// managemetnSystem_.setEndSimulation();
 				run = false;
-				/*Sim_stat stats = get_stat();
-				List<Object[]> measures = stats.get_measures();
-				for (Object[] info : measures) {
-					String measure = (String) info[0];
-					if (measure
-							.startsWith(GssimConstants.TASKS_QUEUE_LENGTH_MEASURE_NAME)) {
-						System.out.println("====="+this.get_name()+";"+stats.average(measure));
-					}
-				}*/
 				break;
 			}
@@ -155,13 +146,13 @@
 
 		case GridSimTags.GRIDLET_SUBMIT:
-			processGSSIMJobSubmit(ev, false);
+			processWorkloadUnitSubmit(ev, false);
 			break;
 
 		case GridSimTags.GRIDLET_SUBMIT_ACK:
-			processGSSIMJobSubmit(ev, true);
+			processWorkloadUnitSubmit(ev, true);
 			break;
 
 		case GridSimTags.GRIDLET_RETURN:
-			processGSSIMJobReturn(ev);
+			processWorkloadUnitReturn(ev);
 			break;
 
@@ -174,5 +165,5 @@
 	protected void processOtherRequest(Sim_event ev) {
 		switch (ev.get_tag()) {
-		case WormsTags.QUERY_RESOURCE_DESC:
+		case DCWormsTags.QUERY_RESOURCE_DESC:
 			SchedulerDescription desc = new SchedulerDescription(new LocalSystem(get_name(), null, null));
 			Map<ResourceUnitName, List<ResourceUnit>> units = managementSystem.getResourceManager().getSharedResourceUnits();
@@ -181,5 +172,5 @@
 
 			IO_data data = new IO_data(desc, 0, ev.get_src());
-			send(ev.get_src(), GridSimTags.SCHEDULE_NOW, WormsTags.QUERY_RESOURCE_DESC_RESULT, data);
+			send(ev.get_src(), GridSimTags.SCHEDULE_NOW, DCWormsTags.QUERY_RESOURCE_DESC_RESULT, data);
 			break;
 
@@ -189,16 +180,12 @@
 		}
 	}
-	
-	/*public boolean processOtherEvent(Sim_event ev) {
-		return false;
-	}*/
-	
-	protected void processGSSIMJobReturn(Sim_event ev) {
-		WorkloadUnit<?> job = (WorkloadUnit<?>) ev.get_data();
+
+	protected void processWorkloadUnitReturn(Sim_event ev) {
+		WorkloadUnit job = (WorkloadUnit) ev.get_data();
 		managementSystem.notifyReturnedWorkloadUnit(job);
 	}
 
-	protected void processGSSIMJobSubmit(Sim_event ev, boolean ack) {
-		WorkloadUnit<?> job = (WorkloadUnit<?>) ev.get_data();
+	protected void processWorkloadUnitSubmit(Sim_event ev, boolean ack) {
+		WorkloadUnit job = (WorkloadUnit) ev.get_data();
 		managementSystem.notifySubmittedWorkloadUnit(job, ack);
 	}
@@ -223,9 +210,4 @@
 		this.send(this.get_id(), delay, tag, data);
 	}
-	
-	/*protected void send(int dest, int tag, int transaction, Object obj){
-		IO_data data = new Transaction_IO_data(transaction, obj, 8, dest);
-		super.send(dest, GridSimTags.SCHEDULE_NOW, tag, data);
-	}*/
 	
 	public Sim_port getOutputPort() {
@@ -271,5 +253,5 @@
 	public List<QueueDescription> getQueuesDescription(){
 		List<QueueDescription> queues = new ArrayList<QueueDescription>();
-		for(TaskQueue queue: managementSystem.getAccessQueues()){
+		for(TaskQueue queue: managementSystem.getQueues()){
 			QueueDescription qd;
 			try {
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/estimation/ExecutionTimeEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/estimation/ExecutionTimeEstimationPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/estimation/ExecutionTimeEstimationPlugin.java	(revision 539)
@@ -1,8 +1,8 @@
 package schedframe.scheduling.plugin.estimation;
 
-import gssim.schedframe.scheduling.ExecTask;
 
-import java.util.List;
 import java.util.Map;
+
+import dcworms.schedframe.scheduling.ExecTask;
 
 import schedframe.Plugin;
@@ -32,6 +32,5 @@
 	 * @return estimated execution time of a task of specified length
 	 */
-	public double execTimeEstimation(SchedulingEvent event, Map<ResourceUnitName, ResourceUnit> allocatedResources, 
-									ExecTask task, 
+	public double execTimeEstimation(SchedulingEvent event, ExecTask task, Map<ResourceUnitName, ResourceUnit> allocatedResources, 
 									double completionPercentage);
 	
Index: DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/SchedulingPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/SchedulingPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/schedframe/scheduling/plugin/SchedulingPlugin.java	(revision 539)
@@ -3,5 +3,6 @@
 import schedframe.Plugin;
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.scheduling.WorkloadUnitListImpl;
+import schedframe.scheduling.TaskList;
+import schedframe.scheduling.TaskListImpl;
 import schedframe.scheduling.manager.resources.ResourceManager;
 import schedframe.scheduling.manager.tasks.JobRegistry;
@@ -12,5 +13,5 @@
 public interface SchedulingPlugin extends Plugin{
 
-	public int placeJobsInQueues(WorkloadUnitListImpl newJobs,
+	public int placeTasksInQueues(TaskList newTasks,
 			TaskQueueList queues, 
 			ResourceManager resourceManager, ModuleList modules);
