Update WorkflowFactoryImpl.java

Fixes '#5292'