resourceTable = (LittleJILResourceTable) resourceTableSubscription.first(); assert(resourceTable != null);  /*
    public void execute() {        // if there isn't a steps table in the blackboard yet, create one. otherwise, we will        // use the one that is there.        if (stepsTableSubscription.size() == 0) {            stepsTable = new LittleJILStepsTable();            blackboard.publishAdd(stepsTable);        } else {            stepsTable = (LittleJILStepsTable) stepsTableSubscription.first();        }        resourceTable = (LittleJILResourceTable) resourceTableSubscription.first();        assert(resourceTable != null);        /*// TODO: temporary        if (resourceTableSubscription.size() == 0) {            resourceTable = new LittleJILResourceTable();            blackboard.publishAdd(resourceTable);        } else {            resourceTable = (LittleJILResourceTable) resourceTableSubscription.first();        }*/        // process any diagrams found        for (Enumeration e = diagramSubscription.getAddedList(); e.hasMoreElements();) {            Diagram diagram = (Diagram) e.nextElement();            logger.info("found diagram in blackboard: " + diagram.getName());            logger.debug("creating tasks...");            // make a "Root" task under which the diagram's root task will go.            // the reason to do this is that if the diagram's root task has a restart handler,            // we need to be able to add the restart handler task *before* the diagram's root task,            // and for that we need the diagram's root task to belong to a Cougaar Workflow            NewTask rootTask = factory.newTask();            rootTask.setVerb(new Verb("ROOT"));            if (diagram.getRootStep() == null) {                logger.warn("Diagram has no root step!");                continue;            }            NewTask task = (NewTask) makeTask(diagram.getRootStep());            NewWorkflow workflow = factory.newWorkflow();            workflow.setParentTask(rootTask);            workflow.addTask(task);            task.setParentTask(rootTask);            task.setWorkflow(workflow);            blackboard.publishAdd(rootTask);            blackboard.publishAdd(factory.createExpansion(rootTask.getPlan(), rootTask, workflow, null));            PluginUtil.Timing.addTimestamp("publish rootTask");        }        // process any HandlerBindings that may have been posted by the ExceptionHandlerPlugin        // for each one, we need to create the task for that handler (if any) and post it        // so it executes before its source task        for (Enumeration e = postHandlerRequestSubscription.getAddedList(); e.hasMoreElements();) {            PostHandlerTaskRequest request = (PostHandlerTaskRequest) e.nextElement();            HandlerBinding binding = request.getHandlerBinding();            Task task = request.getTask();            if (binding.getTarget() != null && binding.getTarget() instanceof Step) {                logger.debug("found handler binding in blackboard for task: " + task.getVerb());                NewTask handlerTask = (NewTask) makeTask((Step)binding.getTarget());                // insert it into the task's workflow (ie, at the same level as the given task)                NewWorkflow parentWorkflow = (NewWorkflow) task.getWorkflow();                parentWorkflow.addTask(handlerTask);                handlerTask.setWorkflow(parentWorkflow);                handlerTask.setParentTask(parentWorkflow.getParentTask());                NewConstraint constraint = factory.newConstraint();                /*if (binding.getControlFlow() == HandlerBinding.RETHROW) {                    constraint.setConstrainingTask(task);                    constraint.setConstrainedTask(handlerTask);                }                else {*/                    constraint.setConstrainingTask(handlerTask);                    constraint.setConstrainedTask(task);                //}                constraint.setConstrainingAspect(AspectType.END_TIME);                constraint.setConstrainedAspect(AspectType.START_TIME);                constraint.setConstraintOrder(Constraint.BEFORE);                parentWorkflow.addConstraint(constraint);            }        }        for (Enumeration e = exceptionHandlerRequestSubscription.getAddedList(); e.hasMoreElements();) {            ExceptionHandlerRequest request = (ExceptionHandlerRequest) e.nextElement();            makeTask(request.getStep(), request, true);        }        for (Enumeration e = makeTaskRequestSubscription.getAddedList(); e.hasMoreElements();) {            MakeTaskRequest request = (MakeTaskRequest) e.nextElement();            NewTask subtask = (NewTask) makeTask(request.getStep());            NewWorkflow workflow = factory.newWorkflow();            Task parentTask = request.getParentTask();            workflow.setParentTask(parentTask);            workflow.addTask(subtask);            subtask.setParentTask(parentTask);            subtask.setWorkflow(workflow);            blackboard.publishAdd(factory.createExpansion(parentTask.getPlan(), parentTask, workflow, null));            blackboard.publishAdd(parentTask);            logger.debug("published new workflow for a MakeTaskRequest");        }    }