Advertisement
uniblab

Untitled

Apr 17th, 2020
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.69 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <WorkOrder xmlns="http://Icod.Wod" xsi:schemaLocation="http://Icod.Wod \\my-server\Icod.Wod\schema0.xsd"
  3.     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.     jobName="Employee feed from WorkDay"
  5.     emailTo="none@example.com"
  6. >
  7.     <variables>
  8.         <variable name="employees" value="https://someLogin@SomeServer.example.com/app/human_resources/api/jcb_employees"/>
  9.         <variable name="host" value="\\my-server\FacStaffList"/>
  10.     </variables>
  11.  
  12.     <steps>
  13.         <fileOperation xsi:type="mkDir" path="%var:host%" name="SourceXml" />
  14.         <fileOperation xsi:type="deleteFile" path="%var:host%\SourceXml" name="*_*.xml"
  15.             regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
  16.         />
  17.         <parallel>
  18.             <steps>
  19.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=hotel_staff&amp;extended_data=true"
  20.                     rootElementName="employeeList" elementName="employee"
  21.                     username="someLogin" password="******"
  22.                 >
  23.                     <destination path="%var:host%\SourceXml" name="Hotel_Staff.xml"/>
  24.                 </fileOperation>
  25.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=sha_staff&amp;extended_data=true"
  26.                     rootElementName="employeeList" elementName="employee"
  27.                     username="someLogin" password="******"
  28.                 >
  29.                     <destination path="%var:host%\SourceXml" name="Sha_Staff.xml"/>
  30.                 </fileOperation>
  31.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=johnson_staff&amp;extended_data=true"
  32.                     rootElementName="employeeList" elementName="employee"
  33.                     username="someLogin" password="******"
  34.                 >
  35.                     <destination path="%var:host%\SourceXml" name="Johnson_Staff.xml"/>
  36.                 </fileOperation>
  37.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=jcb_staff&amp;extended_data=true"
  38.                     rootElementName="employeeList" elementName="employee"
  39.                     username="someLogin" password="******"
  40.                 >
  41.                     <destination path="%var:host%\SourceXml" name="Jcb_Staff.xml"/>
  42.                 </fileOperation>
  43.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=dyson_staff&amp;extended_data=true"
  44.                     rootElementName="employeeList" elementName="employee"
  45.                     username="someLogin" password="******"
  46.                 >
  47.                     <destination path="%var:host%\SourceXml" name="Dyson_Staff.xml"/>
  48.                 </fileOperation>
  49.  
  50.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=sha_faculty&amp;extended_data=true"
  51.                     rootElementName="employeeList" elementName="employee"
  52.                     username="someLogin" password="******"
  53.                 >
  54.                     <destination path="%var:host%\SourceXml" name="Sha_Faculty.xml"/>
  55.                 </fileOperation>
  56.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=johnson_faculty&amp;extended_data=true"
  57.                     rootElementName="employeeList" elementName="employee"
  58.                     username="someLogin" password="******"
  59.                 >
  60.                     <destination path="%var:host%\SourceXml" name="Johnson_Faculty.xml"/>
  61.                 </fileOperation>
  62.                 <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=dyson_faculty&amp;extended_data=true"
  63.                     rootElementName="employeeList" elementName="employee"
  64.                     username="someLogin" password="******"
  65.                 >
  66.                     <destination path="%var:host%\SourceXml" name="Dyson_Faculty.xml"/>
  67.                 </fileOperation>
  68.             </steps>
  69.         </parallel>
  70.  
  71.  
  72.         <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml" />
  73.         <parallel>
  74.             <steps>
  75.                 <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml\Employee" />
  76.                 <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml\Job" />
  77.             </steps>
  78.         </parallel>
  79.         <parallel>
  80.             <steps>
  81.                 <fileOperation xsi:type="deleteFile" path="%var:host%\DestXml\Employee" name="*_*.xml"
  82.                     regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
  83.                 />
  84.                 <fileOperation xsi:type="deleteFile" path="%var:host%\DestXml\Job" name="*_*.xml"
  85.                     regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
  86.                 />
  87.             </steps>
  88.         </parallel>
  89.         <parallel>
  90.             <steps>
  91.                 <fileOperation xsi:type="xmlTransformFile"
  92.                     path="%var:host%\SourceXml" name="*.xml"
  93.                 >
  94.                     <destination path="%var:host%\DestXml\Employee" />
  95.                     <xsltFile path="%var:host%" name="Employee.xslt" />
  96.                 </fileOperation>
  97.                 <fileOperation xsi:type="xmlTransformFile"
  98.                     path="%var:host%\SourceXml" name="*.xml"
  99.                 >
  100.                     <destination path="%var:host%\DestXml\Job" />
  101.                     <xsltFile path="%var:host%" name="Job.xslt" />
  102.                 </fileOperation>
  103.             </steps>
  104.         </parallel>
  105.  
  106.  
  107.         <parallel>
  108.             <steps>
  109.                 <dbCommand connectionStringName="SalesForce" commandType="Text" commandText="delete from WorkDay.EmployeeJobStaging" />
  110.                 <dbCommand connectionStringName="SalesForce" commandType="Text" commandText="delete from WorkDay.EmployeeStaging" />
  111.             </steps>
  112.         </parallel>
  113.         <parallel>
  114.             <steps>
  115.                 <dbFileImport connectionStringName="SalesForce" namespace="WorkDay" tableName="EmployeeStaging" updateBatchSize="500">
  116.                     <columnMapping>
  117.                         <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
  118.                     </columnMapping>
  119.                     <source xsi:type="xmlFile" path="%var:host%\DestXml\Employee" name="*_*.xml"
  120.                         regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
  121.                     />
  122.                 </dbFileImport>
  123.                 <dbFileImport connectionStringName="SalesForce" namespace="WorkDay" tableName="EmployeeJobStaging" updateBatchSize="500">
  124.                     <columnMapping>
  125.                         <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
  126.                     </columnMapping>
  127.                     <source xsi:type="xmlFile" path="%var:host%\DestXml\Job" name="*_*.xml"
  128.                         regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
  129.                     />
  130.                 </dbFileImport>
  131.             </steps>
  132.         </parallel>
  133.  
  134.     </steps>
  135.  
  136. </WorkOrder>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement