Advertisement
Guest User

Untitled

a guest
Mar 8th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.81 KB | None | 0 0
  1. <gel:script xmlns:core="jelly:core" xmlns:file="jelly:com.niku.union.gel.FileTagLibrary" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
  2. xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sql="jelly:sql"
  3. xmlns:util="jelly:util" xmlns:x="jelly:xml" xmlns:xog="http://www.niku.com/xog" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  4. <!-- ********************************************************************************* -->
  5. <!-- Version Control -->
  6. <!-- v1.0: -->
  7. <!-- ********************************************************************************* -->
  8. <!-- -->
  9. <!-- ********************************************************************************* -->
  10. <!-- ********************************************************************************* -->
  11. <gel:setDataSource dbId="Niku"/>
  12. <!-- ********************************************************************************* -->
  13. <!-- Set Parameters -->
  14. <gel:parameter var="username" default="admin" />
  15. <gel:parameter default="0" var="DEBUG"/>
  16. <!-- DEBUG LEVELS:
  17. 0 = No DEBUGGING
  18. 1 = XOG Only
  19. 2 = All Logs -->
  20. <!-- ********************************************************************************* -->
  21.  
  22. <!--Get a session for XOG-ing-->
  23. <core:new var="secId" className="com.niku.union.security.DefaultSecurityIdentifier" />
  24. <core:invokeStatic var="userSessionCtrl" className="com.niku.union.security.UserSessionControllerFactory" method="getInstance" />
  25. <core:set var="secId" value="${userSessionCtrl.init(username, secId)}" />
  26. <core:set var="sessionID" value="${secId.getSessionId()}"/>
  27.  
  28. <!-- Get Environment Variables -->
  29. <core:invokeStatic className="java.lang.System" method="getenv" var="NIKU_HOME">
  30. <core:arg value="NIKU_HOME"/>
  31. </core:invokeStatic>
  32.  
  33. <!-- Set the object Instance ID -->
  34. <core:set var="myID" value="${gel_objectInstanceId}"/>
  35.  
  36. <!-- Set the rate used for cost calculation -->
  37. <core:set var="rate" value="75"/>
  38.  
  39. <gel:parse var="sdphXML">
  40. <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
  41. <Header version="15.3.0.200" objectType="customObjectInstance" externalSource="NIKU" action="write" />
  42. <customObjectInstances objectCode="swi_sdph">
  43. <instance objectCode="swi_sdph" parentObjectCode="project" parentInstanceCode="PR00656" instanceCode="SDPH01552">
  44. <CustomInformation>
  45. <ColumnValue name="swi_sdph_por">false</ColumnValue>
  46. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  47. <ColumnValue name="swi_status">0</ColumnValue>
  48. <ColumnValue name="odf_parent_id">5085004</ColumnValue>
  49. <ColumnValue name="swi_sdph_type">0</ColumnValue>
  50. <ColumnValue name="odf_cncrt_parent_id">5085004</ColumnValue>
  51. <ColumnValue name="code">SDPH01552</ColumnValue>
  52. <ColumnValue name="swi_creator">99755692</ColumnValue>
  53. <ColumnValue name="name">SDPH Ideation - 12-JAN-2018 03:44 PM +00:00</ColumnValue>
  54. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01552" instanceCode="SDPHD11699" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  55. <CustomInformation>
  56. <ColumnValue name="odf_cncrt_parent_id">5097009</ColumnValue>
  57. <ColumnValue name="swi_total_days">0</ColumnValue>
  58. <ColumnValue name="swi_role_fte">
  59. <tsvData type="value" default="0.0" />
  60. </ColumnValue>
  61. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  62. <ColumnValue name="swi_unique_id">nonlabor</ColumnValue>
  63. <ColumnValue name="swi_total_hours">0</ColumnValue>
  64. <ColumnValue name="swi_role_hours">
  65. <tsvData type="value" default="0.0" />
  66. </ColumnValue>
  67. <ColumnValue name="swi_role_id">5063002</ColumnValue>
  68. <ColumnValue name="code">SDPHD11699</ColumnValue>
  69. <ColumnValue name="odf_parent_id">5097009</ColumnValue>
  70. <ColumnValue name="name">Non-Labor</ColumnValue>
  71. <ColumnValue name="swi_allocation">0</ColumnValue>
  72. </CustomInformation>
  73. <OBSAssocs complete="false" />
  74. <Security>
  75. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  76. </Security>
  77. </instance>
  78. </CustomInformation>
  79. <OBSAssocs complete="false" />
  80. <Security>
  81. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_edit" />
  82. </Security>
  83. </instance>
  84. <instance objectCode="swi_sdph" parentObjectCode="project" parentInstanceCode="PR00656" instanceCode="SDPH01560">
  85. <CustomInformation>
  86. <ColumnValue name="swi_sdph_por">false</ColumnValue>
  87. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  88. <ColumnValue name="swi_status">0</ColumnValue>
  89. <ColumnValue name="odf_parent_id">5085004</ColumnValue>
  90. <ColumnValue name="swi_sdph_type">3</ColumnValue>
  91. <ColumnValue name="odf_cncrt_parent_id">5085004</ColumnValue>
  92. <ColumnValue name="code">SDPH01560</ColumnValue>
  93. <ColumnValue name="swi_creator">99755828</ColumnValue>
  94. <ColumnValue name="name">SDPH Budget - 02-MAR-2018 07:11 PM +00:00</ColumnValue>
  95. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01560" instanceCode="SDPHD11724" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  96. <CustomInformation>
  97. <ColumnValue name="odf_cncrt_parent_id">5100002</ColumnValue>
  98. <ColumnValue name="swi_total_days">1.33</ColumnValue>
  99. <ColumnValue name="swi_role_fte">
  100. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00">
  101. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  102. </tsvData>
  103. </ColumnValue>
  104. <ColumnValue name="swi_obs_path">ALL/Information Technology/C518 - EA KL - Ordering</ColumnValue>
  105. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  106. <ColumnValue name="swi_unique_id">swi_bus_analyst5004066</ColumnValue>
  107. <ColumnValue name="swi_total_hours">10</ColumnValue>
  108. <ColumnValue name="swi_role_hours">
  109. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00">
  110. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  111. </tsvData>
  112. </ColumnValue>
  113. <ColumnValue name="swi_role_id">5012006</ColumnValue>
  114. <ColumnValue name="code">SDPHD11724</ColumnValue>
  115. <ColumnValue name="swi_obs_level">C518 - EA KL - Ordering</ColumnValue>
  116. <ColumnValue name="odf_parent_id">5100002</ColumnValue>
  117. <ColumnValue name="name">Business Analyst C518 - EA KL - Ordering</ColumnValue>
  118. <ColumnValue name="swi_obs_id">5004066</ColumnValue>
  119. <ColumnValue name="swi_allocation">0.01</ColumnValue>
  120. <ColumnValue name="swi_obs_type">SWIFT Department OBS</ColumnValue>
  121. </CustomInformation>
  122. <OBSAssocs complete="false" />
  123. <Security>
  124. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  125. </Security>
  126. </instance>
  127. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01560" instanceCode="SDPHD11725" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  128. <CustomInformation>
  129. <ColumnValue name="odf_cncrt_parent_id">5100002</ColumnValue>
  130. <ColumnValue name="swi_total_days">62.33</ColumnValue>
  131. <ColumnValue name="swi_role_fte">
  132. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  133. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  134. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="18.0" isDefaultSegment="false" />
  135. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="22.0" isDefaultSegment="false" />
  136. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="21.0" isDefaultSegment="false" />
  137. </tsvData>
  138. </ColumnValue>
  139. <ColumnValue name="swi_obs_path">ALL/Information Technology/C518 - EA KL - Ordering</ColumnValue>
  140. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  141. <ColumnValue name="swi_unique_id">swi_sw_dev5004066</ColumnValue>
  142. <ColumnValue name="swi_total_hours">467.5</ColumnValue>
  143. <ColumnValue name="swi_role_hours">
  144. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  145. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  146. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="135.0" isDefaultSegment="false" />
  147. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="164.99999999999997" isDefaultSegment="false" />
  148. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="157.5" isDefaultSegment="false" />
  149. </tsvData>
  150. </ColumnValue>
  151. <ColumnValue name="swi_role_id">5012018</ColumnValue>
  152. <ColumnValue name="code">SDPHD11725</ColumnValue>
  153. <ColumnValue name="swi_obs_level">C518 - EA KL - Ordering</ColumnValue>
  154. <ColumnValue name="odf_parent_id">5100002</ColumnValue>
  155. <ColumnValue name="name">Software Developer C518 - EA KL - Ordering</ColumnValue>
  156. <ColumnValue name="swi_obs_id">5004066</ColumnValue>
  157. <ColumnValue name="swi_allocation">0.28</ColumnValue>
  158. <ColumnValue name="swi_obs_type">SWIFT Department OBS</ColumnValue>
  159. </CustomInformation>
  160. <OBSAssocs complete="false" />
  161. <Security>
  162. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  163. </Security>
  164. </instance>
  165. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01560" instanceCode="SDPHD11726" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  166. <CustomInformation>
  167. <ColumnValue name="odf_cncrt_parent_id">5100002</ColumnValue>
  168. <ColumnValue name="swi_total_days">61.33</ColumnValue>
  169. <ColumnValue name="swi_role_fte">
  170. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  171. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  172. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="19.0" isDefaultSegment="false" />
  173. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="21.0" isDefaultSegment="false" />
  174. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="20.0" isDefaultSegment="false" />
  175. </tsvData>
  176. </ColumnValue>
  177. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  178. <ColumnValue name="swi_unique_id">swi_proj_mgr</ColumnValue>
  179. <ColumnValue name="swi_total_hours">460</ColumnValue>
  180. <ColumnValue name="swi_role_hours">
  181. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  182. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  183. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="142.5" isDefaultSegment="false" />
  184. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="157.5" isDefaultSegment="false" />
  185. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="150.0" isDefaultSegment="false" />
  186. </tsvData>
  187. </ColumnValue>
  188. <ColumnValue name="swi_role_id">5011007</ColumnValue>
  189. <ColumnValue name="code">SDPHD11726</ColumnValue>
  190. <ColumnValue name="odf_parent_id">5100002</ColumnValue>
  191. <ColumnValue name="name">Project Manager</ColumnValue>
  192. <ColumnValue name="swi_allocation">0.28</ColumnValue>
  193. </CustomInformation>
  194. <OBSAssocs complete="false" />
  195. <Security>
  196. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  197. </Security>
  198. </instance>
  199. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01560" instanceCode="SDPHD11727" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  200. <CustomInformation>
  201. <ColumnValue name="odf_cncrt_parent_id">5100002</ColumnValue>
  202. <ColumnValue name="swi_total_days">2546.67</ColumnValue>
  203. <ColumnValue name="swi_role_fte">
  204. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  205. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1480.0000000000002" isDefaultSegment="false" />
  206. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="133.33" isDefaultSegment="false" />
  207. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="133.33" isDefaultSegment="false" />
  208. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="800.0" isDefaultSegment="false" />
  209. </tsvData>
  210. </ColumnValue>
  211. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  212. <ColumnValue name="swi_unique_id">nonlabor</ColumnValue>
  213. <ColumnValue name="swi_total_hours">19100</ColumnValue>
  214. <ColumnValue name="swi_role_hours">
  215. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  216. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="11100.0" isDefaultSegment="false" />
  217. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="1000.0" isDefaultSegment="false" />
  218. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="1000.0" isDefaultSegment="false" />
  219. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="6000.0" isDefaultSegment="false" />
  220. </tsvData>
  221. </ColumnValue>
  222. <ColumnValue name="swi_role_id">5063002</ColumnValue>
  223. <ColumnValue name="code">SDPHD11727</ColumnValue>
  224. <ColumnValue name="odf_parent_id">5100002</ColumnValue>
  225. <ColumnValue name="name">Non-Labor</ColumnValue>
  226. <ColumnValue name="swi_allocation">11.58</ColumnValue>
  227. </CustomInformation>
  228. <OBSAssocs complete="false" />
  229. <Security>
  230. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  231. </Security>
  232. </instance>
  233. </CustomInformation>
  234. <OBSAssocs complete="false" />
  235. <Security>
  236. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_edit" />
  237. </Security>
  238. </instance>
  239. <instance objectCode="swi_sdph" parentObjectCode="project" parentInstanceCode="PR00656" instanceCode="SDPH01565">
  240. <CustomInformation>
  241. <ColumnValue name="swi_sdph_por">false</ColumnValue>
  242. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  243. <ColumnValue name="swi_status">0</ColumnValue>
  244. <ColumnValue name="odf_parent_id">5085004</ColumnValue>
  245. <ColumnValue name="swi_sdph_type">1</ColumnValue>
  246. <ColumnValue name="odf_cncrt_parent_id">5085004</ColumnValue>
  247. <ColumnValue name="code">SDPH01565</ColumnValue>
  248. <ColumnValue name="swi_creator">99755828</ColumnValue>
  249. <ColumnValue name="name">SDPH Ad-Hoc - 06-MAR-2018 01:08 AM +00:00</ColumnValue>
  250. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01565" instanceCode="SDPHD11729" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  251. <CustomInformation>
  252. <ColumnValue name="odf_cncrt_parent_id">5100005</ColumnValue>
  253. <ColumnValue name="swi_total_days">1.33</ColumnValue>
  254. <ColumnValue name="swi_role_fte">
  255. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00">
  256. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  257. </tsvData>
  258. </ColumnValue>
  259. <ColumnValue name="swi_obs_path">ALL/Information Technology/C518 - EA KL - Ordering</ColumnValue>
  260. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  261. <ColumnValue name="swi_unique_id">swi_bus_analyst5004066</ColumnValue>
  262. <ColumnValue name="swi_total_hours">10</ColumnValue>
  263. <ColumnValue name="swi_role_hours">
  264. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00">
  265. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  266. </tsvData>
  267. </ColumnValue>
  268. <ColumnValue name="swi_role_id">5012006</ColumnValue>
  269. <ColumnValue name="code">SDPHD11729</ColumnValue>
  270. <ColumnValue name="swi_obs_level">C518 - EA KL - Ordering</ColumnValue>
  271. <ColumnValue name="odf_parent_id">5100005</ColumnValue>
  272. <ColumnValue name="name">Business Analyst C518 - EA KL - Ordering</ColumnValue>
  273. <ColumnValue name="swi_obs_id">5004066</ColumnValue>
  274. <ColumnValue name="swi_allocation">0.01</ColumnValue>
  275. <ColumnValue name="swi_obs_type">SWIFT Department OBS</ColumnValue>
  276. </CustomInformation>
  277. <OBSAssocs complete="false" />
  278. <Security>
  279. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  280. </Security>
  281. </instance>
  282. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01565" instanceCode="SDPHD11730" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  283. <CustomInformation>
  284. <ColumnValue name="odf_cncrt_parent_id">5100005</ColumnValue>
  285. <ColumnValue name="swi_total_days">83.33</ColumnValue>
  286. <ColumnValue name="swi_role_fte">
  287. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-05-31T12:00:00">
  288. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  289. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="18.0" isDefaultSegment="false" />
  290. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="22.0" isDefaultSegment="false" />
  291. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="21.0" isDefaultSegment="false" />
  292. <segment start="2018-05-01T12:00:00" finish="2018-05-31T12:00:00" value="21.0" isDefaultSegment="false" />
  293. </tsvData>
  294. </ColumnValue>
  295. <ColumnValue name="swi_obs_path">ALL/Information Technology/C518 - EA KL - Ordering</ColumnValue>
  296. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  297. <ColumnValue name="swi_unique_id">swi_sw_dev5004066</ColumnValue>
  298. <ColumnValue name="swi_total_hours">625</ColumnValue>
  299. <ColumnValue name="swi_role_hours">
  300. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-05-31T12:00:00">
  301. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  302. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="135.0" isDefaultSegment="false" />
  303. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="164.99999999999997" isDefaultSegment="false" />
  304. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="157.5" isDefaultSegment="false" />
  305. <segment start="2018-05-01T12:00:00" finish="2018-05-31T12:00:00" value="157.5" isDefaultSegment="false" />
  306. </tsvData>
  307. </ColumnValue>
  308. <ColumnValue name="swi_role_id">5012018</ColumnValue>
  309. <ColumnValue name="code">SDPHD11730</ColumnValue>
  310. <ColumnValue name="swi_obs_level">C518 - EA KL - Ordering</ColumnValue>
  311. <ColumnValue name="odf_parent_id">5100005</ColumnValue>
  312. <ColumnValue name="name">Software Developer C518 - EA KL - Ordering</ColumnValue>
  313. <ColumnValue name="swi_obs_id">5004066</ColumnValue>
  314. <ColumnValue name="swi_allocation">0.38</ColumnValue>
  315. <ColumnValue name="swi_obs_type">SWIFT Department OBS</ColumnValue>
  316. </CustomInformation>
  317. <OBSAssocs complete="false" />
  318. <Security>
  319. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  320. </Security>
  321. </instance>
  322. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01565" instanceCode="SDPHD11731" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  323. <CustomInformation>
  324. <ColumnValue name="odf_cncrt_parent_id">5100005</ColumnValue>
  325. <ColumnValue name="swi_total_days">83.33</ColumnValue>
  326. <ColumnValue name="swi_role_fte">
  327. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-05-31T12:00:00">
  328. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1.33" isDefaultSegment="false" />
  329. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="19.0" isDefaultSegment="false" />
  330. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="21.0" isDefaultSegment="false" />
  331. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="20.0" isDefaultSegment="false" />
  332. <segment start="2018-05-01T12:00:00" finish="2018-05-31T12:00:00" value="22.0" isDefaultSegment="false" />
  333. </tsvData>
  334. </ColumnValue>
  335. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  336. <ColumnValue name="swi_unique_id">swi_proj_mgr</ColumnValue>
  337. <ColumnValue name="swi_total_hours">625</ColumnValue>
  338. <ColumnValue name="swi_role_hours">
  339. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-05-31T12:00:00">
  340. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="10.0" isDefaultSegment="false" />
  341. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="142.5" isDefaultSegment="false" />
  342. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="157.5" isDefaultSegment="false" />
  343. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="150.0" isDefaultSegment="false" />
  344. <segment start="2018-05-01T12:00:00" finish="2018-05-31T12:00:00" value="164.99999999999997" isDefaultSegment="false" />
  345. </tsvData>
  346. </ColumnValue>
  347. <ColumnValue name="swi_role_id">5011007</ColumnValue>
  348. <ColumnValue name="code">SDPHD11731</ColumnValue>
  349. <ColumnValue name="odf_parent_id">5100005</ColumnValue>
  350. <ColumnValue name="name">Project Manager</ColumnValue>
  351. <ColumnValue name="swi_allocation">0.38</ColumnValue>
  352. </CustomInformation>
  353. <OBSAssocs complete="false" />
  354. <Security>
  355. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  356. </Security>
  357. </instance>
  358. <instance objectCode="swi_sdph_detail" parentObjectCode="swi_sdph" parentInstanceCode="SDPH01565" instanceCode="SDPHD11732" grandparentObjectCode="project" grandparentInstanceCode="PR00656">
  359. <CustomInformation>
  360. <ColumnValue name="odf_cncrt_parent_id">5100005</ColumnValue>
  361. <ColumnValue name="swi_total_days">2546.67</ColumnValue>
  362. <ColumnValue name="swi_role_fte">
  363. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  364. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="1480.0000000000002" isDefaultSegment="false" />
  365. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="133.33" isDefaultSegment="false" />
  366. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="133.33" isDefaultSegment="false" />
  367. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="800.0" isDefaultSegment="false" />
  368. </tsvData>
  369. </ColumnValue>
  370. <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
  371. <ColumnValue name="swi_unique_id">nonlabor</ColumnValue>
  372. <ColumnValue name="swi_total_hours">19100</ColumnValue>
  373. <ColumnValue name="swi_role_hours">
  374. <tsvData type="value" default="0.0" start="2018-01-01T12:00:00" finish="2018-04-30T12:00:00">
  375. <segment start="2018-01-01T12:00:00" finish="2018-01-31T12:00:00" value="11100.0" isDefaultSegment="false" />
  376. <segment start="2018-02-01T12:00:00" finish="2018-02-28T12:00:00" value="1000.0" isDefaultSegment="false" />
  377. <segment start="2018-03-01T12:00:00" finish="2018-03-31T12:00:00" value="1000.0" isDefaultSegment="false" />
  378. <segment start="2018-04-01T12:00:00" finish="2018-04-30T12:00:00" value="6000.0" isDefaultSegment="false" />
  379. </tsvData>
  380. </ColumnValue>
  381. <ColumnValue name="swi_role_id">5063002</ColumnValue>
  382. <ColumnValue name="code">SDPHD11732</ColumnValue>
  383. <ColumnValue name="odf_parent_id">5100005</ColumnValue>
  384. <ColumnValue name="name">Non-Labor</ColumnValue>
  385. <ColumnValue name="swi_allocation">11.58</ColumnValue>
  386. </CustomInformation>
  387. <OBSAssocs complete="false" />
  388. <Security>
  389. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_detail_edit" />
  390. </Security>
  391. </instance>
  392. </CustomInformation>
  393. <OBSAssocs complete="false" />
  394. <Security>
  395. <UserSecurity userName="admin" rightCode="odf_cst_swi_sdph_edit" />
  396. </Security>
  397. </instance>
  398. </customObjectInstances>
  399.  
  400. </NikuDataBus>
  401. </gel:parse>
  402.  
  403. <!-- SDPH Instances -->
  404. <!-- <sql:query var="sdph" escapeText="false"><![CDATA[
  405. select listagg(sdph.code,',')
  406. within group (order by sdph.code) sdph_codes
  407. from inv_investments i
  408. join odf_ca_swi_sdph sdph on i.id = sdph.odf_parent_id
  409. where i.id = ?
  410. ]]><sql:param value="${myID}"/>
  411. </sql:query>
  412.  
  413. <gel:parse var="sdphReadXML">
  414. <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
  415. <Header version="8.0" action="read" objectType="customObjectInstance" externalSource="NIKU"/>
  416. <CustomObjectInstanceQuery>
  417. <Filter name="objectCode" criteria="EQUALS">swi_sdph</Filter>
  418. <Filter name="instanceCode" criteria="OR">${sdph_codes}</Filter>
  419. </CustomObjectInstanceQuery>
  420. </NikuDataBus>
  421. </gel:parse> -->
  422.  
  423. <!-- Read the SDPH -->
  424. <!-- <core:catch var="v_exception">
  425. <soap:invoke endpoint="internal" var="sdphXML">
  426. <soap:message>
  427. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://localhost/niku/xog">
  428. <soapenv:Header>
  429. <xog:Auth>
  430. <xog:SessionID>${sessionID}</xog:SessionID>
  431. </xog:Auth>
  432. </soapenv:Header>
  433. <soapenv:Body>
  434. <gel:include select="$sdphReadXML"/>
  435. </soapenv:Body>
  436. </soapenv:Envelope>
  437. </soap:message>
  438. </soap:invoke>
  439. <gel:set asString="true" select="$sdphXML//XOGOutput/Status/@state" var="v_xogState"/>
  440. <gel:set asString="true" select="$sdphXML//XOGOutput/Statistics/@failureRecords" var="v_xogFailureRecords"/>
  441. <gel:set asString="true" select="$sdphXML//XOGOutput/Statistics/@insertedRecords" var="v_xogInsertedRecords"/>
  442. <gel:set asString="true" select="$sdphXML//XOGOutput/Statistics/@totalNumberOfRecords" var="v_xogTotalRecords"/>
  443. <gel:set asString="true" select="$sdphXML//XOGOutput/Statistics/@updatedRecords" var="v_xogUpdatedRecords"/>
  444. <gel:set asString="true" select="$sdphXML//ErrorInformation/Description/text()" var="v_errorDescription"/>
  445. </core:catch>
  446. <core:if test="${DEBUG >= 2}">
  447. <core:choose>
  448. <core:when test="${v_exception != null}">
  449. <gel:log>XOG READ: Caught exception while XOG. Exception was: ${v_exception}</gel:log>
  450. </core:when>
  451. <core:when test="${v_xogState == 'FAILURE' or v_xogFailureRecords gt 0}">
  452. <gel:set asString="true" select="$sdphXML//ErrorInformation/Description/text()" var="v_errorDescription"/>
  453. <gel:log>XOG READ: Operation failed. ${v_errorDescription}. Number of failure records ${v_xogFailureRecords}</gel:log>
  454. </core:when>
  455. <core:otherwise>
  456. <gel:log>XOG READ: No XOG Errors</gel:log>
  457. </core:otherwise>
  458. </core:choose>
  459. </core:if> -->
  460.  
  461. <!-- Create the Base Cost Plan XOG XML -->
  462. <gel:parse var="costPlanBaseXML">
  463. <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_costPlan.xsd">
  464. <Header version="15.3.0.200" objectType="costPlan" externalSource="NIKU" action="write">
  465. <args name="overrideAutoNumbering" value="0"/>
  466. </Header>
  467. <CostPlans/>
  468. </NikuDataBus>
  469. </gel:parse>
  470.  
  471. <gel:forEach select="$sdphXML/NikuDataBus/customObjectInstances/instance" var="sdphInst">
  472.  
  473. <gel:set asString="true" select="$sdphInst//ColumnValue[@name='swi_allocation']/text()" var="sdph_alloc"/>
  474.  
  475. <core:if test="${sdph_alloc gt '0'}">
  476.  
  477. <!-- Project ID -->
  478. <gel:set asString="true" select="$sdphInst/CustomInformation/ColumnValue[@name='odf_parent_id']/text()" var="prj_id"/>
  479. <!-- Project Code -->
  480. <gel:set asString="true" select="$sdphInst/@parentInstanceCode/text()" var="prj_code"/>
  481. <!-- SDPH Name -->
  482. <gel:set asString="true" select="$sdphInst/CustomInformation/ColumnValue[@name='name']/text()" var="sdph_name"/>
  483. <!-- SDPH Start Month -->
  484. <gel:set
  485. asString="true"
  486. select="$sdphInst//ColumnValue[@name='swi_role_hours']/tsvData/@start"
  487. var="sdph_start_month"/>
  488. <!-- SDPH End Month -->
  489. <gel:set
  490. asString="true"
  491. select="$sdphInst//ColumnValue[@name='swi_role_hours']/tsvData/@finish"
  492. var="sdph_end_month"/>
  493.  
  494. <!-- CONVERT DATE FORMATS -->
  495. <gel:parseDate dateVar="sm" format="yyyy-MM-dd'T'HH:mm:ss">${sdph_start_month}</gel:parseDate>
  496. <gel:formatDate format="MMM YYYY" dateVar="sm" stringVar="start_month"/>
  497. <gel:parseDate dateVar="em" format="yyyy-MM-dd'T'HH:mm:ss">${sdph_end_month}</gel:parseDate>
  498. <gel:formatDate format="MMM YYYY" dateVar="em" stringVar="end_month"/>
  499.  
  500. <!-- <sql:update escapeText="False"><![CDATA[
  501. CALL CMN_AUTONUM_GET_NEXT_SP('costplan', 'code', 'NIKU.ROOT', NULL, NULL, NULL, 0, '')
  502. ]]>
  503. </sql:update>
  504.  
  505. <sql:query escapeText="False" var="new_costplan_code"><![CDATA[
  506. SELECT next_value
  507. FROM CMN_AUTONUM_SCHEMES
  508. WHERE 1=1
  509. AND object_code = 'costplan'
  510. AND attribute_code = 'code'
  511. AND partition_code = 'NIKU.ROOT'
  512. ]]>
  513. </sql:query>
  514. -->
  515.  
  516. <!-- Create a Cost Plan XML -->
  517. <gel:parse var="costPlanXML">
  518. <CostPlan
  519. name="${sdph_name}"
  520. startPeriod="${start_month.toUpperCase()}"
  521. periodType="MONTHLY"
  522. isPlanOfRecord="false"
  523. investmentType="project"
  524. investmentCode="${prj_code}"
  525. finishPeriod="${end_month.toUpperCase()}"
  526. code=""
  527. benefitPlanCode="">
  528. <GroupingAttributes>
  529. <GroupingAttribute>cost_type_id</GroupingAttribute>
  530. <GroupingAttribute>department_id</GroupingAttribute>
  531. <GroupingAttribute>role_id</GroupingAttribute>
  532. <GroupingAttribute>transaction_class_id</GroupingAttribute>
  533. </GroupingAttributes>
  534. <Details/>
  535. </CostPlan>
  536. </gel:parse>
  537.  
  538. <!-- Cost Plan Details -->
  539. <gel:forEach select="$sdphInst/CustomInformation/instance" var="inst">
  540.  
  541. <!-- Role ID -->
  542. <gel:set asString="true" select="$inst/CustomInformation/ColumnValue[@name='swi_role_id']/text()" var="role_id"/>
  543.  
  544. <!-- Role Code -->
  545. <gel:set asString="true" select="$inst/CustomInformation/ColumnValue[@name='swi_unique_id']/text()" var="sdph_role_code"/>
  546. <sql:query var="role_code" escapeText="false"><![CDATA[select unique_name from srm_resources where id = ?]]><sql:param value="${role_id}"/></sql:query>
  547. <core:set var="role_code" value="${role_code.rows.0.unique_name}"/>
  548.  
  549. <!-- OBS ID -->
  550. <gel:set asString="true" select="$inst/CustomInformation/ColumnValue[@name='swi_obs_id']/text()" var="sdph_obs_id"/>
  551. <sql:query var="dept_id" escapeText="false"><![CDATA[select unique_name from prj_obs_units where id = ?]]><sql:param value="${sdph_obs_id}"/></sql:query>
  552. <core:set var="dept_id" value="${dept_id.rows.0.unique_name}"/>
  553.  
  554. <core:if test="${sdph_role_code != 'nonlabor' &amp;&amp; sdph_role_code != null &amp;&amp; sdph_obs_id != null}">
  555.  
  556. Role Code: ${role_code} (${sdph_role_code})
  557. Department ID: ${dept_id} (${sdph_obs_id})
  558.  
  559. <gel:parse var="detailXML"><Detail/></gel:parse>
  560. <gel:parse var="costXML"><Cost/></gel:parse>
  561. <gel:parse var="unitXML"><Unit/></gel:parse>
  562. <gel:parse var="groupAttribXML">
  563. <GroupingAttributes>
  564. <GroupingAttribute value="OPERATING" code="cost_type_id" />
  565. <GroupingAttribute value="${dept_id}" code="department_id" />
  566. <GroupingAttribute value="${role_code}" code="role_id" />
  567. <GroupingAttribute value="INT_LAB" code="transaction_class_id" />
  568. </GroupingAttributes>
  569. </gel:parse>
  570.  
  571. <!-- Segments -->
  572. <gel:forEach select="$inst/CustomInformation/ColumnValue[@name='swi_role_hours']/tsvData/segment" var="segment">
  573. <gel:set asString="true" select="$segment/@start/text()" var="start"/>
  574. <gel:set asString="true" select="$segment/@finish/text()" var="finish"/>
  575. <gel:set asString="true" select="$segment/@value/text()" var="value"/>
  576. <gel:parse var="costSegmentXML">
  577. <segment start="${start}" finish="${finish}" value="${value * rate}"/>
  578. </gel:parse>
  579. <gel:parse var="unitSegmentXML">
  580. <segment start="${start}" finish="${finish}" value="${value}"/>
  581. </gel:parse>
  582.  
  583. <!-- Add Segments to Cost -->
  584. <gel:set insert="true" select="$costXML/Cost" value="${costSegmentXML}"/>
  585. <!-- Add Segments to Unit -->
  586. <gel:set insert="true" select="$unitXML/Unit" value="${unitSegmentXML}"/>
  587. </gel:forEach>
  588.  
  589. <!-- Add Costs to Detail -->
  590. <gel:set insert="true" select="$detailXML/Detail" value="${costXML}"/>
  591. <!-- Add Units to Detail -->
  592. <gel:set insert="true" select="$detailXML/Detail" value="${unitXML}"/>
  593. <!-- Add Grouping Attributes to Detail -->
  594. <gel:set insert="true" select="$detailXML/Detail" value="${groupAttribXML}"/>
  595. <!-- Add Detail to Details -->
  596. <gel:set insert="true" select="$costPlanXML/CostPlan/Details" value="${detailXML}"/>
  597.  
  598. <!-- Debugging -->
  599. <!-- <gel:out>
  600. <core:whitespace>
  601. Role: ${role_code} (${role_id})
  602. Department: ${dept_id} (${obs_id})
  603. <gel:expr select="$costXML/Cost"/>
  604. </core:whitespace>
  605. </gel:out> -->
  606.  
  607. </core:if>
  608.  
  609. </gel:forEach>
  610. <gel:set insert="true" select="$costPlanBaseXML/NikuDataBus/CostPlans" value="${costPlanXML}"/>
  611.  
  612. </core:if>
  613.  
  614. </gel:forEach>
  615.  
  616. <!-- Debugging -->
  617. <gel:out><gel:expr select="$costPlanBaseXML"/></gel:out>
  618.  
  619. <!-- XOG Log out -->
  620.  
  621. <soap:invoke endpoint="internal" var="logoutresult">
  622. <soap:message>
  623. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
  624. <soapenv:Header>
  625. <xog:Auth>
  626. <xog:SessionID>${sessionID}</xog:SessionID>
  627. </xog:Auth>
  628. </soapenv:Header>
  629. <soapenv:Body>
  630. <xog:Logout/>
  631. </soapenv:Body>
  632. </soapenv:Envelope>
  633. </soap:message>
  634. </soap:invoke>
  635.  
  636. </gel:script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement