Advertisement
Guest User

HRProcess.bpel

a guest
Jan 22nd, 2013
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.49 KB | None | 0 0
  1. <!-- HRLDAPProces BPEL Process [Generated by the Eclipse BPEL Designer] -->
  2. <!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
  3. <bpel:process name="HRLDAPProces"
  4. targetNamespace="http://ldap.ecis.police.uk/Person/process"
  5. suppressJoinFailure="yes"
  6. xmlns:tns="http://ldap.ecis.police.uk/Person/process"
  7. xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
  8. xmlns:ldap="http://webservices.hrldaplookup.ecis.police.uk/" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://uk.police.ecis.police.uk/athena/services/ConstrainedValueService" xmlns:ns="http://webservices.cvmanagement.athena.ecis.police.uk/">
  9.  
  10. <!-- Import the client WSDL -->
  11. <bpel:import namespace="http://webservices.cvmanagement.athena.ecis.police.uk/" location="ConstrainedValueService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
  12. <bpel:import namespace="http://uk.police.ecis.police.uk/athena/services/ConstrainedValueService" location="ConstrainedValueService_1.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
  13. <bpel:import namespace="http://webservices.hrldaplookup.ecis.police.uk/" location="LDAPLookupServiceImpl.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
  14. <bpel:import location="HRLDAPProcesArtifacts.wsdl" namespace="http://ldap.ecis.police.uk/Person/process"
  15. importType="http://schemas.xmlsoap.org/wsdl/" />
  16.  
  17. <!-- ================================================================= -->
  18. <!-- PARTNERLINKS -->
  19. <!-- List of services participating in this BPEL process -->
  20. <!-- ================================================================= -->
  21. <bpel:partnerLinks>
  22. <!-- The 'client' role represents the requester of this service. -->
  23. <bpel:partnerLink name="client"
  24. partnerLinkType="tns:HRLDAPProces"
  25. myRole="HRLDAPProcesProvider"
  26. />
  27. <bpel:partnerLink name="LDAPLookupPL" partnerLinkType="tns:LDAPLookupPLT" partnerRole="LDAPLookupServiceRole"></bpel:partnerLink>
  28.  
  29. <bpel:partnerLink name="CVServicePL" partnerLinkType="tns:CVServicePLT" partnerRole="CVServiceRole"></bpel:partnerLink>
  30. </bpel:partnerLinks>
  31.  
  32. <!-- ================================================================= -->
  33. <!-- VARIABLES -->
  34. <!-- List of messages and XML documents used within this BPEL process -->
  35. <!-- ================================================================= -->
  36. <bpel:variables>
  37. <!-- Reference to the message passed as input during initiation -->
  38. <bpel:variable name="input"
  39. messageType="tns:HRLDAPProcesRequestMessage"/>
  40.  
  41. <!--
  42. Reference to the message that will be returned to the requester
  43. -->
  44. <bpel:variable name="output"
  45. messageType="tns:HRLDAPProcesResponseMessage"/>
  46. <bpel:variable name="LDAPLookupResponse" messageType="ldap:getPersonnelResponse"></bpel:variable>
  47. <bpel:variable name="LDAPLookupRequest" messageType="ldap:getPersonnel"></bpel:variable>
  48. <bpel:variable name="rankCVInput" type="ns1:string"><from></from></bpel:variable>
  49. <bpel:variable name="forceCVInput" type="ns1:string"><from></from></bpel:variable>
  50.  
  51.  
  52. <bpel:variable name="CVServiceResponse" messageType="ns:getCVResponse"></bpel:variable>
  53. <bpel:variable name="CVServiceRequest" messageType="ns:getCV"></bpel:variable>
  54. </bpel:variables>
  55.  
  56. <!-- ================================================================= -->
  57. <!-- ORCHESTRATION LOGIC -->
  58. <!-- Set of activities coordinating the flow of messages across the -->
  59. <!-- services integrated within this business process -->
  60. <!-- ================================================================= -->
  61. <bpel:sequence name="main">
  62.  
  63. <!-- Receive input from requester.
  64. Note: This maps to operation defined in HRLDAPProces.wsdl
  65. -->
  66. <bpel:receive name="receiveInput" partnerLink="client"
  67. portType="tns:HRLDAPProces"
  68. operation="process" variable="input"
  69. createInstance="yes"/>
  70.  
  71. <!-- Generate reply to synchronous request -->
  72. <bpel:sequence name="LDAPLookupSequence">
  73. <bpel:assign validate="no" name="VariableAssign">
  74. <bpel:copy>
  75. <bpel:from>
  76. <bpel:literal xml:space="preserve"><ldap:getPersonnel xmlns:ldap="http://webservices.hrldaplookup.ecis.police.uk/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  77. <forceNumber></forceNumber>
  78. <attributes title=""></attributes>
  79. <attributes title=""></attributes>
  80. <attributes title=""></attributes>
  81. <attributes title=""></attributes>
  82. <attributes title=""></attributes>
  83. <attributes title=""></attributes>
  84. <attributes title=""></attributes>
  85. <attributes title=""></attributes>
  86. <attributes title=""></attributes>
  87. <attributes title=""></attributes>
  88. <serverName></serverName>
  89. <baseNode></baseNode>
  90. </ldap:getPersonnel></bpel:literal>
  91. </bpel:from>
  92. <bpel:to variable="LDAPLookupRequest" part="parameters"></bpel:to>
  93. </bpel:copy>
  94. <bpel:copy keepSrcElementName="no">
  95. <bpel:from part="payload" variable="input">
  96. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  97. <![CDATA[tns:input]]>
  98. </bpel:query>
  99. </bpel:from>
  100. <bpel:to part="parameters" variable="LDAPLookupRequest">
  101. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  102. <![CDATA[forceNumber]]>
  103. </bpel:query>
  104. </bpel:to>
  105. </bpel:copy>
  106. <bpel:copy>
  107. <bpel:from>
  108. <bpel:literal xml:space="preserve">LDAP8.xxx.xxx.uxxx:389</bpel:literal>
  109. </bpel:from>
  110. <bpel:to part="parameters" variable="LDAPLookupRequest">
  111. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[serverName]]></bpel:query>
  112. </bpel:to>
  113. </bpel:copy>
  114. <bpel:copy>
  115. <bpel:from>
  116. <bpel:literal xml:space="preserve">dc=ecis</bpel:literal>
  117. </bpel:from>
  118. <bpel:to part="parameters" variable="LDAPLookupRequest">
  119. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[baseNode]]></bpel:query>
  120. </bpel:to>
  121. </bpel:copy>
  122. <bpel:copy>
  123. <bpel:from>
  124. <bpel:literal xml:space="preserve">Fullname</bpel:literal>
  125. </bpel:from>
  126. <bpel:to part="parameters" variable="LDAPLookupRequest">
  127. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  128. <![CDATA[attributes[1]]]>
  129. </bpel:query>
  130. </bpel:to>
  131. </bpel:copy>
  132. <bpel:copy>
  133. <bpel:from>
  134. <bpel:literal xml:space="preserve">FULLNAME</bpel:literal>
  135. </bpel:from>
  136. <bpel:to part="parameters" variable="LDAPLookupRequest">
  137. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[1]/@title]]></bpel:query>
  138. </bpel:to>
  139. </bpel:copy>
  140. <bpel:copy>
  141. <bpel:from>
  142. <bpel:literal xml:space="preserve">First Name</bpel:literal>
  143. </bpel:from>
  144. <bpel:to part="parameters" variable="LDAPLookupRequest">
  145. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  146. <![CDATA[attributes[2]]]>
  147. </bpel:query>
  148. </bpel:to>
  149. </bpel:copy>
  150. <bpel:copy>
  151. <bpel:from>
  152. <bpel:literal xml:space="preserve">givenName</bpel:literal>
  153. </bpel:from>
  154. <bpel:to part="parameters" variable="LDAPLookupRequest">
  155. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[2]/@title]]></bpel:query>
  156. </bpel:to>
  157. </bpel:copy>
  158. <bpel:copy>
  159. <bpel:from>
  160. <bpel:literal xml:space="preserve">Last Name</bpel:literal>
  161. </bpel:from>
  162. <bpel:to part="parameters" variable="LDAPLookupRequest">
  163. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  164. <![CDATA[attributes[3]]]>
  165. </bpel:query>
  166. </bpel:to>
  167. </bpel:copy>
  168. <bpel:copy>
  169. <bpel:from>
  170. <bpel:literal xml:space="preserve">sn</bpel:literal>
  171. </bpel:from>
  172. <bpel:to part="parameters" variable="LDAPLookupRequest">
  173. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[3]/@title]]></bpel:query>
  174. </bpel:to>
  175. </bpel:copy>
  176. <bpel:copy>
  177. <bpel:from>
  178. <bpel:literal xml:space="preserve">Collar Number</bpel:literal>
  179. </bpel:from>
  180. <bpel:to part="parameters" variable="LDAPLookupRequest">
  181. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  182. <![CDATA[attributes[4]]]>
  183. </bpel:query>
  184. </bpel:to>
  185. </bpel:copy>
  186. <bpel:copy>
  187. <bpel:from>
  188. <bpel:literal xml:space="preserve">cn</bpel:literal>
  189. </bpel:from>
  190. <bpel:to part="parameters" variable="LDAPLookupRequest">
  191. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[4]/@title]]></bpel:query>
  192. </bpel:to>
  193. </bpel:copy>
  194. <bpel:copy>
  195. <bpel:from>
  196. <bpel:literal xml:space="preserve">Force Number</bpel:literal>
  197. </bpel:from>
  198. <bpel:to part="parameters" variable="LDAPLookupRequest">
  199. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  200. <![CDATA[attributes[5]]]>
  201. </bpel:query>
  202. </bpel:to>
  203. </bpel:copy>
  204. <bpel:copy>
  205. <bpel:from>
  206. <bpel:literal xml:space="preserve">uid</bpel:literal>
  207. </bpel:from>
  208. <bpel:to part="parameters" variable="LDAPLookupRequest">
  209. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[5]/@title]]></bpel:query>
  210. </bpel:to>
  211. </bpel:copy>
  212. <bpel:copy>
  213. <bpel:from>
  214. <bpel:literal xml:space="preserve">Email address</bpel:literal>
  215. </bpel:from>
  216. <bpel:to part="parameters" variable="LDAPLookupRequest">
  217. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  218. <![CDATA[attributes[6]]]>
  219. </bpel:query>
  220. </bpel:to>
  221. </bpel:copy>
  222. <bpel:copy>
  223. <bpel:from>
  224. <bpel:literal xml:space="preserve">mail</bpel:literal>
  225. </bpel:from>
  226. <bpel:to part="parameters" variable="LDAPLookupRequest">
  227. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[6]/@title]]></bpel:query>
  228. </bpel:to>
  229. </bpel:copy>
  230. <bpel:copy>
  231. <bpel:from>
  232. <bpel:literal xml:space="preserve">Location</bpel:literal>
  233. </bpel:from>
  234. <bpel:to part="parameters" variable="LDAPLookupRequest">
  235. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  236. <![CDATA[attributes[7]]]>
  237. </bpel:query>
  238. </bpel:to>
  239. </bpel:copy>
  240. <bpel:copy>
  241. <bpel:from>
  242. <bpel:literal xml:space="preserve">l</bpel:literal>
  243. </bpel:from>
  244. <bpel:to part="parameters" variable="LDAPLookupRequest">
  245. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[7]/@title]]></bpel:query>
  246. </bpel:to>
  247. </bpel:copy>
  248. <bpel:copy>
  249. <bpel:from>
  250. <bpel:literal xml:space="preserve">Managers Name</bpel:literal>
  251. </bpel:from>
  252. <bpel:to part="parameters" variable="LDAPLookupRequest">
  253. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  254. <![CDATA[attributes[8]]]>
  255. </bpel:query>
  256. </bpel:to>
  257. </bpel:copy>
  258. <bpel:copy>
  259. <bpel:from>
  260. <bpel:literal xml:space="preserve">MANAGERNAME</bpel:literal>
  261. </bpel:from>
  262. <bpel:to part="parameters" variable="LDAPLookupRequest">
  263. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[8]/@title]]></bpel:query>
  264. </bpel:to>
  265. </bpel:copy>
  266. <bpel:copy>
  267. <bpel:from>
  268. <bpel:literal xml:space="preserve">Managers Force Number</bpel:literal>
  269. </bpel:from>
  270. <bpel:to part="parameters" variable="LDAPLookupRequest">
  271. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  272. <![CDATA[attributes[9]]]>
  273. </bpel:query>
  274. </bpel:to>
  275. </bpel:copy>
  276. <bpel:copy>
  277. <bpel:from>
  278. <bpel:literal xml:space="preserve">MANAGERCN</bpel:literal>
  279. </bpel:from>
  280. <bpel:to part="parameters" variable="LDAPLookupRequest">
  281. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[9]/@title]]></bpel:query>
  282. </bpel:to>
  283. </bpel:copy>
  284. <bpel:copy>
  285. <bpel:from>
  286. <bpel:literal xml:space="preserve">Rank</bpel:literal>
  287. </bpel:from>
  288. <bpel:to part="parameters" variable="LDAPLookupRequest">
  289. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  290. <![CDATA[attributes[10]]]>
  291. </bpel:query>
  292. </bpel:to>
  293. </bpel:copy>
  294. <bpel:copy>
  295. <bpel:from>
  296. <bpel:literal xml:space="preserve">employeeType</bpel:literal>
  297. </bpel:from>
  298. <bpel:to part="parameters" variable="LDAPLookupRequest">
  299. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[attributes[10]/@title]]></bpel:query>
  300. </bpel:to>
  301. </bpel:copy>
  302. <bpel:copy>
  303. <bpel:from>
  304. <bpel:literal xml:space="preserve">046</bpel:literal>
  305. </bpel:from>
  306. <bpel:to variable="forceCVInput"></bpel:to>
  307. </bpel:copy>
  308. </bpel:assign>
  309. <bpel:invoke name="LDAPLookupInvoke" partnerLink="LDAPLookupPL" operation="getPersonnel" portType="ldap:LDAPLookupServiceImpl" inputVariable="LDAPLookupRequest" outputVariable="LDAPLookupResponse"></bpel:invoke>
  310.  
  311. <bpel:assign validate="no" name="CVVariableAssign">
  312.  
  313. <bpel:copy>
  314. <bpel:from>
  315. <bpel:literal>
  316. <tns:getCV xmlns:tns="http://webservices.cvmanagement.athena.ecis.police.uk/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><forceId>046</forceId>
  317. <sourceSystemId>hr</sourceSystemId>
  318. <targetSystemId>Athena</targetSystemId>
  319. <sourceCV>PSE</sourceCV>
  320.  
  321. </tns:getCV>
  322. </bpel:literal>
  323. </bpel:from>
  324. <bpel:to part="parameters" variable="CVServiceRequest"></bpel:to>
  325. </bpel:copy>
  326.  
  327. <bpel:copy>
  328. <bpel:from part="parameters" variable="LDAPLookupResponse">
  329. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
  330. <![CDATA[ldap:personnelData/ldap:detail/ldap:item[1]/@title]]>
  331. </bpel:query>
  332. </bpel:from>
  333. <bpel:to part="parameters" variable="CVServiceRequest">
  334. <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[sourceCV]]></bpel:query>
  335. </bpel:to>
  336. </bpel:copy>
  337. </bpel:assign>
  338.  
  339. <bpel:invoke name="CVRankInvoke" partnerLink="CVServicePL" operation="getCV" portType="ns:ConstrainedValueService" inputVariable="CVServiceRequest" outputVariable="CVServiceResponse"></bpel:invoke>
  340. <bpel:assign validate="no" name="ResultsAssign">
  341. <bpel:copy>
  342. <bpel:from>
  343. <bpel:literal>
  344. <tns:HRLDAPProcesResponse xmlns:tns="http://ldap.ecis.police.uk/Person/process" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:result>tns:result</tns:result>
  345.  
  346. </tns:HRLDAPProcesResponse>
  347. </bpel:literal>
  348. </bpel:from>
  349. <bpel:to variable="output" part="payload"></bpel:to>
  350. </bpel:copy>
  351.  
  352. <bpel:copy>
  353. <bpel:from>
  354.  
  355. <![CDATA[$LDAPLookupResponse.parameters//item[1]]]>
  356. </bpel:from>
  357. <bpel:to>$output.payload/tns:result</bpel:to>
  358. </bpel:copy>
  359.  
  360. </bpel:assign>
  361. </bpel:sequence>
  362. <bpel:reply name="replyOutput"
  363. partnerLink="client"
  364. portType="tns:HRLDAPProces"
  365. operation="process"
  366. variable="output"
  367. />
  368. </bpel:sequence>
  369. </bpel:process>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement