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
- If file exists and data does not contain void read in file else download file from alternate URL and read in file
- If zipfile exists and data does not contain void read in file else download file from alternate URL and read in file again
- 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"?