issue #21986: generalize inheritWorkflow