uniblab

DownloadFacStaffList

Mar 9th, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.60 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <WorkOrder xmlns="http://Icod.Wod" xsi:schemaLocation="http://Icod.Wod \\ourServer\Icod.Wod\schema0.xsd"
  3.     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.     emailTo="&lt;foo@cornell.edu&gt;, &lt;bar@cornell.edu&gt;, &lt;baz@cornell.edu&gt;, &lt;quux@cornell.edu&gt;"
  5. >
  6.     <!--
  7.     emailTo="&lt;foo@cornell.edu&gt;"
  8.     emailTo="&lt;foo@cornell.edu&gt;, &lt;quux@cornell.edu&gt;"
  9.     emailTo="&lt;foo@cornell.edu&gt;, &lt;bar@cornell.edu&gt;, &lt;baz@cornell.edu&gt;, &lt;quux@cornell.edu&gt;"
  10.     -->
  11.     <steps>
  12.         <fileOperation xsi:type="deleteFile" path="\\ourServer\FacStaffList" name="*_*.json" regexPattern="\\((dyson)|(hotel)|(jcb)|(johnson)|(sha))_((faculty)|(staff))\.json$" />
  13.  
  14.         <parallel>
  15.             <steps>
  16.                 <!-- staff -->
  17.                 <fileOperation xsi:type="copyFile" move="false"
  18.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=hotel_staff"
  19.                     username="someUsername" password="somePassword"
  20.                 >
  21.                     <destination path="\\ourServer\FacStaffList" name="hotel_staff.json" />
  22.                 </fileOperation>
  23.                 <fileOperation xsi:type="copyFile" move="false"
  24.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=sha_staff"
  25.                     username="someUsername" password="somePassword"
  26.                 >
  27.                     <destination path="\\ourServer\FacStaffList" name="sha_staff.json" />
  28.                 </fileOperation>
  29.                 <fileOperation xsi:type="copyFile" move="false"
  30.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=johnson_staff"
  31.                     username="someUsername" password="somePassword"
  32.                 >
  33.                     <destination path="\\ourServer\FacStaffList" name="johnson_staff.json" />
  34.                 </fileOperation>
  35.                 <fileOperation xsi:type="copyFile" move="false"
  36.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=jcb_staff"
  37.                     username="someUsername" password="somePassword"
  38.                 >
  39.                     <destination path="\\ourServer\FacStaffList" name="jcb_staff.json" />
  40.                 </fileOperation>
  41.                 <fileOperation xsi:type="copyFile" move="false"
  42.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=dyson_staff"
  43.                     username="someUsername" password="somePassword"
  44.                 >
  45.                     <destination path="\\ourServer\FacStaffList" name="dyson_staff.json" />
  46.                 </fileOperation>
  47.  
  48.                 <!-- faculty -->
  49.                 <fileOperation xsi:type="copyFile" move="false"
  50.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=sha_faculty"
  51.                     username="someUsername" password="somePassword"
  52.                 >
  53.                     <destination path="\\ourServer\FacStaffList" name="sha_faculty.json" />
  54.                 </fileOperation>
  55.                 <fileOperation xsi:type="copyFile" move="false"
  56.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=johnson_faculty"
  57.                     username="someUsername" password="somePassword"
  58.                 >
  59.                     <destination path="\\ourServer\FacStaffList" name="johnson_faculty.json" />
  60.                 </fileOperation>
  61.                 <fileOperation xsi:type="copyFile" move="false"
  62.                     path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=dyson_faculty"
  63.                     username="someUsername" password="somePassword"
  64.                 >
  65.                     <destination path="\\ourServer\FacStaffList" name="dyson_faculty.json" />
  66.                 </fileOperation>
  67.             </steps>
  68.         </parallel>
  69.  
  70.         <dbCommand connectionStringName="SalesForce" commandText="delete from dbo.FacStaffStage" commandType="Text" commandTimeout="60" />
  71.         <fileImport connectionStringName="SalesForce" updateBatchSize="60" tableName="FacStaffStage" namespace="dbo" commandTimeout="180" >
  72.             <columnMapping>
  73.                 <map from="netid" to="NetId"/>
  74.                 <map from="title_work" to="Title"/>
  75.                 <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
  76.             </columnMapping>
  77.             <source xsi:type="jsonFile" path="\\ourServer\FacStaffList" name="*_*.json" regexPattern="\\((dyson)|(hotel)|(jcb)|(johnson)|(sha))_((faculty)|(staff))\.json$" />
  78.         </fileImport>
  79.  
  80.         <dbCommand connectionStringName="SalesForce" commandText="delete from dbo.FacStaffList" commandTimeout="60" />
  81.         <dbCommand connectionStringName="SalesForce" commandType="Text" commandTimeout="180"
  82.             commandText="insert into dbo.FacStaffList ( NetId, Title, Unit, Appointment ) ( select distinct NetId, Title, Unit, Appointment from dbo.FacStaffStageExport )"
  83.         />
  84.         <dbCommand connectionStringName="SalesForce" commandText="alter index all on dbo.FacStaffList rebuild" commandTimeout="240" />
  85.     </steps>
  86. </WorkOrder>
Add Comment
Please, Sign In to add comment