title: Workflow Design pattern combined with Task Pattern?
body: <p>I'm currently working on an enterprise application that's performing a long non-linear tasks. </p>
  
  <p>An abstraction of the workflow: </p>
  
  <ol>
  <li>Gather neccessary information (can take minutes, but not always necessary)</li>
  <li>Process data (always takes very long)</li>
  <li>Notify several worker who post-process the result (in new tasks)</li>
  </ol>
  
  <p>Now, I have created 2 services, that can solve step 1 and 2.
  As the services shouldn't know of each other, I want to have a higher order Component that coordinates the 3 steps of an task. Think of it as an Callable which sends the task to service one, wakes up again when service 1 returnes an result, sends it to service 2, ..., sends final result to all post-processors and ends task. 
  But as it is likely to have 100'000s of queued tasks, I don't want to start 100'000s threads with task-control callables which even if being idle like 99.9% of the time still would be an massive overhead. </p>
  
  <p>So got anybody an idea of controling this producer consumer queue-like pattern encapsulated in a task-object or somebody knows of an framework simplifying my concern?</p>