/** * Map the output data produced by the subflow back into the request context (typically flow scope). */ private void mapSubflowOutput(AttributeMap subflowOutput, RequestContext context) { if (getAttributeMapper() != null) { if (logger.isDebugEnabled()) { logger .debug("Messaging the configured attribute mapper to map subflow result attributes to the " + "resuming parent flow -- It will have access to attributes passed up by the completed subflow"); } attributeMapper.mapFlowOutput(subflowOutput, context); } else { if (logger.isDebugEnabled()) { logger .debug("No attribute mapper is configured for the resuming subflow state '" + getId() + "' -- As a result, no attributes of the ending flow will be passed to the resuming parent flow"); } } }
/** * Create the input data map for the spawned subflow session. The returned map will be passed to * {@link Flow#start(RequestControlContext, MutableAttributeMap)}. */ protected MutableAttributeMap createSubflowInput(RequestContext context) { if (getAttributeMapper() != null) { if (logger.isDebugEnabled()) { logger.debug("Messaging the configured attribute mapper to map attributes " + "down to the spawned subflow for access within the subflow"); } return getAttributeMapper().createFlowInput(context); } else { if (logger.isDebugEnabled()) { logger.debug("No attribute mapper configured for this subflow state '" + getId() + "' -- As a result, no attributes will be passed to the spawned subflow '" + subflow.getId() + "'"); } return null; } }
subflowState.setAttributeMapper(subflowMapper); LOGGER.trace("Creating transitions to subflow state [{}]", subflowState.getId()); val transitionSet = subflowState.getTransitionSet(); transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, targetSuccessId));