public function initialize()
    {
        if ($this->initialized) {
            throw new SurfException('Already initialized', 1335976472);
        }
        if ($this->workflow === null) {
            $this->workflow = new SimpleWorkflow();
        }

        foreach ($this->applications as $application) {
            $application->registerTasks($this->workflow, $this);
        }
        foreach ($this->initCallbacks as $callback) {
            $callback();
        }

        $this->initialized = true;
    }