public Mapper createFlowInputMapper(final List<? extends Mapping> mappings, final Flow flow) {
        val flowInputMapper = flow.getInputMapper() == null ? new DefaultMapper() : (DefaultMapper) flow.getInputMapper();
        mappings
            .stream()
            .map(DefaultMapping.class::cast)
            .map(CasDefaultMapping::new)
            .forEach(flowInputMapper::addMapping);
        flow.setInputMapper(flowInputMapper);
        return flowInputMapper;
    }
Create mapper to subflow state.

@param mappings the mappings
@param flow     the flow
@return the mapper
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java