We have a service that processes requests, it receives. Workflow for processing each request contains many steps, branches depending on some conditions(intermediate variable etc, result from some service call). Basically whole workflow can be written as a big flowchart.
Currently, my implementation contains lots of big If-else
blocks. In each block, there are again many if-else
sub blocks and so on. This code is very hard to manage and develop on. For instance if some new step/branches gets added in flow chart, Making corresponding code changes and testing those changes very painful.
Do there exist some libraries, that can be used in such situation? I have heard of Amazon Simple Work Flow
, but can that be used here?