title: Which design pattern to use on Java workflow
body: <p>I want to implement code for executing a workflow, but I'd like to avoid chains of if-else statements.
  Which design pattern should I use? I looked at some of them, but couldn't find an appropriate one</p>
  
  <p>Example of workflow.</p>
  
  <pre><code>A-&gt; if(B) do C,
  if(!B) do D-&gt; E -&gt; if(F) do G,
  if(!H) do I-&gt; J-&gt; K
  and so on..
  </code></pre>