sclass FormInFlight { Conversation conversation; S hashTag; new L steps; int stepIndex; // in steps list S handleInput(S s) { null; } FormStep currentStep() { ret get(steps, stepIndex); } void update(Runnable onChange) { if (currentStep() != null) currentStep().update(onChange); } S complete() { ret "Form complete"; } S cancel() { ret "Request cancelled"; } FormStep byKey(S key) { ret objectWhere(steps, +key); } S getValue(S key) { FormStep step = byKey(key); ret step?.value; } SS allValues() { SS map = litorderedmap(); for (FormStep step : steps) map.put(step.key, step.value); ret map; } bool allowGeneralOverride() { false; } Conversation cancelMe() { Conversation conv = conversation; print("cancelMe called"); // TODO: conversation.cancelForm(); ret conv; } void change { if (conversation != null) conversation.change(); } } abstract concept BotShowForm > BotStep { abstract FormInFlight makeForm(); bool run(Conversation conv) { Form form = makeForm(); true; }