Make WorkflowFactory more flexible. Distinguish between configuration key and environment