I have made an approval workflow containing state machine. It has grown too big because of all the conditions and checks I had to do.
Could you please suggest me how to optimize the workflow?
You can find lot of good information on the community. One of them is the Defensive workflow deisgn series:
Defensive Workflow Design Part 3 - Separation of Concerns by Aaron Labiosa
Hope it helps.
You can break down some of the states into separate workflows. So for example in one state, say you have 20 actions. Make that a workflow and call that workflow from that state.
Retrieving data ...