123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?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">
- <!--
- ================================================================================
- decode the agent items
- ===============================================================================================
- -->
- <xts:block id="decode_agent_definition" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'agent_definition_blob']">
- <!-- decode the agent items -->
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_presave001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- <!-- delete the agent definition blob - we're putting it back later -->
- <xts:delete select="/root/env/param[@name='agent_definition_blob']"/>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getPageData - create the request parameters for the content page
- ===============================================================================================
- -->
- <xts:block id="getPageData" dependency="decode_agent_definition" path="ags/navigator.xslt" processor="XSLT" type="exec"/>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="callControllerTemplateResults" path="/ags/callResultTemplate.xslt" dependency="getPageData" condition=".[/root/env/param[@name='tabSelectedID']!='AgentTask-condition']" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="handleControllerTemplateResults" path="/ags/handleResultTemplate.xslt" dependency="callControllerTemplateResults" condition=".[/root/env/param[@name='tabSelectedID']!='AgentTask-condition']" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Correct the task name if required ... the agent task action names which are now not specified by
- user and are taken from task property
- for Email it is subject, report .. report name, webservice - operation name, SQL - proc name etc.
- thus in order to avoid duplicate names we need to manage these names and we do it by putting a
- sequence number at the end of task name
- ===============================================================================================
- -->
- <xts:block id="manageTaskNameBlock" path="/ags/manageTaskName.xslt" dependency="handleControllerTemplateResults" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Save the agent action info. The encoded contents will be stored in /root/env/param[@name='<action>']. where the action is
- the contents of /root/env/param[@name='prevTabID'] which can be schedule/message/agent/job/report.
-
- Once the individual elements have been saved into the environment they will be removed.
- ===============================================================================================
- -->
- <xts:block id="storePreviousTab" path="/ags/storeTabTemplate.xslt" dependency="manageTaskNameBlock" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="encode_agent_definition" dependency="storePreviousTab" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/agent_definition"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="agent_definition_blob">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_encodeagentdefinition_settemplateid_presave002'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup - Produce the much needed XML response
- ===============================================================================================
- -->
- <xts:block id="getResult" type="exec" mode="output" mimeType="application/xml; charset=utf-8" processor="XSLT" dependency="encode_agent_definition">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <!-- declared a variable to determine if a report has been selected, used for validation purposes-->
- <xsl:template match="/">
- <calcAgentStateResponse>
- <!-- send back all the wrapped up agentTaskBlobs -->
- <param name="agent_definition_blob">
- <xsl:value-of select="/root/env/param[@name='agent_definition_blob']"/>
- </param>
- <xsl:for-each select="/root/env/param[starts-with(@name, 'AgentTask')]">
- <param name="{./@name}">
- <xsl:value-of select="."/>
- </param>
- </xsl:for-each>
- </calcAgentStateResponse>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|