activities_upcoming.xts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cogadmin
  5. (C) Copyright IBM Corp. 2005, 2014
  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/" resolverBase="cogadmin" messageBase="messages/cogadminuimsgs.xml, messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseScheduling canUseMonitorActivityTool or">
  13. <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only') and not(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
  14. <!--
  15. Get some information about the runnables from uiExtensions
  16. -->
  17. <xts:block id="getRunnableInfo" dependency="frag_init" nodelist="" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  18. <xts:logicsheet path="/cogadmin/logicsheets/uiobjects/uiobjects_runnables.xslt"/>
  19. </xts:block>
  20. <xts:block id="getCurrentUser" dependency="frag_init" nodelist="header, env, http, cookies" type="exec" mode="interpret" processor="XSLT" condition="/root/env/param[@name='personalOnly'] ='true'" mandatory="false">
  21. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  22. <xsl:stylesheet version="1.0"
  23. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  24. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  25. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  26. exclude-result-prefixes="xsl xts send">
  27. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  28. <xsl:template match="/">
  29. <xts:sequence>
  30. <xts:append>
  31. <currentUser>
  32. <send:request provider="cm">
  33. <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  34. <search xsi:type="xsd:string">~</search>
  35. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  36. <item xsi:type="cm:propEnum">storeID</item>
  37. </properties>
  38. </cm:query>
  39. </send:request>
  40. </currentUser>
  41. </xts:append>
  42. </xts:sequence>
  43. </xsl:template>
  44. </xsl:stylesheet>
  45. </xts:block>
  46. <!-- the following two blocks are meant to release the JSM conversation (if any) when user is leaving the current window -->
  47. <xts:block id="initConversation" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
  48. <xts:block id="releaseConversation" dependency="initConversation" nodelist="session, env, header, http" type="exec" mode="interpret" processor="XSLT">
  49. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  50. <xsl:stylesheet version="1.0"
  51. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  52. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  53. xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
  54. exclude-result-prefixes="xsl async xts send">
  55. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  56. <xsl:template match="/">
  57. <xts:sequence>
  58. <xts:append select="/root">
  59. <send:request provider="xts" option="xml-multipart">
  60. <async:asyncRequest>
  61. <provider>eventManagementService</provider>
  62. <releaseConversation>true</releaseConversation>
  63. <conversation><xsl:value-of select="/root/env/param[@name='web64conversation']"/></conversation>
  64. <tracking><xsl:value-of select="/root/env/param[@name='tracking']"/></tracking>
  65. </async:asyncRequest>
  66. </send:request>
  67. </xts:append>
  68. </xts:sequence>
  69. </xsl:template>
  70. </xsl:stylesheet>
  71. </xts:block>
  72. <!--
  73. Get the upcoming run activities
  74. -->
  75. <xts:block id="getUpcomingActivities" dependency="frag_init getCurrentUser" nodelist="session, env, header, http, configProps, user, currentUser" type="exec" mode="interpret" processor="XSLT">
  76. <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
  77. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  78. <xsl:stylesheet version="1.0"
  79. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  80. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  81. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  82. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  83. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  84. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  85. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  86. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  87. xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
  88. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  89. exclude-result-prefixes="xsl xsi xts SOAP-ENV bus xtsext admui send SOAP-ENV SOAP-ENC xsd">
  90. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  91. <!-- common variables -->
  92. <admui:variables/>
  93. <!-- common pager variables -->
  94. <admui:pagerVariables pagerName="upcoming_activities"/>
  95. <xsl:variable name="personalOnly" select="key('env-param', 'personalOnly') ='true' or not(key('session-param','capabilities')/canUseAdministrationPortal)"/>
  96. <xsl:template match="/">
  97. <xts:sequence>
  98. <xts:append select="/root">
  99. <xsl:variable name="selectDateTime">
  100. <xsl:choose>
  101. <xsl:when test="key('env-param','upcoming_filter_date') and key('env-param','upcoming_filter_date') != ''">
  102. <xsl:choose>
  103. <xsl:when test="contains(key('env-param','upcoming_filter_date'), 'T')">
  104. <xsl:value-of select="key('env-param','upcoming_filter_date')"/>
  105. </xsl:when>
  106. <xsl:otherwise>
  107. <xsl:value-of select="concat(key('env-param','upcoming_filter_date'),'T00:00:00')"/>
  108. </xsl:otherwise>
  109. </xsl:choose>
  110. </xsl:when>
  111. <xsl:otherwise>
  112. <xsl:value-of select="xtsext:getCurrentDateTime(string($timeZone))"/>
  113. </xsl:otherwise>
  114. </xsl:choose>
  115. </xsl:variable>
  116. <xsl:variable name="selectDate">
  117. <xsl:value-of select="substring-before($selectDateTime, 'T')"/>
  118. </xsl:variable>
  119. <xsl:variable name="selectTime">
  120. <xsl:value-of select="substring-after($selectDateTime, 'T')"/>
  121. </xsl:variable>
  122. <!-- Beginning of the selected day.-->
  123. <xsl:variable name="from">
  124. <xsl:value-of select="$selectDateTime"/>
  125. </xsl:variable>
  126. <xsl:variable name="toTime">
  127. <xsl:choose>
  128. <xsl:when test="key('env-param','upcoming_filter_granularity') and key('env-param','upcoming_filter_granularity') = 'hour'">
  129. <xsl:value-of select="concat(substring-before($selectTime,':'),':59:59')"/>
  130. </xsl:when>
  131. <xsl:otherwise>
  132. <xsl:value-of select="'23:59:59'"/>
  133. </xsl:otherwise>
  134. </xsl:choose>
  135. </xsl:variable>
  136. <!-- End of the selected day.-->
  137. <xsl:variable name="to">
  138. <xsl:value-of select="concat($selectDate, 'T', $toTime)"/>
  139. </xsl:variable>
  140. <send:request provider="xts" option="xml-multipart">
  141. <async:asyncRequest>
  142. <provider>eventManagementService</provider>
  143. <conversation><xsl:value-of select="key('env-param','web64conversation')"/></conversation>
  144. <tracking><xsl:value-of select="key('env-param','tracking')"/></tracking>
  145. <request>
  146. <xsl:choose>
  147. <xsl:when test="key('env-param','secondaryRequest') != ''">
  148. <xsl:value-of select="key('env-param','secondaryRequest')"/>
  149. </xsl:when>
  150. <xsl:otherwise>runSpecification</xsl:otherwise>
  151. </xsl:choose>
  152. </request>
  153. <specification>
  154. <bus:specification xsi:type="bus:eventManagementServiceSpecification">
  155. <bus:value xsi:type="bus:specification">
  156. <xts:transform name="XMLEncode">
  157. <eventManagementServiceSpecification>
  158. <sort>
  159. <order>
  160. <xsl:choose>
  161. <xsl:when test="key('env-param', 'sort_order')='descending'">descending</xsl:when>
  162. <xsl:otherwise>ascending</xsl:otherwise>
  163. </xsl:choose>
  164. </order>
  165. <sortItem>
  166. <xsl:choose>
  167. <xsl:when test="key('env-param', 'sort_column') != ''">
  168. <xsl:value-of select="key('env-param', 'sort_column')"/>
  169. </xsl:when>
  170. <xsl:otherwise>startTime</xsl:otherwise>
  171. </xsl:choose>
  172. </sortItem>
  173. </sort>
  174. <xsl:if test="key('env-param','upcoming_filter_scope') != ''">
  175. <scope>
  176. <searchPaths>
  177. <searchPath><xsl:value-of select="key('env-param','upcoming_filter_scope')"/></searchPath>
  178. </searchPaths>
  179. </scope>
  180. </xsl:if>
  181. <!-- user just did a from/to action -->
  182. <xsl:if test="$startPosition != '' and $endPosition != ''">
  183. <display>
  184. <start><xsl:value-of select="$startPosition"/></start>
  185. <end><xsl:value-of select="$endPosition"/></end>
  186. </display>
  187. </xsl:if>
  188. <filters>
  189. <xsl:if test="key('env-param','upcoming_filter_type') != ''">
  190. <objectClass><xsl:value-of select="key('env-param','upcoming_filter_type')"/></objectClass>
  191. </xsl:if>
  192. <xsl:choose>
  193. <xsl:when test="key('env-param','upcoming_filter_scheduled_by') != ''" >
  194. <user><xsl:value-of select="key('env-param','upcoming_filter_scheduled_by')"/></user>
  195. </xsl:when>
  196. <xsl:when test="$personalOnly">
  197. <user>
  198. <xsl:value-of select="/root/currentUser/*[local-name()='queryResponse']/queryResult/item/storeID/value"/>
  199. </user>
  200. </xsl:when>
  201. </xsl:choose>
  202. <xsl:if test="key('env-param','upcoming_filter_owned_by') != ''" >
  203. <owner><xsl:value-of select="key('env-param','upcoming_filter_owned_by')"/></owner>
  204. </xsl:if>
  205. <startTime><xsl:value-of select="xtsext:formatDateToUTC(string( $from ), string( $timeZone ))"/>Z</startTime>
  206. <endTime><xsl:value-of select="xtsext:formatDateToUTC(string( $to ), string( $timeZone ))"/>Z</endTime>
  207. <status>
  208. <xsl:choose>
  209. <xsl:when test="not(key('env-param','upcoming_filter_status')) or key('env-param','upcoming_filter_status')=''">scheduled</xsl:when>
  210. <xsl:otherwise><xsl:value-of select="key('env-param','upcoming_filter_status')"/></xsl:otherwise>
  211. </xsl:choose>
  212. </status>
  213. <!-- add the priority filter -->
  214. <xsl:if test="key('env-param','upcoming_filter_priority') and key('env-param','upcoming_filter_priority')!=''">
  215. <priority>
  216. <xsl:value-of select="key('env-param','upcoming_filter_priority')"/>
  217. </priority>
  218. </xsl:if>
  219. <!-- add the tenantID filter -->
  220. <xsl:if test="key('env-param','upcoming_filter_tenantid') and key('env-param','upcoming_filter_tenantid')!=''">
  221. <tenantID>
  222. <xsl:value-of select="key('env-param','upcoming_filter_tenantid')"/>
  223. </tenantID>
  224. </xsl:if>
  225. </filters>
  226. </eventManagementServiceSpecification>
  227. </xts:transform>
  228. </bus:value>
  229. </bus:specification>
  230. </specification>
  231. <parameters>
  232. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]"/>
  233. </parameters>
  234. <options>
  235. <bus:options SOAP-ENC:arrayType="bus:option[]" xsi:type="SOAP-ENC:Array">
  236. <item xsi:type="bus:asynchOptionInt">
  237. <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
  238. <bus:value xsi:type="xsd:int">0</bus:value>
  239. </item>
  240. <item xsi:type="bus:pagingOptionInt">
  241. <bus:name xsi:type="bus:pagingOptionEnum">maximumObjects</bus:name>
  242. <bus:value xsi:type="xsd:int"><xsl:value-of select="$linesPerPage"/></bus:value>
  243. </item>
  244. </bus:options>
  245. </options>
  246. </async:asyncRequest>
  247. </send:request>
  248. </xts:append>
  249. </xts:sequence>
  250. </xsl:template>
  251. </xsl:stylesheet>
  252. </xts:block>
  253. <!-- Merge the tenantNames into the response -->
  254. <xts:block processor="XSLT" type="exec" mandatory="false"
  255. path="/portal/tenancy/mergeTenantNames.xslt"
  256. id="mergeTenantNames"
  257. dependency="getUpcomingActivities"
  258. condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
  259. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  260. </xts:block>
  261. <xts:block id="getActivityHistories" dependency="getUpcomingActivities" nodelist="asyncRequestResponse, header, session" type="exec" mode="interpret" processor="XSLT">
  262. <xts:logicsheet path="cogadmin/logicsheets/schedule.xslt"/>
  263. <xts:logicsheet path="cogadmin/logicsheets/buslogic.xslt"/>
  264. <xsl:stylesheet version="1.0"
  265. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  266. xmlns:exslt="http://exslt.org/sets"
  267. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  268. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  269. xmlns:sch="http://developer.cognos.com/schemas/xts/schedule"
  270. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  271. exclude-result-prefixes="xsl xts exslt cm xsi">
  272. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  273. <xsl:template match="/">
  274. <!-- Variables for by sch:queryHistoriesFromScheduledActvities -->
  275. <xsl:variable name="searchPath" select="exslt:distinct(/root/asyncRequestResponse/response/*[local-name()='runSpecificationResponse']/result/details/*[contains(@xsi:type,':asynchDetailEventRecord')]/runnable/*/searchPath/value)"/>
  276. <xsl:variable name="noHistoryMsgForLastExcutionTime"><xsl:text><xts:string id="IDS_ADM_SCHEDULE_LAST_EXECUTION_NO_HISTORY"/></xsl:text></xsl:variable>
  277. <xsl:variable name="maxHistoryObjects">1</xsl:variable>
  278. <xts:sequence>
  279. <sch:queryHistoriesFromScheduledActvities/>
  280. </xts:sequence>
  281. </xsl:template>
  282. </xsl:stylesheet>
  283. </xts:block>
  284. <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT">
  285. <xsl:stylesheet version="1.0"
  286. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  287. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  288. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  289. exclude-result-prefixes="xsl xts xos xtsext">
  290. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  291. <xsl:template match="/">
  292. <xts:sequence>
  293. <xts:append select="/root/output">
  294. <xos:part>
  295. <xos:entityHeader>
  296. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  297. </xos:entityHeader>
  298. <xos:entityBody>
  299. <fragment>
  300. <info>
  301. <title><xts:string id="IDS_UAC_TITLE"/></title>
  302. </info>
  303. <preferredTitle>
  304. <xts:string id="IDS_UAC_TITLE"/>
  305. </preferredTitle>
  306. <meta>
  307. <customProperties name="personalOnly">
  308. <datatype>xs:boolean</datatype>
  309. <default>
  310. <value>false</value>
  311. </default>
  312. <control appearance="hidden" />
  313. <validate>
  314. <name>fixed</name>
  315. <rule>
  316. <type>
  317. <boolean/>
  318. </type>
  319. </rule>
  320. </validate>
  321. </customProperties>
  322. <transientProperties name="timestamp">
  323. <validate>
  324. <name>timestamp</name>
  325. <ruleRef id="fragment-cogadmin:timestamp"/>
  326. </validate>
  327. </transientProperties>
  328. <transientProperties name="upcoming_filter_status">
  329. <validate>
  330. <name>upcoming_filter_status</name>
  331. <ruleRef id="fragment-cogadmin:filter_status"/>
  332. </validate>
  333. </transientProperties>
  334. <transientProperties name="upcoming_filter_status_dsp">
  335. <validate>
  336. <name>upcoming_filter_status_dsp</name>
  337. <ruleRef id="fragment-cogadmin:filterDisplayName"/>
  338. </validate>
  339. </transientProperties>
  340. <transientProperties name="upcoming_filter_type">
  341. <validate>
  342. <name>upcoming_filter_type</name>
  343. <ruleRef id="fragment-cogadmin:filter_type"/>
  344. </validate>
  345. </transientProperties>
  346. <transientProperties name="upcoming_filter_type_dsp">
  347. <validate>
  348. <name>upcoming_filter_type_dsp</name>
  349. <ruleRef id="fragment-cogadmin:filterDisplayName"/>
  350. </validate>
  351. </transientProperties>
  352. <transientProperties name="upcoming_filter_scope">
  353. <validate>
  354. <name>upcoming_filter_scope</name>
  355. <ruleRef id="fragment-cogadmin:filter_scope"/>
  356. </validate>
  357. </transientProperties>
  358. <transientProperties name="upcoming_filter_scope_dsp">
  359. <validate>
  360. <name>upcoming_filter_scope_dsp</name>
  361. <ruleRef id="fragment-cogadmin:filterDisplayName"/>
  362. </validate>
  363. </transientProperties>
  364. <transientProperties name="upcoming_filter_date">
  365. <validate>
  366. <name>upcoming_filter_date</name>
  367. <ruleRef id="fragment-cogadmin:filter_date"/>
  368. </validate>
  369. </transientProperties>
  370. <transientProperties name="upcoming_filter_priority">
  371. <validate>
  372. <name>upcoming_filter_priority</name>
  373. <ruleRef id="fragment-cogadmin:filter_priority"/>
  374. </validate>
  375. </transientProperties>
  376. <transientProperties name="upcoming_filter_tenantid">
  377. <validate>
  378. <name>upcoming_filter_tenantid</name>
  379. <ruleRef id="fragment-cogadmin:filter_tenantid"/>
  380. </validate>
  381. </transientProperties>
  382. <transientProperties name="upcoming_filter_tenantidName">
  383. <validate>
  384. <name>upcoming_filter_tenantidName</name>
  385. <ruleRef id="fragment-cogadmin:filter_tenantid"/>
  386. </validate>
  387. </transientProperties>
  388. <transientProperties name="upcoming_filter_scheduled_by">
  389. <validate>
  390. <name>upcoming_filter_scheduled_by</name>
  391. <ruleRef id="fragment-cogadmin:user"/>
  392. </validate>
  393. </transientProperties>
  394. <transientProperties name="upcoming_filter_scheduled_by_dsp">
  395. <validate>
  396. <name>upcoming_filter_scheduled_by_dsp</name>
  397. <ruleRef id="fragment-cogadmin:filterDisplayName"/>
  398. </validate>
  399. </transientProperties>
  400. <transientProperties name="upcoming_filter_owned_by">
  401. <validate>
  402. <name>upcoming_filter_owned_by</name>
  403. <ruleRef id="fragment-cogadmin:user"/>
  404. </validate>
  405. </transientProperties>
  406. <transientProperties name="upcoming_filter_owned_by_dsp">
  407. <validate>
  408. <name>upcoming_filter_owned_by_dsp</name>
  409. <ruleRef id="fragment-cogadmin:filterDisplayName"/>
  410. </validate>
  411. </transientProperties>
  412. <transientProperties name="upcoming_filter_granularity">
  413. <validate>
  414. <name>upcoming_filter_granularity</name>
  415. <ruleRef id="fragment-cogadmin:granularity"/>
  416. </validate>
  417. </transientProperties>
  418. <globalValidator>
  419. <parameter>
  420. <name>sort_order</name>
  421. <ruleRef id="fragment-cogadmin:sort_order"/>
  422. </parameter>
  423. </globalValidator>
  424. <requiredCapabilities>canUseScheduling canUseMonitorActivityTool or</requiredCapabilities>
  425. </meta>
  426. </fragment>
  427. </xos:entityBody>
  428. </xos:part>
  429. </xts:append>
  430. </xts:sequence>
  431. </xsl:template>
  432. </xsl:stylesheet>
  433. </xts:block>
  434. <!--
  435. Renders the HTML
  436. -->
  437. <xts:block id="renderMarkup" dependency="frag_init getMeta getUpcomingActivities getActivityHistories getRunnableInfo" nodelist="asyncRequestResponse, activityHistory, env, runnables" type="exec" mode="interpret" processor="XSLT">
  438. <xsl:stylesheet version="1.0"
  439. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  440. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  441. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  442. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  443. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  444. xmlns:val="http://developer.cognos.com/schemas/validator/1/"
  445. xmlns:fragment="urn:cognos:fragments:validator"
  446. xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
  447. exclude-result-prefixes="xsl xts SOAP-ENV xos bus xtsext">
  448. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  449. <xsl:variable name="chartUrl">
  450. <xsl:choose>
  451. <xsl:when test="/root/env/param[@name='personalOnly'] = 'true'">
  452. <xsl:value-of select="'/cogadminFragments/upcomingactivitieschart?personalOnly=true'"/>
  453. </xsl:when>
  454. <xsl:otherwise>
  455. <xsl:value-of select="'/cogadminFragments/upcomingactivitieschart'"/>
  456. </xsl:otherwise>
  457. </xsl:choose>
  458. </xsl:variable>
  459. <xsl:template match="/">
  460. <xts:sequence>
  461. <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
  462. <state>
  463. <xsl:variable name="state">
  464. <xsl:if test="/root/asyncRequestResponse">
  465. <xsl:text>&lt;param name="web64conversation"&gt;</xsl:text>
  466. <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/conversation))"/>
  467. <xsl:text>&lt;/param&gt;</xsl:text>
  468. <xsl:text>&lt;param name="tracking"&gt;</xsl:text>
  469. <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/tracking))"/>
  470. <xsl:text>&lt;/param&gt;</xsl:text>
  471. </xsl:if>
  472. <xsl:text>&lt;param name="personalOnly"&gt;</xsl:text>
  473. <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='personalOnly']))"/>
  474. <xsl:text>&lt;/param&gt;</xsl:text>
  475. </xsl:variable>
  476. <xsl:value-of select="xtsext:base64encode($state,true())"/>
  477. </state>
  478. <markup>
  479. <mimeType>text/html</mimeType>
  480. <markupXml>
  481. <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
  482. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  483. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  484. <root>
  485. <!-- Generate UI markup using the response and metadata -->
  486. <xts:transform src="/cogadmin/transforms/gen-ui-markup/activities_upcoming.xslt" processor="XSLT">
  487. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  488. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
  489. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  490. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/filters.xslt</xts:param>
  491. <root>
  492. <xts:queryNode select="/root/asyncRequestResponse | /root/env | /root/system | /root/user | /root/session | /root/runnables | /root/activityHistory"/>
  493. </root>
  494. </xts:transform>
  495. <xts:queryNode select="/root/system | /root/user | /root/env"/>
  496. </root>
  497. </xts:transform>
  498. </markupXml>
  499. </markup>
  500. <subfragment id="cogadminChart" href="{$chartUrl}"/>
  501. </xts:append>
  502. </xts:sequence>
  503. </xsl:template>
  504. </xsl:stylesheet>
  505. </xts:block>
  506. </xts:morphlet>