Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <WorkOrder xmlns="http://Icod.Wod" xsi:schemaLocation="http://Icod.Wod \\my-server\Icod.Wod\schema0.xsd"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- jobName="Employee feed from WorkDay"
- emailTo="none@example.com"
- >
- <variables>
- <variable name="employees" value="https://someLogin@SomeServer.example.com/app/human_resources/api/jcb_employees"/>
- <variable name="host" value="\\my-server\FacStaffList"/>
- </variables>
- <steps>
- <fileOperation xsi:type="mkDir" path="%var:host%" name="SourceXml" />
- <fileOperation xsi:type="deleteFile" path="%var:host%\SourceXml" name="*_*.xml"
- regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
- />
- <parallel>
- <steps>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=hotel_staff&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Hotel_Staff.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=sha_staff&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Sha_Staff.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=johnson_staff&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Johnson_Staff.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=jcb_staff&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Jcb_Staff.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=dyson_staff&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Dyson_Staff.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=sha_faculty&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Sha_Faculty.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=johnson_faculty&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Johnson_Faculty.xml"/>
- </fileOperation>
- <fileOperation xsi:type="jsonToXml" path="%var:employees%/mailing_list.json?type=dyson_faculty&extended_data=true"
- rootElementName="employeeList" elementName="employee"
- username="someLogin" password="******"
- >
- <destination path="%var:host%\SourceXml" name="Dyson_Faculty.xml"/>
- </fileOperation>
- </steps>
- </parallel>
- <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml" />
- <parallel>
- <steps>
- <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml\Employee" />
- <fileOperation xsi:type="mkDir" path="%var:host%" name="DestXml\Job" />
- </steps>
- </parallel>
- <parallel>
- <steps>
- <fileOperation xsi:type="deleteFile" path="%var:host%\DestXml\Employee" name="*_*.xml"
- regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
- />
- <fileOperation xsi:type="deleteFile" path="%var:host%\DestXml\Job" name="*_*.xml"
- regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
- />
- </steps>
- </parallel>
- <parallel>
- <steps>
- <fileOperation xsi:type="xmlTransformFile"
- path="%var:host%\SourceXml" name="*.xml"
- >
- <destination path="%var:host%\DestXml\Employee" />
- <xsltFile path="%var:host%" name="Employee.xslt" />
- </fileOperation>
- <fileOperation xsi:type="xmlTransformFile"
- path="%var:host%\SourceXml" name="*.xml"
- >
- <destination path="%var:host%\DestXml\Job" />
- <xsltFile path="%var:host%" name="Job.xslt" />
- </fileOperation>
- </steps>
- </parallel>
- <parallel>
- <steps>
- <dbCommand connectionStringName="SalesForce" commandType="Text" commandText="delete from WorkDay.EmployeeJobStaging" />
- <dbCommand connectionStringName="SalesForce" commandType="Text" commandText="delete from WorkDay.EmployeeStaging" />
- </steps>
- </parallel>
- <parallel>
- <steps>
- <dbFileImport connectionStringName="SalesForce" namespace="WorkDay" tableName="EmployeeStaging" updateBatchSize="500">
- <columnMapping>
- <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
- </columnMapping>
- <source xsi:type="xmlFile" path="%var:host%\DestXml\Employee" name="*_*.xml"
- regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
- />
- </dbFileImport>
- <dbFileImport connectionStringName="SalesForce" namespace="WorkDay" tableName="EmployeeJobStaging" updateBatchSize="500">
- <columnMapping>
- <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
- </columnMapping>
- <source xsi:type="xmlFile" path="%var:host%\DestXml\Job" name="*_*.xml"
- regexPattern="((Dyson)|(Hotel)|(Jcb)|(Johnson)|(Sha))_((Staff)|(Faculty))\.xml$"
- />
- </dbFileImport>
- </steps>
- </parallel>
- </steps>
- </WorkOrder>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement