Index: DCWoRMS/trunk/build/classes/example/localplugin/BaseLocalSchedulingPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/BaseLocalSchedulingPlugin.java	(revision 539)
+++ DCWoRMS/trunk/build/classes/example/localplugin/BaseLocalSchedulingPlugin.java	(revision 539)
@@ -0,0 +1,118 @@
+package example.localplugin;
+
+import java.util.Map;
+
+import schedframe.Parameters;
+import schedframe.PluginConfiguration;
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.events.scheduling.SchedulingEventType;
+import schedframe.events.scheduling.SchedulingResponseType;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.scheduling.TaskList;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistryImpl;
+import schedframe.scheduling.plan.impl.Allocation;
+import schedframe.scheduling.plan.impl.ScheduledTask;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.SchedulingPluginConfiguration;
+import schedframe.scheduling.plugin.grid.ModuleList;
+import schedframe.scheduling.plugin.local.LocalSchedulingPlugin;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import schemas.StringValueWithUnit;
+
+public abstract class BaseLocalSchedulingPlugin implements LocalSchedulingPlugin {
+
+	SchedulingPluginConfiguration plugConf;
+	
+	public PluginConfiguration getConfiguration() {
+		return plugConf;
+	}
+	
+	public SchedulingResponseType handleResourceAllocationViolation(SchedulingEvent event,
+			TaskQueueList queues, 
+			JobRegistryImpl jobRegistry, 
+					ResourceManager resourceManager, ModuleList modules){
+		SchedulingResponseType responeEvent = null;
+		switch(event.getType()){
+			case TASK_REQUESTED_TIME_EXPIRED: 
+				responeEvent = SchedulingResponseType.KILL_TASK;
+				break;
+		}
+		return responeEvent;
+	}
+	
+	public int placeTasksInQueues(TaskList newTasks,
+			TaskQueueList queues, 
+			ResourceManager resourceManager, ModuleList moduleList) {
+		
+		// get the first queue from all available queues.
+		TaskQueue queue = queues.get(0);
+
+		for(int i = 0; i < newTasks.size(); i++){
+			TaskInterface<?> task = newTasks.get(i);
+			queue.add(task);
+		}
+		
+		return 0;
+	}
+	
+	public void addToSchedulingPlan(SchedulingPlan plan, TaskInterface<?> task, Map<ResourceUnitName, ResourceUnit> choosenResources ){
+		
+		Allocation allocation = new Allocation();
+		allocation.setProcessesCount(1);
+		allocation.setSpecificResources(choosenResources);
+		
+		ScheduledTask scheduledTask = new ScheduledTask(task);
+		scheduledTask.setTaskId(task.getId());
+		scheduledTask.setJobId(task.getJobId());
+		scheduledTask.addAllocation(allocation);		
+		
+		plan.addTask(scheduledTask);
+	}
+	
+	public void addToSchedulingPlan(SchedulingPlan plan, TaskInterface<?> task, String providerName){
+		
+		Allocation allocation = new Allocation();
+		allocation.setProcessesCount(1);
+		allocation.setProviderName(providerName);
+		
+		ScheduledTask scheduledTask = new ScheduledTask(task);
+		scheduledTask.setTaskId(task.getId());
+		scheduledTask.setJobId(task.getJobId());
+		scheduledTask.addAllocation(allocation);		
+		
+		plan.addTask(scheduledTask);
+	}
+	
+	public void addToSchedulingPlan(SchedulingPlan plan, TaskInterface<?> task){
+		
+		Allocation allocation = new Allocation();
+		allocation.setProcessesCount(1);
+		allocation.setProviderName(null);
+		
+		ScheduledTask scheduledTask = new ScheduledTask(task);
+		scheduledTask.setTaskId(task.getId());
+		scheduledTask.setJobId(task.getJobId());
+		scheduledTask.addAllocation(allocation);		
+		
+		plan.addTask(scheduledTask);
+	}
+
+	public void init(Parameters parameters) {
+		plugConf = new SchedulingPluginConfiguration();
+		try{
+			StringValueWithUnit freq = parameters.get("frequency").get(0);
+			plugConf.addServedEvent(SchedulingEventType.TIMER, Double.valueOf(freq.getContent()).intValue());
+		} catch(Exception e){
+			
+		}
+	}
+
+	public String getName() {
+		return getClass().getName();
+	}
+
+}
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSRackLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSRackLocalPlugin.java	(revision 539)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSRackLocalPlugin.java	(revision 539)
@@ -0,0 +1,56 @@
+package example.localplugin;
+
+import gridsim.dcworms.DCWormsTags;
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.grid.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import schedframe.scheduling.tasks.WorkloadUnit;
+
+public class FCFSRackLocalPlugin  extends BaseLocalSchedulingPlugin {
+
+	public FCFSRackLocalPlugin() {
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		SchedulingPlan plan = new SchedulingPlan();
+		// chose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+		//case TIMER:
+			// our tasks are placed only in first queue (see
+			// BaseLocalPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				WorkloadUnit job = q.get(i);
+				TaskInterface<?> task = (TaskInterface<?>) job;
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					System.out.println(resourceManager.getSchedulers().get(0).get_name());
+					String nodeName = resourceManager.getSchedulers().get(0).get_name();
+					if (nodeName != null) {
+						addToSchedulingPlan(plan, task, nodeName);
+					}
+				}
+			}
+
+			break;
+		}
+		return plan;
+	}
+
+
+}
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSRandomClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSRandomClusterLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSRandomClusterLocalPlugin.java	(revision 539)
@@ -1,5 +1,5 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.List;
@@ -19,5 +19,5 @@
 import schedframe.scheduling.tasks.WorkloadUnit;
 
-public class FCFSRandomClusterLocalPlugin extends BaseLocalPlugin {
+public class FCFSRandomClusterLocalPlugin extends BaseLocalSchedulingPlugin {
 
 	private Random rand;
@@ -41,19 +41,16 @@
 			// BaseLocalPlugin.placeJobsInQueues() method)
 			TaskQueue q = queues.get(0);
+			
 			// check all tasks in queue
-
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
-					/*for(ResourceUnitName key:resManager.getSharedResourceUnits().keySet()){
-						System.out.println(key.getName());
-					}*/
-					addToSchedulingPlan(plan, task);
-					/*String nodeName = chooseRandomProvider(resourceManager);
+				if (task.getStatus() == DCWormsTags.READY) {
+
+					String nodeName = chooseRandomProvider(resourceManager);
 					if (nodeName != null) {
 						addToSchedulingPlan(plan, task, nodeName);
-					}*/
+					}
 				}
 			}
@@ -68,9 +65,4 @@
 		return nodes.get(nodeIdx).getName();
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
 
 }
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSClusterLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSClusterLocalPlugin.java	(revision 539)
@@ -1,5 +1,5 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -31,5 +31,5 @@
 import schedframe.scheduling.tasks.WorkloadUnit;
 
-public class FCFSClusterLocalPlugin extends BaseLocalPlugin {
+public class FCFSClusterLocalPlugin extends BaseLocalSchedulingPlugin {
 
 	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
@@ -49,13 +49,13 @@
 
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 					
 					/****************3 ways to schedule task****************/
 					
 					/****************1. Choosing particular resources to perform execution****************/
-					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution2(resourceManager, task);
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
 					if (choosenResources != null) {
 						addToSchedulingPlan(plan, task, choosenResources);
@@ -80,72 +80,4 @@
 
 	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
-			ClusterResourceManager resourceManager, TaskInterface<?> task) {
-
-		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
-
-		int cpuRequest;
-		try {
-			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			cpuRequest = 1;
-		}
-
-		if (cpuRequest != 0) {
-			List<ComputingResource> choosenResources = null;
-			List<Processor> processors = null;
-			processors = resourceManager.getProcessors();
-			if (processors.size() < cpuRequest) {
-				// log.warn("Task requires more cpus than is availiable in this resource.");
-				return null;
-			}
-
-			choosenResources = new ArrayList<ComputingResource>();
-
-			for (int i = 0; i < processors.size() && cpuRequest > 0; i++) {
-				if (processors.get(i).getStatus() == ResourceStatus.FREE) {
-					choosenResources.add(processors.get(i));
-					cpuRequest--;
-				}
-			}
-			if (cpuRequest > 0) {
-				// log.info("Task " + task.getJobId() + "_" + task.getId() +
-				// " requires more cpus than is availiable in this moment.");
-				return null;
-			}
-
-			ProcessingElements result = new ProcessingElements(processors.get(0).getParent().getName());
-			result.addAll(choosenResources);
-			map.put(StandardResourceUnitName.PE, result);
-
-		}
-		int memoryRequest;
-		try {
-			memoryRequest = Double.valueOf(task.getMemoryRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			memoryRequest = 0;
-		}
-		if (memoryRequest != 0) {
-			List<ComputingNode> nodes = resourceManager.getComputingNodes();
-
-			Memory memory = null;
-			for (ComputingNode node : nodes) {
-				try{
-					if (node.getFreeMemory() >= memoryRequest) {		
-						memory = new Memory(node.getMemory(), memoryRequest, memoryRequest);
-					}		
-				} catch(NoSuchFieldException e){
-					memory = null;
-				}
-			}
-			if(memory != null)
-				map.put(StandardResourceUnitName.MEMORY, memory);
-			else return null;
-		}
-
-		return map;
-	}
-
-
-	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution2(
 			ClusterResourceManager resourceManager, TaskInterface<?> task) {
 
@@ -178,5 +110,5 @@
 				}
 
-				ProcessingElements result = new ProcessingElements(processors.get(0).getParent().getName());
+				ProcessingElements result = new ProcessingElements();
 				result.addAll(choosenResources);
 				map.put(StandardResourceUnitName.PE, result);
@@ -204,5 +136,5 @@
 						return map;
 					}
-				}
+				} else return map;
 			}
 		}
@@ -221,7 +153,3 @@
 	}
 
-	public String getName() {
-		return getClass().getName();
-	}
-
 }
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFS_BFLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFS_BFLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFS_BFLocalPlugin.java	(revision 539)
@@ -1,9 +1,8 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 import schedframe.events.scheduling.SchedulingEvent;
 import schedframe.scheduling.manager.resources.ResourceManager;
 import schedframe.scheduling.manager.tasks.JobRegistry;
-import schedframe.scheduling.plan.SchedulingPlanInterface;
 import schedframe.scheduling.plan.impl.SchedulingPlan;
 import schedframe.scheduling.plugin.grid.ModuleList;
@@ -13,26 +12,25 @@
 import schedframe.scheduling.tasks.WorkloadUnit;
 
-public class FCFS_BFLocalPlugin extends BaseLocalPlugin {
+public class FCFS_BFLocalPlugin extends BaseLocalSchedulingPlugin {
 
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+	public SchedulingPlan schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
 			 ResourceManager resManager, ModuleList modules) {
 
 		SchedulingPlan plan = new SchedulingPlan();
-		// chose the events types to serve.
-		// Different actions for different events are possible.
+		// Chose the events types to serve. Different actions for different events are possible.
 		switch (event.getType()) {
 		case START_TASK_EXECUTION:
 		case TASK_FINISHED:
-		//case TIMER:
+			
 			// our tasks are placed only in first queue (see BaseLocalPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
 			
-			TaskQueue q = queues.get(0);
 			// check all tasks in queue
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 					addToSchedulingPlan(plan, task);
 				}
@@ -43,9 +41,4 @@
 	}
 
-	public String getName() {
-		return getClass().getName();
-	}
-
-
 }
 
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java	(revision 539)
@@ -1,5 +1,5 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -30,29 +30,25 @@
 import schedframe.scheduling.tasks.WorkloadUnit;
 
-public class FCFSNodePowerManagementClusterLocalPlugin extends BaseLocalPlugin {
+public class FCFSNodePowerManagementClusterLocalPlugin extends BaseLocalSchedulingPlugin {
 
 	public FCFSNodePowerManagementClusterLocalPlugin () {
 	}
 
-	public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
 			ResourceManager resManager, ModuleList modules) {
 
 		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
 		SchedulingPlan plan = new SchedulingPlan();
-		// chose the events types to serve.
-		// Different actions for different events are possible.
+
 		switch (event.getType()) {
 		case START_TASK_EXECUTION:
 		case TASK_FINISHED:
-			// our tasks are placed only in first queue (see
-			// BaseLocalPlugin.placeJobsInQueues() method)
+
 			TaskQueue q = queues.get(0);
-			// check all tasks in queue
 
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
-				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 
 					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
@@ -65,7 +61,5 @@
 				}
 			}
-
 			turnOffIdleNodes(resourceManager.getComputingNodes());
-
 			break;
 		}
@@ -151,9 +145,4 @@
 		return cpuRequest > 0 ? false : true;
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
 
 }
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSConsolidationClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSConsolidationClusterLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSConsolidationClusterLocalPlugin.java	(revision 539)
@@ -1,5 +1,5 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -30,10 +30,10 @@
 import schedframe.scheduling.tasks.WorkloadUnit;
 
-public class FCFSConsolidationClusterLocalPlugin extends BaseLocalPlugin {
+public class FCFSConsolidationClusterLocalPlugin extends BaseLocalSchedulingPlugin {
 
 	public FCFSConsolidationClusterLocalPlugin () {
 	}
 
-	public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
 			ResourceManager resManager, ModuleList modules) {
 
@@ -51,8 +51,8 @@
 
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 
 					Map<ResourceUnitName, ResourceUnit> choosenResources = null;
@@ -140,8 +140,4 @@
 		return suitableNodes;
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
 
 }
Index: DCWoRMS/trunk/build/classes/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/build/classes/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java	(revision 477)
+++ DCWoRMS/trunk/build/classes/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java	(revision 539)
@@ -1,5 +1,5 @@
 package example.localplugin;
 
-import gridsim.Gridlet;
+import gridsim.dcworms.DCWormsTags;
 
 import java.util.ArrayList;
@@ -18,6 +18,5 @@
 import schedframe.resources.units.ResourceUnitName;
 import schedframe.resources.units.StandardResourceUnitName;
-import schedframe.scheduling.ResourceHistoryItem;
-import schedframe.scheduling.UsedResourceList;
+import schedframe.scheduling.UsedResourcesList;
 import schedframe.scheduling.manager.resources.ClusterResourceManager;
 import schedframe.scheduling.manager.resources.ResourceManager;
@@ -28,9 +27,9 @@
 import schedframe.scheduling.queue.TaskQueue;
 import schedframe.scheduling.queue.TaskQueueList;
-import schedframe.scheduling.tasks.SubmittedTask;
 import schedframe.scheduling.tasks.TaskInterface;
 import schedframe.scheduling.tasks.WorkloadUnit;
+import dcworms.schedframe.scheduling.Executable;
 
-public class FCFSCPUFreqScalingClusterLocalPlugin extends BaseLocalPlugin {
+public class FCFSCPUFreqScalingClusterLocalPlugin extends BaseLocalSchedulingPlugin {
 
 	List<Processor> allocatedCPUs;
@@ -39,5 +38,5 @@
 	}
 
-	public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
 			ResourceManager resManager, ModuleList modules) {
 
@@ -55,8 +54,8 @@
 			// check all tasks in queue
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 
 					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
@@ -76,6 +75,6 @@
 		case TASK_FINISHED:
 			TaskFinishedEvent finEvent = (TaskFinishedEvent) event;
-			SubmittedTask subTask = (SubmittedTask )jobRegistry.getSubmittedTask(finEvent.getJobId(), finEvent.getTaskId());
-			UsedResourceList<ResourceHistoryItem> usedResourcesList = subTask.getUsedResources();
+			Executable exec = (Executable) jobRegistry.getExecutable(finEvent.getJobId(), finEvent.getTaskId());
+			UsedResourcesList usedResourcesList = exec.getUsedResources();
 			ProcessingElements pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE);
 			List<Processor> processors =  new ArrayList<Processor>();
@@ -89,6 +88,6 @@
 		case TASK_REQUESTED_TIME_EXPIRED:
 			TaskRequestedTimeExpiredEvent timExpEvent = (TaskRequestedTimeExpiredEvent) event;
-			 subTask = (SubmittedTask )jobRegistry.getSubmittedTask(timExpEvent.getJobId(), timExpEvent.getTaskId());
-			usedResourcesList = subTask.getUsedResources();
+			exec = (Executable) jobRegistry.getExecutable(timExpEvent.getJobId(), timExpEvent.getTaskId());
+			usedResourcesList = exec.getUsedResources();
 			pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE);
 			processors =  new ArrayList<Processor>();
@@ -98,8 +97,8 @@
 			// check all tasks in queue
 			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit<?> job = q.get(i);
+				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
 				// if status of the tasks in READY
-				if (task.getStatus() == Gridlet.READY) {
+				if (task.getStatus() == DCWormsTags.READY) {
 
 					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
@@ -188,8 +187,4 @@
 		}
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
 
 }
