   def handle_call({:execute, url, bmf}, from, state = %__MODULE__{processes: processes}) do
     ref = make_ref()
     EventCenter.sync_notify({:worker, :execute, {:start, url}})
-    exec_pid = Task.start_link(fn ->
-      {out, rc} = execute_bmf(url, bmf)
+    {state, workspace} = workspace_path(state)
+    {:ok, exec_pid} = Task.start_link(fn ->
+      EventCenter.sync_notify({:worker_job, :spawned, self})
+      {out, rc} = execute_bmf(url, bmf, workspace)
       case rc do
         0 -> EventCenter.sync_notify({:worker, :execute, {:ok, url}})
         _ -> EventCenter.sync_notify({:worker, :execute, {:error, url}})

    :ok = Coordinator.register(self)
    :ok = Coordinator.update_capabilities(self, detect_capabilities())
    ref = Process.monitor(GenServer.whereis(Coordinator.name))
    state = %__MODULE__{coordinator: coordinator, coordinator_ref: ref}
    {:ok, state}
  end


  @type t :: %__MODULE__{
    coordinator: nil | pid,
    coordinator_ref: nil | reference,
    processes: %{pid => String.t},
    job_counter: pos_integer,
    workspace_base: String.t
  }
  defstruct coordinator: nil, coordinator_ref: nil,
    processes: %{}, job_counter: 0, workspace_base: ""

  use GenServer
  require Logger
