Coldfusion 无法获取要在vxml中运行的if语句

Coldfusion 无法获取要在vxml中运行的if语句,coldfusion,vxml,Coldfusion,Vxml,我试图为noinput和nomatch动态调用一个include文件,但是我无法得到下面的if语句将不会运行,有什么想法吗 这是在每个页面顶部的cfmodule标签中,这样我就可以捕获错误、noinputs、nomatch和挂断 <cfif thistag.executionmode is "start"> <!--- header content goes here ---> <cfheader name="Content-Typ

我试图为noinput和nomatch动态调用一个include文件,但是我无法得到下面的if语句将不会运行,有什么想法吗

这是在每个页面顶部的cfmodule标签中,这样我就可以捕获错误、noinputs、nomatch和挂断

<cfif thistag.executionmode is "start">

        <!--- header content goes here --->
        <cfheader name="Content-Type" value="text/xml">
        <cfheader name="Cache-Control" value= "no-cache">
        <cfheader name="Expires" value="#Now()#"><?xml version="1.0" encoding="UTF-8"?>
        <vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">

        <meta name="maintainer" content="#application.maintainer#"/>

        <var name="calledid" expr="session.calledid"/>
        <var name="callerid" expr="session.callerid"/>
        <var name="ivrsessionid" expr="session.sessionid"/>
        <var name="action"/>
        <var name="notes"/>
        <var name="flag"/>
        <var name="recording"/>
        <var name="subdialogid"/>
        <var name="MyEvent"/>
        <var name="currentField"/>

        <property name="universals" value="help"/>

        <cfoutput>
            <property name="sensitivity" value="#session.sensitivity#"/>
            <property name="confidencelevel" value="#session.confidenceLevel#"/>
        </cfoutput>

        <!---This prefetches the audio to optimize performance--->
        <property name="audiofetchhint" value="prefetch"/>

        <!---This logs if the caller hangs up.--->
        <cfoutput>
            <catch event="noinput nomatch error connection.disconnect.hangup">

                <assign name="myPage" expr="'#cgi.PATH_INFO#'" />
                <assign name="MyEvent" expr="_event"/>
                <assign name="action" expr="_event"/>
                <assign name="notes" expr="'Page: #cgi.PATH_INFO# - Field: ' + currentField"/>
                <data name="MyDataName" src="#attributes.historyPath#" namelist="calledid callerid ivrsessionid action notes MyEvent currentField" method="post"/>

            </catch>

            <!---I cannot get the if statement to run--->
            <if cond="'1 == 1'">
                <cfinclude template="../inc/cctypequestionnoinput.inc" />
            <elseif cond="MyEvent == 'nomatch'"/>
                <cfinclude template="../inc/cctypequestionnomatch.inc" />
            <else/>
            </if>
        </cfoutput>



    <cfelse>

         <!--- footer content goes here --->
        </vxml>

    </cfif>


您看过输出了吗?是否生成有效的可执行代码?如果将相同的代码放入静态文件中,它会执行吗?如果将其转储,thistag.executionmode的值是多少?我的猜测是,这不是您所认为的“我正在尝试为noinput和nomatch动态调用一个include文件”-您实际做的是始终包含这两个文件,然后使用字符串
'1==1'
作为布尔值,它的计算结果可能为false,因此它会进入最后一节(它什么也不做).同意@PeterBoughton。删除cond语句周围的单引号,它就会运行。