*/
public abstract void describeService(IRequestCycle cycle, String flowType) throws IOException;
// TODO look at eliminating passing of cycle so that calls will be less tapestry specific.
protected FlowState getFlowState(String flowType, String flowId, String renderResult, Map<String, String> initial, Writer writer, boolean currentFlow) throws IOException {
FlowState flowState = null;
if ( isNotBlank(flowId)) {
flowState = getFlowManagement().getFlowState(flowId);
}
if ( flowState == null && isNotBlank(flowType)) {
if(!getFlowManager().isFlowDefined(flowType)) {
renderError(writer, flowType+": no such flow type", renderResult, null, new PageNotFoundException(flowType));
return null;
}
if (USE_CURRENT.equals(flowId)) {
flowState = getFlowManagement().getFirstFlowStateByType(flowType);
}
if (flowState==null) {
String returnToFlowLookupKey = null;
flowState = getFlowManagement().startFlowState(flowType, currentFlow, initial, returnToFlowLookupKey );
if ( flowState == null || flowState.getFlowStateLifecycle() == FlowStateLifecycle.failed) {
renderError(writer, flowType+": could not start flow type", renderResult, flowState, null);
return null;
}
}
} else {