Event event=new Event(job, LifecycleStateEnum.instantiated, null);
Event event=new Event(job, LifecycleStateEnum.instantiated, LifecycleStateEnum.undefined, null);
    public Application createNewJob(String hostname) {        Application job = new Application(Utils.createNewID(),engine);        job.setHostname(hostname);        String id = job.getId();        job.setName(id);        job.setAddress(createJobAddress(id));        add(job);        //and register the event        Event event=new Event(job, LifecycleStateEnum.instantiated, null);        subscriptions.event(event);        return job;    }