There's a common notion about using Java when dealing with "complex algorithm" or "performance bottlenecks". I think the definition of complex and slow is highly dependant on the developer (with a small 'd'). There's so many things easily accomplished with Flow, but not obvious to beginners, that a lot of people feel that it's "complex". As for performance, when you're not using built-in facilities effectively, Flow
can be slow. As example:
- Extracting data from XML with qualifiers (like IDOC or EDI), or other complex extractions. Slice through the XML with queryXMLNode.
- "deep" copy of documents/records. A lot of times "implicit looping" takes care of it.
- Lengthy string manipulations. pub.string:replace with RegEx makes mincemeat of strings.
- Code conversions with complex patterns. pub.string:lookupTable with, again, RegEx!
- Catching exceptions with custom Java wrapper (seen quite frequently). Use Try-Catch blocks.
- File I/O. A big can of worms actually, but seems to be a security blanket for a lot of people. Can substitute with FTP'ing to localhost. There's so many pit holes with file I/O and FTP that it deserves a separate post.
- Generating HTML/XML reports. pub.report has decent facilities.
Given the problems I've seen from the above list (and a lot more), I'm really skeptical when I see our developers (or others) writing Java codes during implementation. Performance problems is solved most often by effecient coding (in Flow), not writing Java.
OTOH, I make extensive use of two packages (written mainly in Java) provided by wM -- PSUtilities and OpenSSH. I just don't want to write my own!

I think I'm averaging one Java service per 3 projects.