agentDefinition.xts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true" resolverBase="prompting">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ===============================================================================================
  21. checkParam - change m_name, m_class, m_obj when dealing with shortcut.
  22. ===============================================================================================
  23. -->
  24. <xts:block id="checkParam" path="/portal/ref2target.xml" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[starts-with(@name,'sc_target')]!='']" mandatory="false"/>
  25. <!--
  26. ===============================================================================================
  27. getContent - get our data from Content Manager
  28. ===============================================================================================
  29. -->
  30. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init checkParam">
  31. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  32. <xts:logicsheet path="portal/runWithOptions/logicsheets/request.xslt"/>
  33. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  34. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  35. <xsl:stylesheet version="1.0"
  36. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  37. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  38. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  39. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  40. exclude-result-prefixes="xsl xtsext rdr dt">
  41. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  42. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  43. <xsl:template match="/">
  44. <xsl:variable name="userPrefs" select="/root/session/param"/>
  45. <xsl:variable name="userPrefsDefault" select="/root/system/param[@name='defaultPortalPreferences']"/>
  46. <xsl:variable name="maxObjects">
  47. <xsl:choose>
  48. <xsl:when test="string(key('env-param','m_pagertotasks')) !='' and string(key('env-param','m_pagerfromtasks')) !=''">
  49. <xsl:value-of select="(key('env-param','m_pagertotasks') - key('env-param','m_pagerfromtasks')) + 1"/>
  50. </xsl:when>
  51. <xsl:when test="$userPrefs[@name='linesPerPage']!=''">
  52. <xsl:value-of select="$userPrefs[@name='linesPerPage']"/>
  53. </xsl:when>
  54. <xsl:otherwise>
  55. <xsl:value-of select="userPrefsDefault/pref[@name='lines']"/>
  56. </xsl:otherwise>
  57. </xsl:choose>
  58. </xsl:variable>
  59. <xsl:variable name="skipObjects">
  60. <xsl:choose>
  61. <xsl:when test="key('env-param','m_pagerfromtasks') and key('env-param','m_pagerfromtasks')!=''">
  62. <xsl:value-of select="key('env-param','m_pagerfromtasks')-1"/>
  63. </xsl:when>
  64. <xsl:when test="key('env-param','m_taskssection')!=''">
  65. <xsl:choose>
  66. <xsl:when test="key('env-param','m_taskssection')!='-1'">
  67. <xsl:value-of select="(key('env-param','m_taskssection') -1)"/>
  68. </xsl:when>
  69. <xsl:otherwise>
  70. <xsl:value-of select="($maxObjects) * -1"/>
  71. </xsl:otherwise>
  72. </xsl:choose>
  73. </xsl:when>
  74. <xsl:otherwise>0</xsl:otherwise>
  75. </xsl:choose>
  76. </xsl:variable>
  77. <xts:sequence>
  78. <rdr:Requests>
  79. <rdr:Request type="runnable">
  80. <rdr:searchPath>
  81. <xsl:value-of select="key('env-param', 'm_obj')"/>
  82. </rdr:searchPath>
  83. </rdr:Request>
  84. <rdr:Request type="steps" mode="agent">
  85. <rdr:searchPath>
  86. <xsl:value-of select="key('env-param', 'm_obj')"/>
  87. </rdr:searchPath>
  88. <rdr:maxObjects><xsl:value-of select="$maxObjects+1"/></rdr:maxObjects>
  89. <rdr:skipObjects><xsl:value-of select="$skipObjects"/></rdr:skipObjects>
  90. </rdr:Request>
  91. <rdr:Request type="credential"/>
  92. <rdr:Request type="accountOptions"/>
  93. <rdr:Request type="agentParameters">
  94. <rdr:searchPath>
  95. <xsl:value-of select="key('env-param', 'm_obj')"/>
  96. </rdr:searchPath>
  97. </rdr:Request>
  98. <xsl:if test="key('env-param','from_schedule_tool') = 'true'">
  99. <rdr:Request type="schedule">
  100. <rdr:searchPath>
  101. <xsl:value-of select="key('env-param', 'm_obj')"/>
  102. <xsl:text>/schedule[permission("read")]</xsl:text>
  103. </rdr:searchPath>
  104. </rdr:Request>
  105. </xsl:if>
  106. </rdr:Requests>
  107. <!-- if we don't have a parameterDescription, then separate the connection/signon prompts from other prompts. -->
  108. <xsl:if test="not(/root/env/param[@name='parameterDescription'])">
  109. <xts:append>
  110. <xts:transform src="transforms/portal/parameters/group-parameters.xslt" processor="XSLT">
  111. <root>
  112. <xsl:choose>
  113. <!-- if we're doing a run once, then take the parameters off the schedule -->
  114. <xsl:when test="key('env-param','from_schedule_tool') = 'true'">
  115. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='parameters']"/>
  116. </xsl:when>
  117. <xsl:otherwise>
  118. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][5]/*/*[local-name()='parameters']"/>
  119. </xsl:otherwise>
  120. </xsl:choose>
  121. </root>
  122. </xts:transform>
  123. </xts:append>
  124. <!-- Search for parameters on the command line identified by starting with "p_"
  125. Add them to a new PromptValue node -->
  126. <xts:append select="/root">
  127. <PromptValues>
  128. <xsl:for-each select="/root/env/param[starts-with(@name, 'p_')]">
  129. <xsl:if test=". != ''">
  130. <xsl:variable name="promptValue">
  131. <xsl:value-of select="text()"/>
  132. </xsl:variable>
  133. <PromptValue name="{substring-after(@name,'_')}">
  134. <xsl:choose>
  135. <xsl:when test="contains($promptValue, 'selectChoices')">
  136. <xsl:value-of select="$promptValue" disable-output-escaping="yes"/>
  137. </xsl:when>
  138. <xsl:otherwise>
  139. <xsl:value-of select="$promptValue" disable-output-escaping="no"/>
  140. </xsl:otherwise>
  141. </xsl:choose>
  142. </PromptValue>
  143. </xsl:if>
  144. </xsl:for-each>
  145. </PromptValues>
  146. </xts:append>
  147. <xsl:if test="key('env-param','from_schedule_tool') = 'true'">
  148. <!-- If we're doing a run once, then we need to process the parameters saved on the agent -->
  149. <xsl:if test="not(key('env-param','step_options_visited'))">
  150. <dt:splitRunnableParameters queryNode="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][5]/*/*[local-name()='parameters']"/>
  151. </xsl:if>
  152. </xsl:if>
  153. </xsl:if>
  154. </xts:sequence>
  155. <!-- Every time the page is reloaded, delete the following pager parameters from the /root/env. This is required for the pager to work properly. -->
  156. <xts:sequence>
  157. <xts:delete select="/root/env/param[@name='pagerfromtasks']"/>
  158. <xts:delete select="/root/env/param[@name='pagertotasks']"/>
  159. <xts:delete select="/root/env/param[@name='pagerfrom_dtasks']"/>
  160. <xts:delete select="/root/env/param[@name='pagerto_dtasks']"/>
  161. </xts:sequence>
  162. </xsl:template>
  163. </xsl:stylesheet>
  164. </xts:block>
  165. <!--
  166. ===============================================================================================
  167. queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
  168. ===============================================================================================
  169. -->
  170. <xts:block id="queryDataSourcePrompts"
  171. nodeList="credentialParameters,runnableParameters"
  172. path="/portal/iPrompting/logicsheets/query-datasource.xslt"
  173. processor="XSLT"
  174. type="exec"
  175. dependency="getContent"
  176. condition=".[/root/credentialParameters or /root/runnableParameters/credentialParameters]"
  177. mandatory="false">
  178. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  179. </xts:block>
  180. <!--
  181. ===============================================================================================
  182. getBaseContent - We need to get the step information from the base object in the case of a view
  183. ===============================================================================================
  184. -->
  185. <xts:block id="getBaseContent" processor="XSLT" type="exec" dependency="getContent" mandatory="false" condition=".[/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='objectClass']='agentDefinitionView']">
  186. <xts:logicsheet path="portal/runWithOptions/logicsheets/request.xslt"/>
  187. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  188. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  189. <xsl:stylesheet version="1.0"
  190. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  191. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  192. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  193. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  194. exclude-result-prefixes="xsl xtsext rdr">
  195. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  196. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  197. <xsl:template match="/">
  198. <xts:sequence>
  199. <rdr:Requests>
  200. <rdr:Request type="steps" mode="agent">
  201. <rdr:searchPath>
  202. <xsl:value-of select="/root/cm:queryResponse/cm:queryReply[1]/*/cm:base/*/cm:searchPath"/>
  203. </rdr:searchPath>
  204. </rdr:Request>
  205. </rdr:Requests>
  206. <xts:replace select="/root/*[local-name()='queryResponse'][1]/*[local-name()='queryReply'][2]">
  207. <xts:queryNode select="/root/*[local-name()='queryResponse'][2]/*[local-name()='queryReply']"/>
  208. </xts:replace>
  209. <xts:delete select="/root/*[local-name()='queryResponse'][2]"/>
  210. </xts:sequence>
  211. </xsl:template>
  212. </xsl:stylesheet>
  213. </xts:block>
  214. <!--
  215. ===============================================================================================
  216. generateDefaults - generate any required default values
  217. ===============================================================================================
  218. -->
  219. <xts:block id="generateDefaults" processor="XSLT" type="exec" dependency="queryDataSourcePrompts">
  220. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  221. <xts:logicsheet path="logicsheets/portal.xsl"/>
  222. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  223. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  224. xmlns:rs="http://developer.cognos.com/schemas/reportService/1"
  225. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  226. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  227. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  228. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  229. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  230. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  231. xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope"
  232. SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  233. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  234. exclude-result-prefixes="xsl pf dt cm xtsext">
  235. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  236. <pf:variables/>
  237. <xsl:variable name="the-account" select="/root/cm:queryResponse/cm:queryReply[4]/cm:account"/>
  238. <xsl:template match="/">
  239. <xts:sequence>
  240. <xts:append select="/root/env">
  241. <xts:transform src="/portal/runWithOptions/transforms/generateDefaultParams.xslt" processor="XSLT">
  242. <root>
  243. <xsl:copy-of select="/root/env"/>
  244. <xsl:copy-of select="/root/user"/>
  245. <xsl:copy-of select="/root/system"/>
  246. <xsl:copy-of select="$the-account"/>
  247. </root>
  248. </xts:transform>
  249. </xts:append>
  250. <xts:append select="/root/env">
  251. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  252. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  253. <root>
  254. <xts:transform src="transforms/portal/options/mergeReportOptions.xslt" processor="XSLT">
  255. <root>
  256. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][5]/*"/>
  257. </root>
  258. </xts:transform>
  259. </root>
  260. </xts:transform>
  261. </xts:append>
  262. <!-- encode the parameters -->
  263. <xsl:if test="not(key('env-param','parameterDescription'))">
  264. <xsl:choose>
  265. <!-- If there are parameters on the runnable (doing a run with options) or on the schedule
  266. (doing a run once) -->
  267. <xsl:when test="/root/parameters/* or /root/credentialParameters/*">
  268. <dt:promptDescription/>
  269. </xsl:when>
  270. <!-- if we're doing a run once and there are parameters on the runnable -->
  271. <xsl:otherwise>
  272. <dt:promptDescription checkRunnableParameters="true"/>
  273. </xsl:otherwise>
  274. </xsl:choose>
  275. <xsl:choose>
  276. <!-- Report parameters were passed in on the command line. Process them, serialize them and
  277. and add them to an env-param called parameterValues -->
  278. <xsl:when test="/root/PromptValues">
  279. <xsl:variable name="parameters-markup">
  280. <xsl:call-template name="serialize-xml">
  281. <xsl:with-param name="node-set">
  282. <xsl:call-template name="SetParameters"/>
  283. </xsl:with-param>
  284. </xsl:call-template>
  285. </xsl:variable>
  286. <xts:append select="/root/env">
  287. <param name="parameterValues">
  288. <xsl:value-of select="$parameters-markup"/>
  289. </param>
  290. </xts:append>
  291. </xsl:when>
  292. <!-- if we're doing a run once and there are parameters on the schedule, then those parameters
  293. need to be passed on the execute request -->
  294. <xsl:when test="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters/*">
  295. <xsl:variable name="parameters-markup">
  296. <xsl:call-template name="serialize-xml">
  297. <xsl:with-param name="node-set" select="/root/cm:queryResponse/cm:queryReply/cm:schedule/cm:parameters"/>
  298. </xsl:call-template>
  299. </xsl:variable>
  300. <xts:append select="/root/env">
  301. <param name="m_rp_parameters">
  302. <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
  303. </param>
  304. </xts:append>
  305. </xsl:when>
  306. <!-- if there are parameters saved on the agent -->
  307. <xsl:when test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][5]/*/*[local-name()='parameters']/*">
  308. <xsl:variable name="parameters-markup">
  309. <xsl:call-template name="serialize-xml">
  310. <xsl:with-param name="node-set" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][5]/*/*[local-name()='parameters']"/>
  311. </xsl:call-template>
  312. </xsl:variable>
  313. <xts:append select="/root/env">
  314. <param name="m_rp_parameters">
  315. <xsl:value-of select="xtsext:web64encode(string($parameters-markup), true())"/>
  316. </param>
  317. </xts:append>
  318. </xsl:when>
  319. </xsl:choose>
  320. </xsl:if>
  321. </xts:sequence>
  322. </xsl:template>
  323. <pf:serialize-xml/>
  324. <dt:hierarchicalParmValueItem/>
  325. <!-- template: SetParameters -->
  326. <xsl:template name="SetParameters">
  327. <parameterValues xsi:type="bus:parameterValueArray" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  328. xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  329. xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" >
  330. <xsl:for-each select="/root/PromptValues/PromptValue">
  331. <item>
  332. <bus:name xsi:type="xsd:string"><xsl:value-of select="@name"/></bus:name>
  333. <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
  334. <item xsi:type="bus:simpleParmValueItem">
  335. <bus:display xsi:type="xsd:string"><xsl:value-of select="."/></bus:display>
  336. <bus:use xsi:type="xsd:string"><xsl:value-of select="."/></bus:use>
  337. </item>
  338. </bus:value>
  339. </item>
  340. </xsl:for-each>
  341. </parameterValues>
  342. </xsl:template>
  343. </xsl:stylesheet>
  344. </xts:block>
  345. <!--
  346. ===============================================================================================
  347. getObjects - get object class names
  348. ===============================================================================================
  349. -->
  350. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  351. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  352. </xts:block>
  353. <!--
  354. ===============================================================================================
  355. Render the HTML page
  356. ===============================================================================================
  357. -->
  358. <xts:block id="renderPage" dependency="getBaseContent generateDefaults classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html">
  359. <xts:logicsheet path="portal/runWithOptions/logicsheets/response.xslt"/>
  360. <!-- portal specific information -->
  361. <xts:logicsheet path="logicsheets/portal.xsl"/>
  362. <!-- Dialog specific logicsheets -->
  363. <xts:logicsheet path="logicsheets/presentation/dialog/recurrenceUI.xslt"/>
  364. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  365. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  366. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  367. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  368. <xts:logicsheet path="portal/schedule/logicsheets/scheduleVars.xsl"/>
  369. <!-- Generic logicsheets -->
  370. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  371. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  372. <!-- apply the form logic -->
  373. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  374. <xts:logicsheet path="logicsheets/validation.xslt"/>
  375. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  376. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  377. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb/"
  378. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  379. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  380. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  381. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  382. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  383. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  384. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  385. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  386. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  387. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  388. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  389. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  390. xmlns:rui="http://developer.cognos.com/schemas/xts/logicsheet/xslt/presentation/dialog/recurrenceUI/"
  391. xmlns:x="x"
  392. exclude-result-prefixes="xsl lyt dp df cp cf cm bus utml xtsext xts rui">
  393. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  394. <!-- current file name -->
  395. <xsl:variable name="mname" select="'runWithOptions/agentDefinition.xts'"/>
  396. <xsl:variable name="m_class" select="/root/env/param[@name = 'm_class']"/>
  397. <xsl:variable name="back-url" select="key('env-param','backURL')"/>
  398. <!-- add any theme variables -->
  399. <pf:variables/>
  400. <pf:gen-icon/>
  401. <rui:variables/>
  402. <!-- include date control stylesheet and declare any vairables needed -->
  403. <rui:promptControls form="pform"/>
  404. <!-- references to the various objects queried from CM -->
  405. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[1]/*"/>
  406. <xsl:variable name="the-steps" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
  407. <xsl:variable name="the-credential" select="/root/cm:queryResponse/cm:queryReply[3]/cm:credential"/>
  408. <xsl:variable name="the-schedule" select="/root/cm:queryResponse/cm:queryReply[6]/cm:schedule"/>
  409. <xsl:variable name="has_execute_permission" select="contains(concat(' ', /root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions, ' '), ' execute ')"/>
  410. <!-- start the output -->
  411. <xsl:template match="root">
  412. <!-- Page and title -->
  413. <xsl:variable name="browserTitle">
  414. <rdb:pageTitle/>
  415. </xsl:variable>
  416. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  417. <dp:meta>
  418. <pf:meta/>
  419. <!-- Standard meta tags -->
  420. </dp:meta>
  421. <!-- include data control scripts -->
  422. <rui:promptControlsScript/>
  423. <dp:script>
  424. <pf:help context="HID_RUNAGENT"/> <!-- Help system -->
  425. <script language="javascript">
  426. function runReport()
  427. {
  428. var frm = document.pform;
  429. if (frm.showSummary &amp;&amp; frm.showSummary.value == 'n' &amp;&amp; !frm.m_ro_prompt.checked)
  430. {
  431. frm.ps_nav_op.value = 'submit';
  432. frm.m.value = 'portal/submit.xts';
  433. }
  434. else
  435. {
  436. if (frm.m_ro_prompt.checked)
  437. {
  438. frm.method.value = 'edit';
  439. }
  440. else
  441. {
  442. frm.method.value = '';
  443. }
  444. frm.ps_nav_op.value = 'push';
  445. frm.m.value = 'portal/runWithOptions/agent_confirm.xts';
  446. }
  447. document.pform.submit();
  448. }
  449. </script>
  450. </dp:script>
  451. <utml:form name="pform" action="{$gateway}" method="post">
  452. <!-- Since the date control input variables are not utml input, they would be put into Hidden inputs whenever the page is refreshed and cause
  453. duplicate. So we exclude them from query values. -->
  454. <utml:exclusion-list>
  455. <xsl:value-of select="' p_runDate p_runTime hourstimeFrom minutestimeFrom AMPMtimeFrom txtDatedateFrom '"/>
  456. </utml:exclusion-list>
  457. <!-- this defines the form command operation to be performed when all the collected properties are submitted. -->
  458. <utml:input type="hidden" name="ifrmcmd" value='execute' utml:update="false"/>
  459. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  460. <!-- if the user doesn't have a credentail then add the h_CAM_action to create one -->
  461. <rdb:checkCredential/>
  462. <!-- Dialog header -->
  463. <dp:header>
  464. <dp:title>
  465. <xsl:copy-of select="$browserTitle"/>
  466. </dp:title>
  467. <dp:description>
  468. <rdb:description>
  469. <className><xts:string id="IDS_OBJ_AGENT_LC"/></className>
  470. </rdb:description>
  471. </dp:description>
  472. </dp:header>
  473. <lyt:layout style="1">
  474. <lyt:section>
  475. <div>
  476. <rdb:nowOrLater/>
  477. </div>
  478. </lyt:section>
  479. </lyt:layout>
  480. <lyt:layout style="1">
  481. <lyt:section>
  482. <!-- itemObject is added because there is difference between agent and job result -->
  483. <ut:taskSummaryUI objectClass="$the-steps/cm:objectClass" iterate="$the-steps" itemObject="cm:taskObject"/>
  484. </lyt:section>
  485. </lyt:layout>
  486. <!-- prompts -->
  487. <lyt:layout style="1">
  488. <lyt:section>
  489. <ut:prompt/>
  490. </lyt:section>
  491. </lyt:layout>
  492. <!-- footer -->
  493. <dp:footer>
  494. <df:button df:id="IDS_OTHERRUN_RUN" df:style="href" df:href="javascript:runReport();"/>
  495. <xsl:choose>
  496. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  497. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  498. </xsl:when>
  499. <xsl:otherwise>
  500. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  501. </xsl:otherwise>
  502. </xsl:choose>
  503. </dp:footer>
  504. </utml:form>
  505. </dp:page>
  506. </xsl:template>
  507. <ut:promptTemplate showLinks="false"/>
  508. <cp:tabControl/>
  509. </xsl:stylesheet>
  510. </xts:block>
  511. <!--
  512. ===============================================================================================
  513. debug - display debug information
  514. ===============================================================================================
  515. -->
  516. <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  517. <!-- Get the debug logic sheet -->
  518. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  519. <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">
  520. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  521. <xsl:template match="/">
  522. <dbg:dumpxml select="/root"/>
  523. </xsl:template>
  524. </xsl:stylesheet>
  525. </xts:block>
  526. </xts:morphlet>