Sorry, I should have realised. However I wouldn’t pick a fibonacci function as an example in order to learn flow. It’s important to realise that flows has it’s strengths and weaknesses and is suitable for certain patterns and not others.
Flow is great for orchestrating and chaining tasks together, mapping and simple decision making are great in flow. Recursive, complex algorithms, Deep loops and low level data processing (bytes, arrays etc) are not.
So I would say use use flow for top-level service, mapping etc. but don’t be afraid to use java services for code where flow starts to get in the way rather than accelerate development.
As a caveat complex java services are a no no too. Write proper java classes, package as a jar and then use the java service as a simple entry point into your java library. Advantage is that it is easy to debug java classes, but not java service,
regards
John.