Subdialogs and blocks
Posted: Wed May 30, 2007 5:29 pm
Perhaps you could help explain something to me since I am very confused.
I have a form which calls two sub-dialogs, one after the other. Both the sub-dialogs have conditions. After each sub-dialog there is a block with some statements and some log lines.
The form concludes by going back to itself, (there are of course, escape routes but I am simply documenting the problem I have).
E.g.
<form id="dictate_mode">
<subdialog name="help" cond="m_userInput == C_HELP_DICTATE" src="help_report.vxml">
<filled>
<!-- The user has decided what to do.. -->
<assign name="m_userInput" expr="help.answer"/>
<log label="Dictate_Mode">Help Input: <value expr="m_userInput"/></log>
</filled>
</subdialog>
<block>
... stuff here...
<log label="Dictate_Mode">I am in the middle block: <value expr="m_userInput"/></log>
</block>
<subdialog name="confirm" cond="m_userInput == C_SAVE_REPORT" src="confirm_report.vxml">
<filled>
... stuff here...
<assign name="m_userInput" expr="C_HELP_DICTATE"/>
</if>
</filled>
</subdialog>
<!-- Have not decided to save yet, go around again.. -->
<block>
... stuff here...
<clear/>
<log label="Dictate_Mode">Go around again: <value expr="m_userInput"/></log>
<goto next="#dictate_mode"/>
</block>
</form>
I have noticed that sometimes, the code in the <block> statements does not execute at all, it is simply bypassed completely. For example, after the second sub-dialog has finished I should clear my form variables and log a line. In the Plum call log I see this:
dtmf input: *
Found grammar match
hypothesis #0: * (1.0000)
VXI::assign_element(name="answer" expr = "confirm"
VXI::assign_element(name="m_userInput" expr = "C_HELP_DICTATE"
VXI::queue_prompts()
DocumentParser::FetchDocument(help_report.vxml)
Notice how Plum is running the "Fetch document help_report.vxml" before it has even reached the end of my form. I should see a log line in there. The disadvantage of this is that I am seeing some very strange behaviour; it's as if the <clear/> isn't being run. Sometimes, the middle block does not execute. I cannot understand why this should be.
I have a form which calls two sub-dialogs, one after the other. Both the sub-dialogs have conditions. After each sub-dialog there is a block with some statements and some log lines.
The form concludes by going back to itself, (there are of course, escape routes but I am simply documenting the problem I have).
E.g.
<form id="dictate_mode">
<subdialog name="help" cond="m_userInput == C_HELP_DICTATE" src="help_report.vxml">
<filled>
<!-- The user has decided what to do.. -->
<assign name="m_userInput" expr="help.answer"/>
<log label="Dictate_Mode">Help Input: <value expr="m_userInput"/></log>
</filled>
</subdialog>
<block>
... stuff here...
<log label="Dictate_Mode">I am in the middle block: <value expr="m_userInput"/></log>
</block>
<subdialog name="confirm" cond="m_userInput == C_SAVE_REPORT" src="confirm_report.vxml">
<filled>
... stuff here...
<assign name="m_userInput" expr="C_HELP_DICTATE"/>
</if>
</filled>
</subdialog>
<!-- Have not decided to save yet, go around again.. -->
<block>
... stuff here...
<clear/>
<log label="Dictate_Mode">Go around again: <value expr="m_userInput"/></log>
<goto next="#dictate_mode"/>
</block>
</form>
I have noticed that sometimes, the code in the <block> statements does not execute at all, it is simply bypassed completely. For example, after the second sub-dialog has finished I should clear my form variables and log a line. In the Plum call log I see this:
dtmf input: *
Found grammar match
hypothesis #0: * (1.0000)
VXI::assign_element(name="answer" expr = "confirm"
VXI::assign_element(name="m_userInput" expr = "C_HELP_DICTATE"
VXI::queue_prompts()
DocumentParser::FetchDocument(help_report.vxml)
Notice how Plum is running the "Fetch document help_report.vxml" before it has even reached the end of my form. I should see a log line in there. The disadvantage of this is that I am seeing some very strange behaviour; it's as if the <clear/> isn't being run. Sometimes, the middle block does not execute. I cannot understand why this should be.