123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2009
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio,canUseScheduling">
- <!--
- ===============================================================================================
- processRequestParams - Default any params that weren't passed in. Also this is where we would
- do validation (when time permits).
- ===============================================================================================
- -->
- <xts:block id="processRequestParams" processor="XSLT" type="exec" nodeList="/root/*[local-name()='requestParams']">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/*[local-name()='requestParams']">
- <xts:transform src="portal/controls/gen_default_parameters.xslt" processor="XSLT">
- <root>
- <xts:transform name="XML">
- <xts:param name="systemId">ags/setSchedule_API.xml</xts:param>
- </xts:transform>
- <xsl:copy-of select="/root/*[local-name()='requestParams']"/>
- </root>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- decodeMRPParameters - Decode the m_rp_parameters and append it to the dom.
- ===============================================================================================
- -->
- <xts:block id="decodeMRPParameters" type="exec" dependency="processRequestParams" processor="XSLT" condition=".[/root/env/param[@name='m_rp_parameters'] and /root/env/param[@name='m_rp_parameters']!='' and (/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'next' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'back' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'canceled')]" mandatory="false">
- <xts:logicsheet path="portal/iFrmCmd/logicsheets/cm-save.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <!-- and now the stylesheet -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl SOAP-ENC xsi cms cm form bus xtsext pf">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- Remove any existing ones -->
- <xts:delete select="/root/parameters"/>
- <xsl:if test="key('env-param','m_rp_parameters')">
- <xts:append select="/root">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(string(key('env-param','m_rp_parameters')), true())"/>
- </xts:transform>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- returnResult - We're done with the email options morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult" type="exec" dependency="decodeMRPParameters" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'next' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'back' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'canceled']" mandatory="false">
- <xts:logicsheet path="portal/iFrmCmd/logicsheets/cm-save.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <!-- and now the stylesheet -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl SOAP-ENC xsi cms form bus xtsext pf">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xts:transform name="Null" option="part" mimeType="text/xml">
- <xsl:element name="{key('request-param','resultNode')}" >
- <xsl:choose>
- <xsl:when test="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'canceled'">
- <canceled/>
- </xsl:when>
- <xsl:otherwise>
- <!-- place a response here -->
- <scheduleParameters>
- <item xsi:type="bus:schedule">
- <xsl:call-template name="build_jsm_schedule">
- <xsl:with-param name="env">
- <xsl:for-each select="/root/env/param">
- <form:param name="{./@name}">
- <xsl:value-of select="."/>
- </form:param>
- </xsl:for-each>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:choose>
- <xsl:when test="/root/parameters/*">
- <xts:transform src="transforms/portal/parameters/pre-JSM-process.xslt" processor="XSLT">
- <xsl:element name="parameters" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:copy-of select="/root/parameters/*"/>
- </xsl:element>
- </xts:transform>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="parameters" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:attribute name="xsi:type">bus:parameterValueArrayProp</xsl:attribute>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </item>
- </scheduleParameters>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <cms:prop-save/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- processResponse - Append a fake prebuilt response. This is to create the tasks.
- ===============================================================================================
- -->
- <xts:block id="processResponse" type="exec" mode="interpret" processor="XSLT" dependency="returnResult" condition=".[ /root/env/param[@name = 'queryResponse'] and /root/env/param[@name = 'queryResponse'] != '' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl xts dt pf xtsext cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_dialogadapter001', string( /root/env/param[@name = 'queryResponse'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- decodeScheduleParameters
- ===============================================================================================
- -->
- <xts:block id="decodeScheduleParameters" type="exec" mode="interpret" processor="XSLT" dependency="processResponse" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='scheduleParameters'] and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='scheduleParameters'] != '' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xIE5="http://developer.cognos.com/prompting/xIE5" exclude-result-prefixes="xsl xts dt pf xtsext xIE5">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/*[local-name()='queryResponse']">
- <xsl:element name="queryReply">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <xts:transform src="ags/transforms/getChildren.xslt" processor="XSLT">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(key('request-param','scheduleParameters'))), true())"/>
- </xts:transform>
- </xts:transform>
- </xts:transform>
- </xsl:element>
- </xts:append>
- <!-- delete the schedule parameters -->
- <xts:delete select="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='scheduleParameters']"/>
- <xts:delete select="/root/env/param[@name='scheduleParameters']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- splitParameters - Append a fake prebuilt response. This is to create the tasks.
- ===============================================================================================
- -->
- <xts:block id="splitParameters" type="exec" mode="interpret" processor="XSLT" dependency="decodeScheduleParameters" condition=".[ /root/env/param[@name = 'queryResponse'] and /root/env/param[@name = 'queryResponse'] != '' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl xts dt pf xtsext cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/*[local-name()='param']" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- if we don't have a parameterDescription, then separate the connection/signon prompts
- from other prompts. -->
- <xsl:if test="not(/root/env/param[@name='parameterDescription'])">
- <dt:splitParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='parameters']"/>
- </xsl:if>
- <!-- process the parameters saved on the agent -->
- <xsl:if test="not(key('env-param','visited_schedule_properties'))">
- <dt:splitRunnableParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='parameters']"/>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
- ===============================================================================================
- -->
- <xts:block id="queryDataSourcePrompts"
- nodeList="credentialParameters"
- path="/portal/iPrompting/logicsheets/query-datasource.xslt"
- processor="XSLT"
- type="exec"
- dependency="splitParameters"
- condition=".[/root/credentialParameters or /root/runnableParameters/credentialParameters]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- generateParameterDescription
- ===============================================================================================
- -->
- <xts:block id="generateParameterDescription"
- nodelist="env,credentialParameters,parameters,dataSources"
- path="/portal/iPrompting/logicsheets/gen-prompt-description.xslt"
- processor="XSLT"
- type="exec"
- dependency="queryDataSourcePrompts"
- condition=".[not(/root/env/param[@name='parameterDescription'])]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- queryCredentialInfo:
- Query CM for the necessary user information (default names required for UI)
- ===============================================================================================
- -->
- <xts:block id="queryCredentialInfo"
- nodelist="env,header,session,http,queryResponse,scheduleCredentials,credential,cookies"
- path="/portal/schedule/logicsheets/query-credential-info.xslt"
- processor="XSLT"
- condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']"
- type="exec"
- dependency="generateParameterDescription"
- mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- processScheduleDetails - This should work out which set of parameters to use, and generate the agent or the schedule parameters.
- ===============================================================================================
- -->
- <xts:block id="processScheduleDetails" type="exec" mode="interpret" processor="XSLT" dependency="queryCredentialInfo" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsl xtsext dt pf cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xsl:if test="not(/root/env/param[@name='visited_schedule_properties'])">
- <xts:transform src="/portal/schedule/transforms/generateDefaultParams.xslt" processor="XSLT">
- <root>
- <xsl:copy-of select="/root/user"/>
- <xsl:copy-of select="/root/env"/>
- <xsl:copy-of select="/root/*[local-name()='queryResponse']//*[local-name()='schedule']"/>
- </root>
- </xts:transform>
- </xsl:if>
- </xts:append>
- <xts:append select="/root/env">
- <xts:transform src="/portal/schedule/transforms/generateMissingParams.xslt" processor="XSLT">
- <xts:param name="logicsheet">/logicsheets/portal.xsl</xts:param>
- <root>
- <xsl:copy-of select="/root/user"/>
- <xsl:copy-of select="/root/session"/>
- <xts:queryNode select="/root/env"/>
- </root>
- </xts:transform>
- </xts:append>
- <xsl:if test="not(/root/env/param[@name='visited_schedule_properties'])">
- <xts:sequence>
- <xts:append select="/root/env">
- <!-- add the necessary params for the default parameters stored on the runnable -->
- <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='parameters']/* != ''">
- <xsl:variable name="default-parameters-markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='parameters']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="defaultParameters">
- <xsl:value-of select="xtsext:web64encode(string($default-parameters-markup), true())"/>
- </xsl:variable>
- <param name="defaultParameters"><xsl:value-of select="$defaultParameters"/></param>
-
- <dt:promptDescription params="default" checkRunnableParameters="true"/>
- </xsl:if>
- </xts:append>
-
- <!-- if we already have saved paramters on the schedule -->
- <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='parameters']!=''">
- <xsl:variable name="parameters-markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='parameters']"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="m_rp_parameters">
- <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
- </param>
- <param name="override_default_parameters">true</param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- <dt:hierarchicalParmValueItem/>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- businessRules - Take care of any business logic to simplify the UI generation
- ===============================================================================================
- -->
- <xts:block id="businessRules" dependency="processScheduleDetails" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl" />
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" exclude-result-prefixes="xsl">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <businessRules>
- <!-- browser title -->
- <browserTitle>
- <xsl:text/>
- <xsl:choose>
- <xsl:when test="key('request-param','titlePostfix') != '' and key('request-param','inWizard')='true' ">
- <xts:string id="IDS_COMBINE_TITLE">
- <xts:param name="prefix">
- <xsl:value-of select="key('request-param','titlePrefix')"/>
- </xts:param>
- <xts:param name="postfix">
- <xsl:value-of select="key('request-param','titlePostfix')"/>
- </xts:param>
- </xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="TASK_DEFINE_SCHEDULE_WIZARD"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>
- </browserTitle>
- <!-- description -->
- <description>
- <xsl:choose>
- <xsl:when test="key('request-param','inWizard') = 'false'">
- <xsl:text/>
- <xts:string id="IDS_PROP_SCHED_INTRO"/>
- <xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>
- <xts:string id="NEW_AGENT_SCHEDULE_INTRO"/>
- <xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </description>
- </businessRules>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="businessRules" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='morphletResponse']]" mandatory="false">
- <!-- logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/recurrenceUI.xslt"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="portal/schedule/logicsheets/scheduleVars.xsl"/>
-
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xIE5="http://developer.cognos.com/prompting/xIE5"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/">
- exclude-result-prefixes="pf cml ut df lyt dp cf cp dc utml xts bus xtsext cm xIE5 dlgctrl">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="business-rules" match="/root/businessRules/*" use="local-name()"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <rui:variables/>
-
- <cml:single-object/>
-
- <rui:promptControls form="pform"/>
- <xsl:variable name="mname" select="concat('..' , /root/env/param[@name='m'])"/>
- <xsl:variable name="the-steps" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='agentTaskDefinition']"/>
- <xsl:variable name="agentStudio" select="key('request-param','agentStudio') = 'true'"/>
- <xsl:variable name="utml-form-name">pform</xsl:variable>
- <!--xsl:variable name="form-read-only">false</xsl:variable-->
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <xsl:variable name="script_name">
- <xsl:value-of select="/root/http/param[@name='SCRIPT_NAME']"/>
- </xsl:variable>
- <!--xsl:variable name="the-credential" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='credential']"/-->
- <xsl:variable name="the-schedule" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']"/>
- <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/cm:queryReply/*/cm:permissions, ' '), ' execute ') or not (/root/cm:queryResponse/cm:queryReply/*/cm:permissions)"/>
- <xsl:variable name="savedTriggerType" select="'schedule'"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!-- Since the date control input variables are not utml input, they would be put into Hidden inputs whenever the page is refreshed and cause
- duplicate. So we exclude them from query values. -->
- <!-- We also don't want vars from the controller templates usage - which is in the wizard. Add those vars to the exclusion list -->
- <utml:exclusion-list>
- <xsl:value-of select="' cleared_prompts txtDatedateTo txtDatedateFrom tempPath p_sched_date1 p_sched_date2 p_sched_time1 p_sched_time2 hourstimeTo hourstimeFrom minutestimeTo minutestimeFrom secondstimeFrom secondstimeTo AMPMtimeTo AMPMtimeFrom dateTotxtDate dateFromtxtDate controller_state request_stack_wizardStack request_stack_scheduleStack visited_schedule_properties '"/>
- </utml:exclusion-list>
- <utml:read-only>
- <xsl:choose>
- <!-- We might be creating the schedule so if permission are not there then it is ok-->
- <xsl:when test="(contains($the-schedule/cm:permissions, 'write') and contains($the-schedule/cm:permissions, 'execute')) or not ($the-schedule/cm:permissions)">
- <xsl:text>false</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>true</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <utml:input type="hidden" name="hid" id="hid" utml:update="false" value="ug_cr_as_ag_wspcf_schdl"/>
- <!-- get the JavaScript needed for the prompt controls -->
- <rui:promptControlsScript/>
- <link href="{$skin_root}/ags/ags.css" type="text/css" rel="stylesheet"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/ags/crn.css"/>
- <pf:help context="ug_cr_as_ag_wspcf_schdl" eventStudio="true"/>
- <script type="text/javascript" src="../ags/help.js"/>
- <script type="text/javascript" src="../ags/layout.js">//</script>
- <script language="javascript">
- // this function is called when the Next button is pressed. Note that it is only called if utml:validate is set to 'true'
- function validate()
- {
- var isValid = validateSchedule();
- return isValid;
- }
- function doExpandTasksNotused() {
- var frm = document.pform;
- //we must resubmit to ourselves
- frm.m.value = '/ags/dialogAdapter.xts';
- frm.ps_nav_op.value = "maintain";
- window.setTimeout('document.pform.submit();', 1 );
- }
- function init()
- {
- var inWizard = <xsl:value-of select="key('request-param','inWizard')"/>;
- //document.getElementById('inWizard').value;
- var cf=getConfigFrame?getConfigFrame():null;
- if (cf && cf.showDialogFrame && !inWizard)
- { //This function is used to fix scroll bar issue of dialogIFrame in Standards mode.
- resetMargin();
- //for now this is commented. because the tasks
- //and parameters are not workin properly yet.
- cf.showDialogFrame(550);
- if (document.pform.override_default_parameters) {
- if (document.pform.override_default_parameters.checked)
- {
- showDynamicDiv('overrideParametersDiv');
- hideDynamicDiv('defaultParmetersDiv');
- }
- else
- {
- hideDynamicDiv('overrideParametersDiv');
- showDynamicDiv('defaultParmetersDiv');
- }
- }
- }
- }
- function resetMargin(){
- var elementArray = document.getElementsByTagName("body");
- var iframeBody = elementArray[0];
- iframeBody.style.margin = "0px";
- }
- function onClickOK()
- {
- var frm = document.pform;
- if (validateSchedule() ){
- var cf=getConfigFrame?getConfigFrame():null;
- cf.agentHasChanged(true);
- frm.m.value='/ags/scheduleController.xts';
- frm.ps_nav_op.value = 'maintain';
- frm.controller_state.value = 'schedule|finished';
- frm.submit();
- }
- }
- </script>
- <!-- adds standard hidden inputs and javascript -->
- <dlgctrl:markupHelper/>
- <!-- render the interactive dialog header if this is not the wizard -->
- <dp:header>
- <dp:title>
- <xsl:value-of select="key('business-rules','browserTitle')"/>
- </dp:title>
- <dp:description headerBorder="true">
- <xsl:value-of select="key('business-rules','description')"/>
- </dp:description>
- <dp:close>
- <a href="#" onclick="getConfigFrame().hideDialogFrame();">
- <dp:closeMarker/>
- </a>
- </dp:close>
- </dp:header>
- <utml:input type="hidden" name="m_rp_parameters" id="m_rp_parameters">
- <xsl:attribute name="value"><xsl:value-of select="/root/env/param[@name='m_rp_parameters']"/></xsl:attribute>
- </utml:input>
- <utml:input type="hidden" name="ui.routingServerGroup" id="ui.routingServerGroup">
- <xsl:attribute name="value"><xsl:value-of select="key('request-param', 'ui.routingServerGroup')"/></xsl:attribute>
- </utml:input>
- <xsl:choose>
- <xsl:when test="$form-read-only='true' and not($the-schedule) ">
- <mt:objectNoneFound id="IDS_PROP_SCHED_READ_ONLY_NO_SCHED"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- add this hidden input, its existence allows us to infer that this morphlet has been previously visited-->
- <input name="visited_schedule_properties" id="visited_schedule_properties" type="hidden" value="true"/>
- <!-- Recurrence -->
- <rui:recurrenceUI/>
- <xsl:if test="key('request-param','inWizard') = 'false'">
- <lyt:layout style="1">
- <lyt:section>
- <cf:dynamicExpandingSection name="expandedContentTaskOptions" width="100%" indent="false" initialize="false" visible="false" title="IDS_PROP_AGENT_TASKS">
- <!-- This needs to be modified to have a flag so that the task title is not displayed objectClass="agentTaskDefinition"-->
- <ut:taskSummaryUI objectClass="agentTaskDefinition" label="" iterate="$the-steps" itemObject="cm:taskObject"/>
- </cf:dynamicExpandingSection>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" title="IDS_PROP_JOB_HEADING_PROMPT_VALUES" border="yes">
- <lyt:section>
- <dp:choice width="100%">
- <dp:section1>
- <utml:input type="checkbox" name="override_default_parameters" id="override_default_parameters" value="true" utml:track="true" onclick="togglePromptDivs();"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_STEP_RUN_OVERRIDE_DEFAULT_OPTIONS"/>
- </dp:section2>
- <dp:section3 width="100%">
- <ut:parametersDiv showTitle="false"/>
- </dp:section3>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <!-- footer -->
- <!-- ******************************************** -->
- <!-- TODO: Change framework.xsl to evaluate df:style as an child of df:button so we don't need all these choose statements -->
- <!-- ******************************************** -->
- <xsl:if test="key('request-param','displayButtons') != 'false'">
- <dp:footer>
- <df:button df:id="IDS_OK" df:style="href" df:href="#" onclick="javascript:onClickOK();"/>
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="#" onclick="getConfigFrame().hideDialogFrame();"/>
- </dp:footer>
- </xsl:if>
- </utml:form>
- </xts:transform>
- </markup>
- <browserTitle>
- <xsl:value-of select="key('business-rules','browserTitle')"/>
- </browserTitle>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
-
- <!-- include all the schedule related templates. -->
- <pf:gen-icon/>
- <cp:tabControl/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup returnResult" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- Get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|