Found a way to do this using an ExecutionListener attached to the Start event.
public class WorkflowVariableInjectorListener implements ExecutionListener {
private static final long serialVersionUID = 1L;
static Logger logger = Logger.getLogger(WorkflowVariableInjectorListener.class);
@Override
public void notify(DelegateExecution execution) throws Exception {
logger.info("In notify");
if (execution instanceof ExecutionEntity) {
ExecutionEntity executionEntity = (ExecutionEntity) execution;
ExecutionEntity parentEntity = executionEntity.getSuperExecution();
if (parentEntity != null) {
// Copy all the variables into me
executionEntity.setVariables(parentEntity.getVariables());
}
}
}
}