create.xts 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2009
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. ===============================================================================================
  10. Creates an agent in CM based on parameters passed in.
  11. Structure:
  12. AgentDefinition (createAgentDefinition) _______ agentTaskDefinition(createAgentTaskDefinitions) _______ N x AgentActions
  13. Agent(AgentDefinition) is what takes the schedule - and also holds the condition for the agent
  14. AgentTaskDefinition is the definition of the actions for the agent
  15. ===============================================================================================
  16. -->
  17. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" requiredCapability="canUseEventStudio">
  18. <!--
  19. ================================================================================
  20. decodeAgentDefinition
  21. a block which takes all the saved actions in the index and expands them into individual blocks
  22. ===============================================================================================
  23. -->
  24. <xts:block id="decodeAgentDefinition" processor="XSLT" type="exec">
  25. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  26. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  27. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" exclude-result-prefixes="xsl bus SOAP-ENV SOAP-ENC xsd form">
  28. <xsl:template match="/root">
  29. <xts:sequence>
  30. <xts:append>
  31. <xts:transform src="ags/iFrmCmd/common/decodeAgentDefinition.xslt" processor="XSLT">
  32. <root>
  33. <xts:transform src="ags/iFrmCmd/common/decodeAgentDefinitionBlob.xslt" processor="XSLT">
  34. <root>
  35. <xsl:if test="/root/command/*/form:env/form:param[@name='agent_definition_blob']">
  36. <agent_definition_blob>
  37. <xsl:value-of select="/root/command/*/form:env/form:param[@name='agent_definition_blob']"/>
  38. </agent_definition_blob>
  39. </xsl:if>
  40. </root>
  41. </xts:transform>
  42. <!-- copy in the environment too - don't want it namespaced -->
  43. <xsl:for-each select="/root/command/*/form:env/form:param">
  44. <param name="{@name}">
  45. <xsl:value-of select="."/>
  46. </param>
  47. </xsl:for-each>
  48. </root>
  49. </xts:transform>
  50. </xts:append>
  51. </xts:sequence>
  52. </xsl:template>
  53. </xsl:stylesheet>
  54. </xts:block>
  55. <!--
  56. ================================================================================
  57. decodeReportOptions
  58. A helper block to expand the report options and place them under /root/agent_item
  59. The reportOptions node is stripped out to make '/root/agent_item/options' which can then be saved to CM
  60. ================================================================================
  61. -->
  62. <xts:block id="decodeReportAndContentOptions" dependency="decodeAgentDefinition" path="/ags/iFrmCmd/common/decodeReportOptions.xslt" processor="XSLT" type="exec" mandatory="false" condition=".[/root/agent_item[@type='report'] or /root/agent_item[@type='content'] or /root/agent_item[@type='index']]">
  63. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  64. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  65. <xts:logicsheet path="logicsheets/portal.xsl"/>
  66. </xts:block>
  67. <!--
  68. ================================================================================
  69. extract and clean up the parameters for cm
  70. ===============================================================================================
  71. -->
  72. <xts:block id="extractTaskParams" path= "/ags/iFrmCmd/common/extractTaskParams.xslt" dependency="decodeReportAndContentOptions" processor="XSLT" type="exec" mode="interpret"/>
  73. <!--
  74. ===============================================================================================
  75. doOverwriteAgent
  76. A block which removes(deletes) the old agent - ready for it to be recreated later on
  77. ===============================================================================================
  78. -->
  79. <xts:block id="doOverwriteAgent" dependency="extractTaskParams" processor="XSLT" type="exec">
  80. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  81. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/">
  82. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  83. <!-- global application variables -->
  84. <xsl:template match="/">
  85. <xsl:apply-templates select="root/command/form:create/form:env"/>
  86. </xsl:template>
  87. <xsl:template match="form:env">
  88. <xsl:if test="form:param[@name='overwrite']">
  89. <xts:sequence>
  90. <xts:append>
  91. <send:request provider="xts">
  92. <xsl:element name="delete" namespace="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/">
  93. <!-- we could pass everything through but we wont - only need the path to the agent -->
  94. <env xmlns="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/">
  95. <param>
  96. <xsl:attribute name="name"><xsl:text>agent_path</xsl:text></xsl:attribute>
  97. <xsl:value-of select="concat(form:param[@name='m_p_path'], '/agentDefinition[@name=&quot;', form:param[@name='m_p_defaultName'], '&quot;]')"/>
  98. </param>
  99. </env>
  100. </xsl:element>
  101. </send:request>
  102. </xts:append>
  103. </xts:sequence>
  104. </xsl:if>
  105. </xsl:template>
  106. </xsl:stylesheet>
  107. </xts:block>
  108. <!--
  109. ===============================================================================================
  110. doCreateAgent
  111. A block to take care of the creation of the Agent - this is an agentDefinition Object in CM
  112. ===============================================================================================
  113. -->
  114. <xts:block id="doCreateAgentDefinition" dependency="doOverwriteAgent" processor="XSLT" type="exec">
  115. <xts:logicsheet path="ags/logicsheets/cm-save.xsl"/>
  116. <xts:logicsheet path="logicsheets/portal.xsl"/>
  117. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  118. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cms xts send cm pf form xtsext">
  119. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  120. <pf:variables/>
  121. <!-- global application variables -->
  122. <xsl:template match="/">
  123. <xsl:apply-templates select="root/command/form:create/form:env"/>
  124. </xsl:template>
  125. <xsl:template match="form:env">
  126. <!-- this is the class of the new object -->
  127. <xts:sequence>
  128. <!-- prepare and send the add request -->
  129. <xts:append select="/root">
  130. <agentDefinition>
  131. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  132. <send:request provider="cm" requester="AGS:create">
  133. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  134. <cm:add>
  135. <cm:search>
  136. <xsl:value-of select="form:param[@name='m_p_path']"/>
  137. </cm:search>
  138. <cm:objects>
  139. <cm:agentDefinition>
  140. <!-- apply templates to define the screen tips and descriptions -->
  141. <xsl:apply-templates/>
  142. <!-- set the sequencing - this is part of the agent_definition -->
  143. <cm:sequencing>
  144. <xsl:value-of select="/root/agent_definition/sequencing"/>
  145. </cm:sequencing>
  146. <cm:allowNotification>
  147. <xsl:value-of select="/root/agent_definition/allowNotification"/>
  148. </cm:allowNotification>
  149. <!-- have to store the event key items -->
  150. <cm:eventKey>
  151. <xsl:call-template name="build_keyItems">
  152. <xsl:with-param name="keyItems">
  153. <xsl:value-of select="/root/agent_definition/summaryEventKey"/>
  154. </xsl:with-param>
  155. </xsl:call-template>
  156. </cm:eventKey>
  157. <!-- set the default retention for the agentDefinition -->
  158. <!--<cm:retentions>
  159. <cm:retentionRule>
  160. <xsl:attribute name="objectClass"><xsl:text>history</xsl:text></xsl:attribute>
  161. <xsl:attribute name="prop"><xsl:text>creationTime</xsl:text></xsl:attribute>
  162. <xsl:attribute name="maxObjects"><xsl:text>5</xsl:text></xsl:attribute>
  163. </cm:retentionRule>
  164. </cm:retentions>-->
  165. <!-- create the default agent options -->
  166. <cm:options>
  167. <xsl:copy-of select="/root/agent_definition/agentOptions/options/value"/>
  168. </cm:options>
  169. </cm:agentDefinition>
  170. </cm:objects>
  171. <cm:options>
  172. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  173. </cm:options>
  174. </cm:add>
  175. </xts:transform>
  176. </send:request>
  177. </xts:transform>
  178. </agentDefinition>
  179. </xts:append>
  180. </xts:sequence>
  181. </xsl:template>
  182. <!-- template to create an item - and alter the name of the object -->
  183. <xsl:template match="form:param[starts-with(@name,'m_p_')]">
  184. <!-- create an element for each property passed in -->
  185. <xsl:element name="{substring-after(@name, 'm_p_')}" xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  186. <!-- name is the on CM property that must be encoded *before* giving to CM -->
  187. <xsl:value-of select="."/>
  188. </xsl:element>
  189. </xsl:template>
  190. <cms:prop-save/>
  191. <xsl:template match="text()"/>
  192. <!-- template to make the key items into something which pre-process can make -->
  193. <cms:build_keyItems/>
  194. </xsl:stylesheet>
  195. </xts:block>
  196. <!--
  197. ===============================================================================================
  198. doCreateAgentDefinitionReport
  199. A block which creates the report which provides the datasource for the agent. This is a subObject of the agentDefinition
  200. ===============================================================================================
  201. -->
  202. <xts:block id="doCreateAgentDefinitionReport" dependency="doCreateAgentDefinition" processor="XSLT" type="exec">
  203. <xts:logicsheet path="ags/logicsheets/cm-save.xsl"/>
  204. <xts:logicsheet path="logicsheets/portal.xsl"/>
  205. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  206. <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
  207. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsad="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agentDefinition/" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cms xts send cm pf form xtsext">
  208. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  209. <pf:variables/>
  210. <!-- global application variables -->
  211. <xsl:template match="/">
  212. <xsl:apply-templates select="root/command/form:create/form:env"/>
  213. </xsl:template>
  214. <xsl:template match="form:env">
  215. <xsl:variable name="env" select="/root/command/form:create/form:env"/>
  216. <xts:sequence>
  217. <!-- prepare and send the add request -->
  218. <xts:append select="/root">
  219. <agentDefinitionReport>
  220. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  221. <send:request provider="cm" requester="AGS:create">
  222. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  223. <cm:add>
  224. <cm:search>
  225. <!-- attach the schedule onto the anget - not the report -->
  226. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  227. </cm:search>
  228. <cm:objects>
  229. <cm:report>
  230. <xsl:call-template name="addDefaultDescription"/>
  231. <cm:specification>
  232. <xsl:value-of select="form:param[@name='inlineSpec']"/>
  233. </cm:specification>
  234. <cm:metadataModel>
  235. <cm:model>
  236. <cm:searchPath>
  237. <!-- put the path to the model spec in -->
  238. <xsl:value-of select="form:param[@name='metaModel']"/>
  239. </cm:searchPath>
  240. </cm:model>
  241. </cm:metadataModel>
  242. <cm:metadataModelPackage>
  243. <cm:package>
  244. <cm:searchPath>
  245. <xsl:value-of select="substring-before(form:param[@name='metaModel'],'/model[')"/>
  246. </cm:searchPath>
  247. </cm:package>
  248. </cm:metadataModelPackage>
  249. </cm:report>
  250. </cm:objects>
  251. <cm:options>
  252. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  253. </cm:options>
  254. </cm:add>
  255. </xts:transform>
  256. </send:request>
  257. </xts:transform>
  258. </agentDefinitionReport>
  259. </xts:append>
  260. </xts:sequence>
  261. </xsl:template>
  262. <!-- template to create the default description for the agent condition report-->
  263. <xsl:template name="addDefaultDescription">
  264. <!-- create an element for each property passed in -->
  265. <xsl:element name="defaultDescription" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  266. <!-- transform the condition -->
  267. <xsl:call-template name="conditionDisplayLogic">
  268. <xsl:with-param name="p1">
  269. <xsl:value-of select="/root/agent_definition/condition/text()"/>
  270. </xsl:with-param>
  271. </xsl:call-template>
  272. </xsl:element>
  273. </xsl:template>
  274. <cms:prop-save/>
  275. <agsad:conditionDisplayLogic/>
  276. <xsl:template match="text()"/>
  277. </xsl:stylesheet>
  278. </xts:block>
  279. <!--
  280. ===============================================================================================
  281. replaceScheduleCredentials - Replace exisitng credentials with current credentials. This is becuase we need to have the
  282. Credentials correct at save time.
  283. ===============================================================================================
  284. -->
  285. <xts:block id="replaceScheduleCredentials" type="exec" path="/ags/iFrmCmd/common/replaceScheduleCredentials.xslt" mode="interpret" processor="XSLT" dependency="doCreateAgentDefinitionReport" condition=".[/root/scheduleParameters]" mandatory="false">
  286. <!-- portal specific information-->
  287. <xts:logicsheet path="logicsheets/portal.xsl"/>
  288. <!-- Dialog specific logicsheets -->
  289. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  290. </xts:block>
  291. <!--
  292. ===============================================================================================
  293. doCreateAgentSchedule
  294. A block to take care of the creation of the schedule which needs to be added to the Agent
  295. ===============================================================================================
  296. -->
  297. <xts:block id="doCreateAgentSchedule" dependency="doCreateAgentDefinition replaceScheduleCredentials" processor="XSLT" type="exec">
  298. <xts:logicsheet path="portal/iFrmCmd/logicsheets/cm-save.xsl"/>
  299. <xts:logicsheet path="logicsheets/portal.xsl"/>
  300. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  301. <xsl:stylesheet version="1.0"
  302. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  303. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  304. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  305. xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
  306. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  307. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  308. xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/"
  309. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  310. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  311. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  312. exclude-result-prefixes="xsl SOAP-ENC xsi cms send cm form bus xtsext pf">
  313. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  314. <pf:variables/>
  315. <xsl:key name="params" match="/root/command/*/form:env/form:param" use="@name"/>
  316. <xsl:template match="/">
  317. <xsl:if test="key('params','AgentTask-schedule')">
  318. <xts:sequence>
  319. <xts:append select="/root">
  320. <agentSchedule>
  321. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  322. <send:request provider="cm" requester="AGS:create">
  323. <bus:add>
  324. <search xsi:type="xsd:string">
  325. <!-- attach the schedule onto the anget - not the report -->
  326. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  327. </search>
  328. <!--objects xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:baseClass[1]">
  329. <xsl:copy-of select="/root/scheduleParameters/*"/>
  330. </objects-->
  331. <objects xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:baseClass[1]">
  332. <item xsi:type="bus:schedule">
  333. <xsl:copy-of select="/root/scheduleParameters/*[local-name()='item']/*"/>
  334. </item>
  335. </objects>
  336. </bus:add>
  337. </send:request>
  338. </xts:transform>
  339. </agentSchedule>
  340. </xts:append>
  341. </xts:sequence>
  342. </xsl:if>
  343. </xsl:template>
  344. <!-- pull in any templates to handle "special" properties on CM objects -->
  345. <cms:prop-save/>
  346. <xsl:template match="text()"/>
  347. </xsl:stylesheet>
  348. </xts:block>
  349. <!--
  350. a block which decodes the information email options
  351. ==============================================================================================
  352. -->
  353. <xts:block id="decodeTaskOptions" path="/ags/iFrmCmd/common/decodeTaskOptions.xslt" dependency="doCreateAgentDefinition" processor="XSLT" type="exec" condition="/root/agent_item" mandatory="false">
  354. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  355. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  356. </xts:block>
  357. <!--
  358. ================================================================================
  359. doCreateAgentSubObjects
  360. a block which creates all the subobjects which are allowed to be under the agent - sqlTask/WebTask
  361. ===============================================================================================
  362. -->
  363. <xts:block id="doCreateAgentSubObjects" dependency="decodeTaskOptions" processor="XSLT" type="exec" condition="/root/agent_item" mandatory="false">
  364. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  365. <xts:logicsheet path="ags/logicsheets/agsCmHelper.xsl"/>
  366. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  367. <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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" xmlns:agsh="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agsCmHelper/" exclude-result-prefixes="send xtsext form agsh">
  368. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  369. <xsl:template match="/">
  370. <xts:sequence>
  371. <xsl:for-each select="/root/agent_definition/items/item">
  372. <xsl:variable name="id" select="./id"/>
  373. <xsl:choose>
  374. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'sql'">
  375. <xts:append select="/root/agent_item[@id = '{$id}']">
  376. <agentTaskTarget>
  377. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  378. <send:request provider="cm" requester="AGS:create">
  379. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  380. <cm:add xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  381. <cm:objects>
  382. <cm:storedProcedureTask>
  383. <cm:searchPath>
  384. <!-- put the search path which was returned from the creation of the agentDefinition -->
  385. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  386. </cm:searchPath>
  387. <!-- give the memo the name of the task -->
  388. <cm:defaultName>
  389. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  390. </cm:defaultName>
  391. <cm:storedProcedureName>
  392. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='sql_procedure_name']"/>
  393. </cm:storedProcedureName>
  394. <cm:metadataModel>
  395. <cm:model>
  396. <cm:searchPath>
  397. <!-- put the path to the model spec in -->
  398. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='sql_model']"/>
  399. </cm:searchPath>
  400. </cm:model>
  401. </cm:metadataModel>
  402. <cm:metadataModelPackage>
  403. <cm:package>
  404. <cm:searchPath>
  405. <!-- put the path to the model spec in -->
  406. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='sql_package']"/>
  407. </cm:searchPath>
  408. </cm:package>
  409. </cm:metadataModelPackage>
  410. <!-- just copy the options that we've got -->
  411. <xsl:copy-of select="/root/agent_item[@id = $id]/options"/>
  412. </cm:storedProcedureTask>
  413. </cm:objects>
  414. <cm:options>
  415. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  416. </cm:options>
  417. </cm:add>
  418. </xts:transform>
  419. </send:request>
  420. </xts:transform>
  421. </agentTaskTarget>
  422. </xts:append>
  423. </xsl:when>
  424. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'web'">
  425. <xts:append select="/root/agent_item[@id = '{$id}']">
  426. <agentTaskTarget>
  427. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  428. <send:request provider="cm" requester="AGS:create">
  429. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  430. <cm:add xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  431. <cm:objects>
  432. <cm:webServiceTask>
  433. <cm:searchPath>
  434. <!-- put the search path which was returned from the creation of the agentDefinition -->
  435. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  436. </cm:searchPath>
  437. <!-- give the memo the name of the task -->
  438. <cm:defaultName>
  439. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  440. </cm:defaultName>
  441. <cm:uri>
  442. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='url_wsdl']"/>
  443. </cm:uri>
  444. <cm:operationName>
  445. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='url_operation']"/>
  446. </cm:operationName>
  447. <cm:serviceName>
  448. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='url_serviceName']"/>
  449. </cm:serviceName>
  450. <cm:inputMessageName/>
  451. <cm:outputMessageName/>
  452. <cm:bindingName>
  453. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='url_port']"/>
  454. </cm:bindingName>
  455. <!-- just copy the options that we've got -->
  456. <xsl:copy-of select="/root/agent_item[@id = $id]/options"/>
  457. </cm:webServiceTask>
  458. </cm:objects>
  459. <cm:options>
  460. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  461. </cm:options>
  462. </cm:add>
  463. </xts:transform>
  464. </send:request>
  465. </xts:transform>
  466. </agentTaskTarget>
  467. </xts:append>
  468. </xsl:when>
  469. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'url'">
  470. <!-- only create a url for the url objects -->
  471. <xts:append select="/root/agent_item[@id = '{$id}']">
  472. <agentTaskTarget>
  473. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  474. <send:request provider="cm" requester="AGS:create">
  475. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  476. <cm:add xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  477. <cm:objects>
  478. <xsl:call-template name="rssTaskObject">
  479. <xsl:with-param name="task" select="/root/agent_item[@id = $id]"/>
  480. <!-- put the search path which was returned from the creation of the agentDefinition -->
  481. <xsl:with-param name="path" select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  482. <xsl:with-param name="name" select="/root/agent_definition/items/item[./id=$id]/name"/>
  483. </xsl:call-template>
  484. </cm:objects>
  485. <cm:options>
  486. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  487. </cm:options>
  488. </cm:add>
  489. </xts:transform>
  490. </send:request>
  491. </xts:transform>
  492. </agentTaskTarget>
  493. </xts:append>
  494. </xsl:when>
  495. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'message' ">
  496. <xts:append select="/root/agent_item[@id = '{$id}']">
  497. <agentTaskTarget>
  498. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  499. <send:request provider="cm" requester="AGS:create">
  500. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  501. <cm:add xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  502. <cm:objects>
  503. <cm:memo>
  504. <cm:searchPath>
  505. <!-- put the search path which was returned from the creation of the agentDefinition -->
  506. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  507. </cm:searchPath>
  508. <!-- give the memo the name of the task -->
  509. <cm:defaultName>
  510. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  511. </cm:defaultName>
  512. <!-- just copy the options that we've got -->
  513. <xsl:copy-of select="/root/agent_item[@id=$id]/options"/>
  514. </cm:memo>
  515. </cm:objects>
  516. <cm:options>
  517. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  518. </cm:options>
  519. </cm:add>
  520. </xts:transform>
  521. </send:request>
  522. </xts:transform>
  523. </agentTaskTarget>
  524. </xts:append>
  525. </xsl:when>
  526. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'notification' or /root/agent_definition/items/item[./id = $id]/type = 'approval' ">
  527. <xsl:variable name="taskIconPath"><xsl:value-of select="/root/agent_item[@id =$id]/taskOptions//*[local-name()='manualTask']/*[local-name()='taskIconPath']"/></xsl:variable>
  528. <xsl:if test="$taskIconPath=''">
  529. <xts:replace select="/root/agent_item[@id = '{$id}']/taskOptions//*[local-name()='manualTask']/*[local-name()='taskIconPath']">
  530. <taskIconPath>
  531. <xsl:call-template name="getHumanTaskIcon">
  532. <xsl:with-param name="item" select="/root/agent_definition/items/item[./id = $id]"/>
  533. </xsl:call-template>
  534. </taskIconPath>
  535. </xts:replace>
  536. </xsl:if>
  537. <!-- only create a url for the url objects -->
  538. <xts:append select="/root/agent_item[@id = '{$id}']">
  539. <agentTaskTarget>
  540. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  541. <send:request provider="cm" requester="AGS:create">
  542. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  543. <cm:add xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  544. <cm:objects>
  545. <cm:humanTask>
  546. <cm:searchPath>
  547. <!-- put the search path which was returned from the creation of the agentDefinition -->
  548. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath"/>
  549. </cm:searchPath>
  550. <!-- give the memo the name of the task -->
  551. <cm:defaultName>
  552. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  553. </cm:defaultName>
  554. <!-- set the icon URI - this should alter the icon in the portal -->
  555. <xsl:choose>
  556. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'notification'">
  557. <cm:iconURI>./ps/portal/images/icon_notification.gif</cm:iconURI>
  558. </xsl:when>
  559. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'approval'">
  560. <cm:iconURI>./ps/portal/images/icon_approval_task.gif</cm:iconURI>
  561. </xsl:when>
  562. </xsl:choose>
  563. <!-- set the type of the task into the object - we need to know what type to resurrect it -->
  564. <cm:operationName>
  565. <xsl:value-of select="/root/agent_definition/items/item[./id = $id]/type"/>
  566. </cm:operationName>
  567. <cm:parameters>
  568. <cm:parameterValue>
  569. <cm:name>hts</cm:name>
  570. <cm:simpleParmValueItem>
  571. <cm:inclusive>false</cm:inclusive>
  572. <cm:display>hts</cm:display>
  573. <cm:use>
  574. <xts:transform name="XMLEncode">
  575. <xts:transform src="ags/transforms/getChildren.xslt" processor="XSLT">
  576. <xsl:copy-of select="/root/agent_item[@id = $id]/taskOptions"/>
  577. </xts:transform>
  578. </xts:transform>
  579. </cm:use>
  580. </cm:simpleParmValueItem>
  581. </cm:parameterValue>
  582. </cm:parameters>
  583. </cm:humanTask>
  584. </cm:objects>
  585. </cm:add>
  586. </xts:transform>
  587. </send:request>
  588. </xts:transform>
  589. </agentTaskTarget>
  590. </xts:append>
  591. </xsl:when>
  592. </xsl:choose>
  593. </xsl:for-each>
  594. </xts:sequence>
  595. </xsl:template>
  596. <!--write a template to create the rss objects -->
  597. <agsh:rssTaskObject/>
  598. <xsl:template name="getHumanTaskIcon">
  599. <xsl:param name="item"/>
  600. <xsl:choose>
  601. <xsl:when test="$item/type = 'notification'">
  602. <xsl:text>ps/portal/images/icon_notification.gif</xsl:text>
  603. </xsl:when>
  604. <xsl:when test="$item/type = 'approval'">
  605. <xsl:text>ps/portal/images/icon_approval_task.gif</xsl:text>
  606. </xsl:when>
  607. </xsl:choose>
  608. </xsl:template>
  609. </xsl:stylesheet>
  610. </xts:block>
  611. <!--
  612. ===============================================================================================
  613. doCreateAgentTasks
  614. A block which creates the report steps associated with the report actions
  615. ===============================================================================================
  616. -->
  617. <xts:block id="doCreateAgentTasks" dependency="doCreateAgentDefinitionReport doCreateAgentSchedule doCreateAgentSubObjects" processor="XSLT" type="exec" condition="/root/agent_item" mandatory="false">
  618. <xts:logicsheet path="ags/logicsheets/cm-save.xsl"/>
  619. <xts:logicsheet path="logicsheets/portal.xsl"/>
  620. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  621. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtscm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:x="x" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xtscm cms form send pf bus x SOAP-ENC xts xtsext">
  622. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  623. <!-- Handle any agentTaskDefinition adds that are required -->
  624. <pf:variables/>
  625. <xsl:template match="/">
  626. <xsl:variable name="env" select="/root/command/form:create/form:env"/>
  627. <xts:sequence>
  628. <xsl:for-each select="/root/agent_definition/items/item">
  629. <xsl:variable name="id" select="./id"/>
  630. <xsl:variable name="position" select="position()"/>
  631. <xts:append select="/root/agent_item[@id = '{$id}']">
  632. <agentTask>
  633. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  634. <send:request provider="cm" requester="AGS:create">
  635. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  636. <xtscm:add>
  637. <xtscm:objects>
  638. <xtscm:agentTaskDefinition>
  639. <xtscm:searchPath>
  640. <!-- put the search path which was returned from the creation of the agentDefinition -->
  641. <xsl:value-of select="/root/agentDefinition/xtscm:addResponse/xtscm:agentDefinition/xtscm:searchPath"/>
  642. </xtscm:searchPath>
  643. <!-- we can save the taskName too -->
  644. <xtscm:defaultName>
  645. <xsl:choose>
  646. <xsl:when test="./type='sql' or ./type='web' or ./type='url' or ./type='message' or ./type='approval' or ./type='notification' ">
  647. <xsl:value-of select="concat('Task-' , /root/agent_definition/items/item[./id=$id]/name)"/>
  648. </xsl:when>
  649. <xsl:otherwise>
  650. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  651. </xsl:otherwise>
  652. </xsl:choose>
  653. </xtscm:defaultName>
  654. <xtscm:displaySequence>
  655. <xsl:value-of select="$position"/>
  656. </xtscm:displaySequence>
  657. <xtscm:taskObject>
  658. <xsl:choose>
  659. <xsl:when test="./type = 'report'">
  660. <xtscm:report>
  661. <xtscm:searchPath>
  662. <!-- put the path into the report that we selected as the action -->
  663. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  664. </xtscm:searchPath>
  665. </xtscm:report>
  666. </xsl:when>
  667. <xsl:when test="./type='sql'">
  668. <xtscm:storedProcedureTask>
  669. <xtscm:searchPath>
  670. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/xtscm:addResponse/xtscm:storedProcedureTask/xtscm:searchPath"/>
  671. </xtscm:searchPath>
  672. </xtscm:storedProcedureTask>
  673. </xsl:when>
  674. <xsl:when test="./type='web'">
  675. <xtscm:webServiceTask>
  676. <xtscm:searchPath>
  677. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/xtscm:addResponse/xtscm:webServiceTask/xtscm:searchPath"/>
  678. </xtscm:searchPath>
  679. </xtscm:webServiceTask>
  680. </xsl:when>
  681. <xsl:when test="./type = 'url'">
  682. <xtscm:baseRssTask>
  683. <xtscm:searchPath>
  684. <!-- put the path to the saved rss object as the path -->
  685. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/xtscm:addResponse/*/xtscm:searchPath"/>
  686. </xtscm:searchPath>
  687. </xtscm:baseRssTask>
  688. </xsl:when>
  689. <xsl:when test="./type = 'agent'">
  690. <xtscm:agentDefinition>
  691. <xtscm:searchPath>
  692. <!-- put the path into the report that we selected as the action -->
  693. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  694. </xtscm:searchPath>
  695. </xtscm:agentDefinition>
  696. </xsl:when>
  697. <xsl:when test="./type = 'job'">
  698. <xtscm:jobDefinition>
  699. <xtscm:searchPath>
  700. <!-- put the path into the report that we selected as the action -->
  701. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  702. </xtscm:searchPath>
  703. </xtscm:jobDefinition>
  704. </xsl:when>
  705. <xsl:when test="./type = 'import'">
  706. <xtscm:importDeployment>
  707. <xtscm:searchPath>
  708. <!-- put the path into import deployment -->
  709. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  710. </xtscm:searchPath>
  711. </xtscm:importDeployment>
  712. </xsl:when>
  713. <xsl:when test="./type = 'export'">
  714. <xtscm:exportDeployment>
  715. <xtscm:searchPath>
  716. <!-- put the path into export deployment -->
  717. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  718. </xtscm:searchPath>
  719. </xtscm:exportDeployment>
  720. </xsl:when>
  721. <xsl:when test="./type = 'index'">
  722. <xtscm:indexUpdateTask>
  723. <xtscm:searchPath>
  724. <!-- put the path into the index update task -->
  725. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  726. </xtscm:searchPath>
  727. </xtscm:indexUpdateTask>
  728. </xsl:when>
  729. <xsl:when test="./type = 'content'">
  730. <xtscm:contentTask>
  731. <xtscm:searchPath>
  732. <!-- put the path into the content task deployment -->
  733. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  734. </xtscm:searchPath>
  735. </xtscm:contentTask>
  736. </xsl:when>
  737. <xsl:when test="./type = 'metric'">
  738. <xtscm:baseDataIntegrationTask>
  739. <xtscm:searchPath>
  740. <!-- put the path into the metric task deployment -->
  741. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  742. </xtscm:searchPath>
  743. </xtscm:baseDataIntegrationTask>
  744. </xsl:when>
  745. <xsl:when test="./type = 'planningMacro'">
  746. <xtscm:planningMacroTask>
  747. <xtscm:searchPath>
  748. <!-- put the path into the metric task deployment -->
  749. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  750. </xtscm:searchPath>
  751. </xtscm:planningMacroTask>
  752. </xsl:when>
  753. <xsl:when test="./type = 'migration'">
  754. <xtscm:migrationTask>
  755. <xtscm:searchPath>
  756. <!-- put the path into the metric task deployment -->
  757. <xsl:value-of select="/root/agent_item[@id = $id]/param[@name='selected_path']"/>
  758. </xtscm:searchPath>
  759. </xtscm:migrationTask>
  760. </xsl:when>
  761. <xsl:when test="./type='notification' or ./type= 'approval'">
  762. <xtscm:humanTask>
  763. <xtscm:searchPath>
  764. <!-- put the path into the metric task deployment -->
  765. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/xtscm:addResponse/xtscm:humanTask/xtscm:searchPath"/>
  766. </xtscm:searchPath>
  767. </xtscm:humanTask>
  768. </xsl:when>
  769. <xsl:when test="./type='message'">
  770. <xtscm:memo>
  771. <xtscm:searchPath>
  772. <!-- put the path into the report that we selected as the action -->
  773. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/xtscm:addResponse/xtscm:memo/xtscm:searchPath"/>
  774. </xtscm:searchPath>
  775. </xtscm:memo>
  776. </xsl:when>
  777. </xsl:choose>
  778. </xtscm:taskObject>
  779. <!-- build the options - runOptions are normally in the env - the deliveryOptions are in a blob -->
  780. <xtscm:options>
  781. <!--xsl:call-template name="build_runOptions">
  782. <xsl:with-param name="env" select="/root/agent_item[@id = $id]"/>
  783. </xsl:call-template-->
  784. <!-- build the agent run options-->
  785. <xsl:variable name="taskId" select="./id"/>
  786. <xsl:variable name="agentItem" select="/root/agent_item[@id = $taskId]"/>
  787. <!--xsl:variable name="agentOptions" select="$agentItem/param[@name=starts-with(@name,'m_ao_')]"/-->
  788. <runOptions>
  789. <xsl:if test="$agentItem/options != ''">
  790. <xsl:copy-of select="$agentItem/options/*[local-name()='value']/*[local-name()='item']"/>
  791. </xsl:if>
  792. <!--xsl:for-each select="$agentOptions">
  793. <xsl:variable name="agentOptionName" select="substring-after(@name, 'm_ao_')"/>
  794. <xsl:if test="@name='m_ao_availableAsEmailAttachment'">
  795. <item xsi:type="cm:agentOptionBoolean">
  796. <name xsi:type="cm:agentOptionEnum">
  797. <xsl:value-of select="$agentOptionName"/>
  798. </name>
  799. <value xsi:type="xsd:boolean">
  800. <xsl:value-of select="."/>
  801. </value>
  802. </item>
  803. </xsl:if>
  804. </xsl:for-each-->
  805. </runOptions>
  806. </xtscm:options>
  807. <!-- can save the filter values in a real place now -->
  808. <xtscm:eventTypes>
  809. <xsl:for-each select="./suppression/param[starts-with(@name, 'Filter_')]">
  810. <xtscm:item>
  811. <xsl:value-of select="."/>
  812. </xtscm:item>
  813. </xsl:for-each>
  814. </xtscm:eventTypes>
  815. <!-- this is the query item list that filters in conjunction with Filter_changed
  816. or Filter_unchanged not well named as event key -->
  817. <xtscm:eventKey>
  818. <xsl:call-template name="build_keyItems">
  819. <xsl:with-param name="keyItems">
  820. <xsl:value-of select="./suppression/param[@name='Action_topic_filter']"/>
  821. </xsl:with-param>
  822. </xsl:call-template>
  823. </xtscm:eventKey>
  824. <xtscm:filterDataItemName>
  825. <xsl:value-of select="./taskLevelFilter"/>
  826. </xtscm:filterDataItemName>
  827. <xtscm:runCondition>
  828. <xsl:value-of select="./runCondition"/>
  829. </xtscm:runCondition>
  830. <!-- build the parameters -->
  831. <xsl:call-template name="build_parameters">
  832. <xsl:with-param name="id" select="$id"/>
  833. </xsl:call-template>
  834. <!--build the assignments prop for the agent task by id this is a bit roundabout... specially to a form used by preprocess.xslt-->
  835. <xsl:if test="/root/agent_items_params/agent_item_params[@id = $id]/parameterData/parameterAssignments">
  836. <xtscm:parameterAssignments type="cm:parameterAssignmentDataItemArrayProp">
  837. <xsl:for-each select="/root/agent_items_params/agent_item_params[@id = $id]/parameterData/parameterAssignments/parameterAssignment">
  838. <xtscm:parameterAssignmentDataItem>
  839. <xtscm:parameterName>
  840. <xsl:value-of select="./parameterName"/>
  841. </xtscm:parameterName>
  842. <xtscm:dataItemName>
  843. <xsl:value-of select="./dataItemName"/>
  844. </xtscm:dataItemName>
  845. </xtscm:parameterAssignmentDataItem>
  846. </xsl:for-each>
  847. </xtscm:parameterAssignments>
  848. </xsl:if>
  849. </xtscm:agentTaskDefinition>
  850. </xtscm:objects>
  851. <xtscm:options>
  852. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  853. <xtscm:returnProperties>
  854. <xtscm:property>storeID</xtscm:property>
  855. <xtscm:property>taskObject</xtscm:property>
  856. <xtscm:property>defaultName</xtscm:property>
  857. </xtscm:returnProperties>
  858. </xtscm:options>
  859. </xtscm:add>
  860. </xts:transform>
  861. </send:request>
  862. </xts:transform>
  863. </agentTask>
  864. </xts:append>
  865. </xsl:for-each>
  866. <xts:append>
  867. <!-- log to IPF-->
  868. <log>
  869. <xts:function name="ipflog">
  870. <xts:param name="indication">Audit.RTUsage</xts:param>
  871. <xts:param name="level">3</xts:param>
  872. <xts:param name="logData">&lt;parameters&gt;&lt;item name=&quot;email&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/agent_item//item[contains(@*[local-name()='type'],'deliveryOptionAddressSMTPArray')]/value/item))"/>]]&gt;&lt;/item&gt;&lt;item name=&quot;user&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/session/param[@name ='e_user']))"/>]]&gt;&lt;/item&gt;&lt;item name=&quot;agentpath&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/session/param[@name ='e_mrootpath']))"/>]]&gt;&lt;/item&gt;&lt;/parameters&gt;</xts:param>
  873. <xts:param name="operation">CREATE</xts:param>
  874. <xts:param name="objectPath">
  875. <xsl:value-of select="/root/agentDefinition/xtscm:addResponse/xtscm:agentDefinition/xtscm:searchPath/text()"/>
  876. </xts:param>
  877. <xts:param name="objectType">AGENTDEFINITION</xts:param>
  878. <xts:param name="status">Success</xts:param>
  879. <xts:param name="errorMessage">N/A</xts:param>
  880. </xts:function>
  881. </log>
  882. </xts:append>
  883. </xts:sequence>
  884. </xsl:template>
  885. <!-- Single template to make the parameters instead of just copying it -->
  886. <xsl:template name="build_parameters">
  887. <xsl:param name="id"/>
  888. <parameters xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  889. <xsl:for-each select="/root/agent_items_params/agent_item_params[@id = $id]/parameterData/parameterValues/item">
  890. <xsl:variable name="parameterName" select="./name"/>
  891. <!-- only copy the item if there's not a corresponding assignment -->
  892. <xsl:if test="not(/root/agent_items_params/agent_item_params[@id = $id]/parameterData/parameterAssignments/parameterAssignment[./parameterName=$parameterName])">
  893. <xsl:copy-of select="."/>
  894. </xsl:if>
  895. </xsl:for-each>
  896. </parameters>
  897. </xsl:template>
  898. <!-- pull in any templates to handle "special" properties on CM objects -->
  899. <cms:prop-save/>
  900. <xsl:template match="text()"/>
  901. <cms:build_keyItems/>
  902. </xsl:stylesheet>
  903. </xts:block>
  904. <!--
  905. ===============================================================================================
  906. doMemoHumanSubObjectsPostProcess (hack)
  907. a block which searches memo options, and humanTask parameter values and where agentReportTask tab ids are found, replaces with the storeID of
  908. the offending agentReportTask. WE don't know the dependencies now so we have to save items with task dependencies in 2 steps
  909. First - save everything - Second - update all tasks with references to other tasks and then update the object in CM
  910. ===============================================================================================
  911. -->
  912. <xts:block id="doMemoHumanSubObjectsPostProcess" dependency="doCreateAgentTasks" processor="XSLT" type="exec" condition="/root/agent_item" mandatory="false">
  913. <xts:logicsheet path="ags/logicsheets/agsCmHelper.xsl"/>
  914. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsh="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agsCmHelper/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="agsh xtsext">
  915. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  916. <xsl:template match="/">
  917. <xts:sequence>
  918. <!-- post-process all the memos -->
  919. <xsl:for-each select="/root/descendant::item[ancestor::agent_item[@type='message'] and contains(@*[local-name()='type'],'memoPartAgentObject')]">
  920. <!-- this is the hack - we need the report tab id, assume it is set in the memoPartObject -->
  921. <xsl:variable name="position" select="position()"/>
  922. <xsl:variable name="searchPath" select="searchPath"/>
  923. <xsl:variable name="agentReportTaskStoreID" select="/root/agent_item[@id=$searchPath]/agentTask/*[local-name()='addResponse']/*[local-name()='agentTaskDefinition']/*[local-name()='defaultName']"/>
  924. <!-- if we have a mapping - do the replace -->
  925. <xsl:if test="$agentReportTaskStoreID">
  926. <xts:replace xmlns:xts="http://developer.cognos.com/schemas/xts/" select="/root/descendant::item[ancestor::agent_item[@type='message'] and contains(@*[local-name()='type'],'memoPartAgentObject')][{position()}]/searchPath" mandatory="true">
  927. <searchPath>
  928. <xsl:copy-of select="$searchPath/@*"/>
  929. <xsl:value-of select="$agentReportTaskStoreID"/>
  930. </searchPath>
  931. </xts:replace>
  932. </xsl:if>
  933. </xsl:for-each>
  934. <!-- post-process all the human tasks with taskLinks -->
  935. <xsl:for-each select="/root/descendant::*[local-name()='taskLink'][ancestor::agent_item[@type='notification' or @type='approval']]">
  936. <!-- this is the hack - we need the report tab id, assume it is set in the memoPartObject -->
  937. <xsl:variable name="position" select="position()"/>
  938. <xsl:variable name="id" select="*[local-name()='id']"/>
  939. <xsl:variable name="agentReportTaskStoreID" select="/root/agent_item[@id=$id]/agentTask/*[local-name()='addResponse' or local-name()='updateResponse']/*[local-name()='agentTaskDefinition']/*[local-name()='defaultName']"/>
  940. <!-- if we have a mapping - do the replace -->
  941. <xsl:if test="$agentReportTaskStoreID">
  942. <xts:replace xmlns:xts="http://developer.cognos.com/schemas/xts/" select="/root/descendant::*[local-name()='taskLink'][ancestor::agent_item[@type='notification' or @type='approval']][{position()}]/*[local-name()='id']" mandatory="true">
  943. <impl:id xmlns:impl="http://www.ibm.com/xmlns/prod/cognos/internal/hts/_1">
  944. <xsl:copy-of select="$id/@*"/>
  945. <xsl:value-of select="$agentReportTaskStoreID"/>
  946. </impl:id>
  947. </xts:replace>
  948. </xsl:if>
  949. </xsl:for-each>
  950. <!-- post-process all the human tasks with futureTasks -->
  951. <xsl:for-each select="/root/descendant::*[local-name()='futureTask'][ancestor::agent_item[@type='notification' or @type='approval']]">
  952. <!-- this is the hack - we need the report tab id, assume it is set in the memoPartObject -->
  953. <xsl:variable name="position" select="position()"/>
  954. <xsl:variable name="id" select="*[local-name()='id']"/>
  955. <xsl:variable name="agentReportTaskStoreID" select="/root/agent_item[@id=$id]/agentTask/*[local-name()='addResponse' or local-name()='updateResponse']/*[local-name()='agentTaskDefinition']/*[local-name()='defaultName']"/>
  956. <!-- if we have a mapping - do the replace -->
  957. <xsl:if test="$agentReportTaskStoreID">
  958. <xts:replace xmlns:xts="http://developer.cognos.com/schemas/xts/" select="/root/descendant::*[local-name()='futureTask'][ancestor::agent_item[@type='notification' or @type='approval']][{position()}]/*[local-name()='id']" mandatory="true">
  959. <impl:id xmlns:impl="http://www.ibm.com/xmlns/prod/cognos/internal/hts/_1">
  960. <xsl:copy-of select="$id/@*"/>
  961. <xsl:value-of select="$agentReportTaskStoreID"/>
  962. </impl:id>
  963. </xts:replace>
  964. </xsl:if>
  965. </xsl:for-each>
  966. </xts:sequence>
  967. </xsl:template>
  968. <!--include template for converting storeID's into search paths -->
  969. <agsh:storeIDConverter/>
  970. </xsl:stylesheet>
  971. </xts:block>
  972. <!--
  973. ================================================================================
  974. doUpdateAgentMemoHumanSubObjects
  975. a block which updates memo and human subobjects which are allowed to be under the agent
  976. ===============================================================================================
  977. -->
  978. <xts:block id="doUpdateAgentMemoHumanSubObjects" dependency="doMemoHumanSubObjectsPostProcess" processor="XSLT" type="exec" condition="/root/agent_item" mandatory="false">
  979. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  980. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  981. <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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" exclude-result-prefixes="send xtsext form">
  982. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  983. <xsl:template match="/">
  984. <xts:sequence>
  985. <xsl:for-each select="/root/agent_definition/items/item">
  986. <xsl:variable name="id" select="./id"/>
  987. <xsl:choose>
  988. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'message' ">
  989. <xts:replace select="/root/agent_item[@id = '{$id}']/agentTaskTarget">
  990. <agentTaskTarget>
  991. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  992. <send:request provider="cm" requester="AGS:create">
  993. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  994. <cm:update xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  995. <cm:objects>
  996. <cm:memo>
  997. <cm:searchPath>
  998. <!-- put the search path which was returned from the phase(I) save -->
  999. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/cm:addResponse/cm:memo/cm:searchPath"/>
  1000. </cm:searchPath>
  1001. <!-- give the memo the name of the task -->
  1002. <cm:defaultName>
  1003. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  1004. </cm:defaultName>
  1005. <!-- just copy the options that we've got -->
  1006. <xsl:copy-of select="/root/agent_item[@id=$id]/options"/>
  1007. </cm:memo>
  1008. </cm:objects>
  1009. <cm:options>
  1010. <xsl:attribute name="updateAction"><xsl:text>fail</xsl:text></xsl:attribute>
  1011. </cm:options>
  1012. </cm:update>
  1013. </xts:transform>
  1014. </send:request>
  1015. </xts:transform>
  1016. </agentTaskTarget>
  1017. </xts:replace>
  1018. </xsl:when>
  1019. <xsl:when test="/root/agent_definition/items/item[./id = $id]/type = 'notification' or /root/agent_definition/items/item[./id = $id]/type = 'approval' ">
  1020. <!-- only create a url for the url objects -->
  1021. <xts:replace select="/root/agent_item[@id = '{$id}']/agentTaskTarget">
  1022. <agentTaskTarget>
  1023. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  1024. <send:request provider="cm" requester="AGS:create">
  1025. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  1026. <cm:update xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  1027. <cm:objects>
  1028. <cm:humanTask>
  1029. <cm:searchPath>
  1030. <!-- put the search path which was returned from the creation of the agentDefinition -->
  1031. <xsl:value-of select="/root/agent_item[@id = $id]/agentTaskTarget/cm:addResponse/cm:humanTask/cm:searchPath"/>
  1032. </cm:searchPath>
  1033. <!-- give the memo the name of the task -->
  1034. <cm:defaultName>
  1035. <xsl:value-of select="/root/agent_definition/items/item[./id=$id]/name"/>
  1036. </cm:defaultName>
  1037. <!-- set the type of the task into the object - we need to know what type to resurrect it -->
  1038. <cm:operationName>
  1039. <xsl:value-of select="/root/agent_definition/items/item[./id = $id]/type"/>
  1040. </cm:operationName>
  1041. <cm:parameters>
  1042. <cm:parameterValue>
  1043. <cm:name>hts</cm:name>
  1044. <cm:simpleParmValueItem>
  1045. <cm:inclusive>false</cm:inclusive>
  1046. <cm:display>hts</cm:display>
  1047. <cm:use>
  1048. <xts:transform name="XMLEncode">
  1049. <xts:transform src="ags/transforms/getChildren.xslt" processor="XSLT">
  1050. <xsl:copy-of select="/root/agent_item[@id = $id]/taskOptions"/>
  1051. </xts:transform>
  1052. </xts:transform>
  1053. </cm:use>
  1054. </cm:simpleParmValueItem>
  1055. </cm:parameterValue>
  1056. </cm:parameters>
  1057. </cm:humanTask>
  1058. </cm:objects>
  1059. </cm:update>
  1060. </xts:transform>
  1061. </send:request>
  1062. </xts:transform>
  1063. </agentTaskTarget>
  1064. </xts:replace>
  1065. </xsl:when>
  1066. </xsl:choose>
  1067. </xsl:for-each>
  1068. </xts:sequence>
  1069. </xsl:template>
  1070. </xsl:stylesheet>
  1071. </xts:block>
  1072. <!--
  1073. ===============================================================================================
  1074. doSavePaths
  1075. A block which saves all the search paths of the objects that we've created into the agent definition block
  1076. ===============================================================================================
  1077. -->
  1078. <xts:block id="doSavePaths" dependency="doUpdateAgentMemoHumanSubObjects" processor="XSLT" type="exec">
  1079. <xts:logicsheet path="ags/logicsheets/agsCmHelper.xsl"/>
  1080. <xts:logicsheet path="logicsheets/portal.xsl"/>
  1081. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  1082. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:form="http://developer.cognos.com/schemas/xts/ags/iFrmCmd/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:agsh="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agsCmHelper/" xmlns:x="x" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="form send cm pf bus agsh x SOAP-ENC xtsext xsi xts">
  1083. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  1084. <xsl:template match="/">
  1085. <xsl:variable name="env" select="/root/command/form:create/form:env"/>
  1086. <xts:sequence>
  1087. <xsl:if test="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:storeID">
  1088. <!-- get rid of the path to start with -->
  1089. <xts:delete select="/root/agent_definition/agentDefinition"/>
  1090. <xts:append select="/root/agent_definition">
  1091. <agentDefinition>
  1092. <xsl:call-template name="storeIDConverter">
  1093. <xsl:with-param name="storeID">
  1094. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:storeID"/>
  1095. </xsl:with-param>
  1096. </xsl:call-template>
  1097. </agentDefinition>
  1098. </xts:append>
  1099. </xsl:if>
  1100. <xsl:if test="/root/agentDefinitionReport/cm:addResponse/cm:report/cm:storeID">
  1101. <!-- get rid of the path to start with -->
  1102. <xts:delete select="/root/agent_definition/agentDefinitionReport"/>
  1103. <xts:append select="/root/agent_definition">
  1104. <agentDefinitionReport>
  1105. <xsl:call-template name="storeIDConverter">
  1106. <xsl:with-param name="storeID">
  1107. <xsl:value-of select="/root/agentDefinitionReport/cm:addResponse/cm:report/cm:storeID"/>
  1108. </xsl:with-param>
  1109. </xsl:call-template>
  1110. </agentDefinitionReport>
  1111. </xts:append>
  1112. </xsl:if>
  1113. <xsl:if test="/root/agentSchedule/cm:addResponse/cm:schedule/cm:storeID">
  1114. <xts:delete select="/root/agent_definition/agentSchedule"/>
  1115. <xts:append select="/root/agent_definition">
  1116. <agentSchedule>
  1117. <xsl:call-template name="storeIDConverter">
  1118. <xsl:with-param name="storeID">
  1119. <xsl:value-of select="/root/agentSchedule/cm:addResponse/cm:schedule/cm:storeID"/>
  1120. </xsl:with-param>
  1121. </xsl:call-template>
  1122. </agentSchedule>
  1123. </xts:append>
  1124. </xsl:if>
  1125. <xsl:for-each select="/root/agent_item">
  1126. <xsl:variable name="id" select="./@id"/>
  1127. <!-- delete any previous task and target store ID's -->
  1128. <xts:delete select="/root/agent_definition/items/item[id='{$id}']/taskStoreID"/>
  1129. <xts:delete select="/root/agent_definition/items/item[id='{$id}']/targetStoreID"/>
  1130. <!-- put the new ones in place -->
  1131. <xts:append select="/root/agent_definition/items/item[id='{$id}']">
  1132. <taskStoreID>
  1133. <xsl:call-template name="storeIDConverter">
  1134. <xsl:with-param name="storeID">
  1135. <xsl:value-of select="./agentTask/cm:addResponse/cm:agentTaskDefinition/cm:storeID"/>
  1136. </xsl:with-param>
  1137. </xsl:call-template>
  1138. </taskStoreID>
  1139. <targetStoreID>
  1140. <xsl:call-template name="storeIDConverter">
  1141. <xsl:with-param name="storeID">
  1142. <xsl:value-of select="./agentTask/cm:addResponse/cm:agentTaskDefinition/cm:taskObject/*/cm:storeID"/>
  1143. </xsl:with-param>
  1144. </xsl:call-template>
  1145. </targetStoreID>
  1146. </xts:append>
  1147. </xsl:for-each>
  1148. <!-- also don't want any deletedItems to remain -->
  1149. <xts:delete select="/root/agent_definition/deletedItems"/>
  1150. <xts:append select="/root/agent_definition">
  1151. <deletedItems>
  1152. </deletedItems>
  1153. <!-- log to IPF-->
  1154. <log>
  1155. <xts:function name="ipflog">
  1156. <xts:param name="indication">Audit.RTUsage</xts:param>
  1157. <xts:param name="level">3</xts:param>
  1158. <xts:param name="logData">&lt;parameters&gt;&lt;item name=&quot;email&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/agent_item//item[contains(@*[local-name()='type'],'deliveryOptionAddressSMTPArray')]/value/item))"/>]]&gt;&lt;/item&gt;&lt;item name=&quot;user&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/session/param[@name ='e_user']))"/>]]&gt;&lt;/item&gt;&lt;item name=&quot;agentpath&quot;&gt;&lt;![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/session/param[@name ='e_mrootpath']))"/>]]&gt;&lt;/item&gt;&lt;/parameters&gt;</xts:param>
  1159. <xts:param name="operation">CREATE</xts:param>
  1160. <xts:param name="objectPath">
  1161. <xsl:value-of select="/root/agentDefinition/cm:addResponse/cm:agentDefinition/cm:searchPath/text()"/>
  1162. </xts:param>
  1163. <xts:param name="objectType">AGENTDEFINITION</xts:param>
  1164. <xts:param name="status">Success</xts:param>
  1165. <xts:param name="errorMessage">N/A</xts:param>
  1166. </xts:function>
  1167. </log>
  1168. </xts:append>
  1169. </xts:sequence>
  1170. </xsl:template>
  1171. <!--include template for converting storeID's into search paths -->
  1172. <agsh:storeIDConverter/>
  1173. </xsl:stylesheet>
  1174. </xts:block>
  1175. <!--
  1176. ================================================================================
  1177. do the commandResults ???
  1178. ================================================================================
  1179. -->
  1180. <xts:block id="commandResults" processor="XSLT" type="exec" mode="output" mimeType="text/xml" dependency="doSavePaths">
  1181. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  1182. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="cm" version="1.0">
  1183. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  1184. <xsl:template match="/root">
  1185. <response>
  1186. <xsl:copy-of select="agent_definition"/>
  1187. </response>
  1188. </xsl:template>
  1189. <xsl:template match="text()"/>
  1190. </xsl:stylesheet>
  1191. </xts:block>
  1192. <!--
  1193. ===============================================================================================
  1194. faultHandler
  1195. ===============================================================================================
  1196. -->
  1197. <xts:block id="faultHandler" type="fault" processor="XSLT">
  1198. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  1199. <xsl:output method="xml"/>
  1200. <xsl:template match="/root/fault">
  1201. <error>
  1202. <xsl:value-of select="//*[local-name() = 'messageString']"/>
  1203. </error>
  1204. </xsl:template>
  1205. <xsl:template match="text()"/>
  1206. </xsl:stylesheet>
  1207. </xts:block>
  1208. </xts:morphlet>