uniblab icon

DownloadFacStaffList

uniblab | PRO | 03/09/18 11:25:25 PM UTC | 0 ⭐ | 1326 👁️ | Never ⏰ | []
XML |

4.6 KB

|

None

|

0 👍

/

0 👎

<?xml version="1.0" encoding="utf-8"?>
<WorkOrder xmlns="http://Icod.Wod" xsi:schemaLocation="http://Icod.Wod \\ourServer\Icod.Wod\schema0.xsd"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    emailTo="&lt;[email protected]&gt;, &lt;[email protected]&gt;, &lt;[email protected]&gt;, &lt;[email protected]&gt;"
>
    <!--
    emailTo="&lt;[email protected]&gt;"
    emailTo="&lt;[email protected]&gt;, &lt;[email protected]&gt;"
    emailTo="&lt;[email protected]&gt;, &lt;[email protected]&gt;, &lt;[email protected]&gt;, &lt;[email protected]&gt;"
    -->
    <steps>
        <fileOperation xsi:type="deleteFile" path="\\ourServer\FacStaffList" name="*_*.json" regexPattern="\\((dyson)|(hotel)|(jcb)|(johnson)|(sha))_((faculty)|(staff))\.json$" />
 
        <parallel>
            <steps>
                <!-- staff -->
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=hotel_staff"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="hotel_staff.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=sha_staff"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="sha_staff.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=johnson_staff"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="johnson_staff.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=jcb_staff"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="jcb_staff.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=dyson_staff"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="dyson_staff.json" />
                </fileOperation>
 
                <!-- faculty -->
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=sha_faculty"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="sha_faculty.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=johnson_faculty"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="johnson_faculty.json" />
                </fileOperation>
                <fileOperation xsi:type="copyFile" move="false"
                    path="https://someServer.example.com/app/human_resources/api/ccb_employees/mailing_list.json?type=dyson_faculty"
                    username="someUsername" password="somePassword"
                >
                    <destination path="\\ourServer\FacStaffList" name="dyson_faculty.json" />
                </fileOperation>
            </steps>
        </parallel>
 
        <dbCommand connectionStringName="SalesForce" commandText="delete from dbo.FacStaffStage" commandType="Text" commandTimeout="60" />
        <fileImport connectionStringName="SalesForce" updateBatchSize="60" tableName="FacStaffStage" namespace="dbo" commandTimeout="180" >
            <columnMapping>
                <map from="netid" to="NetId"/>
                <map from="title_work" to="Title"/>
                <map from="%wod:FileNameWithoutExtension%" to="FileNameWithoutExtension"/>
            </columnMapping>
            <source xsi:type="jsonFile" path="\\ourServer\FacStaffList" name="*_*.json" regexPattern="\\((dyson)|(hotel)|(jcb)|(johnson)|(sha))_((faculty)|(staff))\.json$" />
        </fileImport>
 
        <dbCommand connectionStringName="SalesForce" commandText="delete from dbo.FacStaffList" commandTimeout="60" />
        <dbCommand connectionStringName="SalesForce" commandType="Text" commandTimeout="180"
            commandText="insert into dbo.FacStaffList ( NetId, Title, Unit, Appointment ) ( select distinct NetId, Title, Unit, Appointment from dbo.FacStaffStageExport )"
        />
        <dbCommand connectionStringName="SalesForce" commandText="alter index all on dbo.FacStaffList rebuild" commandTimeout="240" />
    </steps>
</WorkOrder>

Comments