123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <!--
- ===============================================================================================
- doFormCommand
- Send the run request to the monitor service
- ===============================================================================================
- --> <xts:block id="doFormCommand" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:form="http://developer.cognos.com/schemas/xts/portal/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"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:ms="http://developer.cognos.com/schemas/monitorService/1"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl xts send form bus xtsext pf xsi SOAP-ENC SOAP-ENV ms">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- global application variables -->
- <pf:variables/>
- <xsl:key name="form-param" match="/root/command/form:rerun/form:env/form:param" use="@name"/>
- <xsl:template match="/root/command/form:rerun/form:env">
- <xts:sequence>
- <xts:append>
- <send:request provider="monitorService" affinity="session">
- <ms:run>
- <objectPath xsi:type="bus:searchPathSingleObject">
- <xsl:value-of select="key('form-param','parentSearchPath')"/>
- </objectPath>
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[0]"/>
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[2]">
- <item xsi:type="cm:asynchOptionSearchPathSingleObject">
- <name xsi:type="cm:asynchOptionEnum">restartHistoryLocation</name>
- <value xsi:type="cm:searchPathSingleObject">
- <xsl:choose>
- <!-- if we have a restartID then use it, should help performance in the back end -->
- <xsl:when test="key('form-param', 'restartEventID') != ''">//history[@eventID = '<xsl:value-of select="key('form-param', 'restartEventID')"/>']</xsl:when>
- <xsl:when test="key('form-param', 'eventID') != ''">//history[@eventID = '<xsl:value-of select="key('form-param', 'eventID')"/>']</xsl:when>
- <xsl:otherwise><xsl:value-of select="key('form-param', 'm_obj')"/></xsl:otherwise>
- </xsl:choose>
- </value>
- </item>
- <item xsi:type="cm:asynchOptionSearchPathSingleObjectArray">
- <name xsi:type="cm:asynchOptionEnum">skipTaskHistoryLocations</name>
- <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:searchPathSingleObject[]">
- <xsl:for-each select="form:param[starts-with(@name,'skipEventID_') and string(.) != '']">
- <item xsi:type="cm:searchPathSingleObject">//history[@eventID = '<xsl:value-of select="."/>']</item>
- </xsl:for-each>
- </value>
- </item>
- </options>
- </ms:run>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================
- commandResults - operation results
- ===============================================================================================
- -->
- <xts:block id="commandResults" processor="XSLT" type="exec" mode="output" mimeType="text/xml" dependency="doFormCommand">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <response xmlns="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/">
- <xsl:choose>
- <xsl:when test="*[local-name()='runResponse']">
- <xsl:copy-of select="*[local-name()='runResponse']"/>
- </xsl:when>
- <xsl:otherwise>
- <error/>
- </xsl:otherwise>
- </xsl:choose>
- </response>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|