2

Not sure whether this is the right forum to ask this but here goes.

Using this solution - https://stackoverflow.com/questions/26571351/replacing-if-else-logic-with-state-strategy-pattern I was able to refactor my complex IF/ELSE check statements. One would like to nest this without having to use an external rules engine. In other words

  1. If file exists and data does not contain void read in file else download file from alternate URL and read in file
  2. If zipfile exists and data does not contain void read in file else download file from alternate URL and read in file again
  3. If zipfile does not exist download file and check if data does not contain void else download file from alternate URL and read in file again.

How should I proceed forward? Is the best way by checking for another "Condition" within "Action"?

0 Answers0