Get-WorkdayWorker returns varying numbers of workers
This seems to pull random assortments of workers every time I run the command. I should have about 30k records in Workday, but running Get-WorkdayWorker returned 5900 (exactly) on the first run, then 401, 5001, 801, 101, and 1301 on subsequent runs.
Interesting. First, because I had no idea that anyone else was using this module. And second, because I am using that command several places in production and have not seen this behavior.
I just tested, it consistently returned 3466 active workers and 8786 using -Force to return all workers.
You could use -Verbose to see each HTTP post and response for each "page" of workers, which should be a consistent number.
Try this, to see if Workday might be struggling to count all 30k of your workers. I'll check in on you next week...
$request = [xml]@'
<bsvc:Get_Workers_Request xmlns:bsvc="urn:com.workday/bsvc">
<bsvc:Request_Criteria>
<bsvc:Exclude_Inactive_Workers>false</bsvc:Exclude_Inactive_Workers>
</bsvc:Request_Criteria>
<bsvc:Response_Filter>
<bsvc:Page>1</bsvc:Page>
</bsvc:Response_Filter>
<bsvc:Response_Group>
<bsvc:Include_Reference>true</bsvc:Include_Reference>
<bsvc:Include_Personal_Information>false</bsvc:Include_Personal_Information>
<bsvc:Include_Employment_Information>false</bsvc:Include_Employment_Information>
<bsvc:Include_Compensation>false</bsvc:Include_Compensation>
<bsvc:Include_Organizations>false</bsvc:Include_Organizations>
<bsvc:Include_Roles>false</bsvc:Include_Roles>
<bsvc:Include_Worker_Documents>false</bsvc:Include_Worker_Documents>
</bsvc:Response_Group>
</bsvc:Get_Workers_Request>
'@
$response = Invoke-WorkdayRequest -Request $request -Uri (Get-WorkdayEndpoint Human_Resources)
$response.Xml.Get_Workers_Response.Response_Results
Total_Results Total_Pages Page_Results Page
------------- ----------- ------------ ----
8786 88 100 1
Thanks for the info! I've been using this module for a couple months now and it's been great (now at my second full-time gig where I'm using it), so thanks for the work you've done on it! I'll give those flags a try tomorrow and see if I have any better luck (or at least more detailed information).
On Thu, Feb 15, 2018 at 5:45 PM, treestryder [email protected] wrote:
Interesting. First, because I had no idea that anyone else was using this module. And second, because I am using that command several places in production and have not seen this behavior.
I just tested, it consistently returned 3466 active workers and 8786 using -Force to return all workers.
You could use -Verbose to see each HTTP post and response for each "page" of workers, which should be a consistent number.
Try this, to see if Workday might not be struggling to count all 30k of your workers. I'll check in on you next week...
$request = [xml]@' <bsvc:Get_Workers_Request xmlns:bsvc="urn:com.workday/bsvc"> bsvc:Request_Criteria bsvc:Exclude_Inactive_Workersfalse</bsvc:Exclude_Inactive_Workers> </bsvc:Request_Criteria> bsvc:Response_Filter bsvc:Page1</bsvc:Page> </bsvc:Response_Filter> bsvc:Response_Group bsvc:Include_Referencetrue</bsvc:Include_Reference> bsvc:Include_Personal_Informationfalse</bsvc:Include_Personal_Information> bsvc:Include_Employment_Informationfalse</bsvc:Include_Employment_Information> bsvc:Include_Compensationfalse</bsvc:Include_Compensation> bsvc:Include_Organizationsfalse</bsvc:Include_Organizations> bsvc:Include_Rolesfalse</bsvc:Include_Roles> bsvc:Include_Worker_Documentsfalse</bsvc:Include_Worker_Documents> </bsvc:Response_Group> </bsvc:Get_Workers_Request> '@ $response = Invoke-WorkdayRequest -Request $request -Uri (Get-WorkdayEndpoint Human_Resources) $response.Xml.Get_Workers_Response.Response_Results
Total_Results Total_Pages Page_Results Page
8786 88 100 1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/treestryder/powershell_module_workdayapi/issues/1#issuecomment-366087376, or mute the thread https://github.com/notifications/unsubscribe-auth/AQDL73bSu17_NeEvVPvmNydM2nd6hqSgks5tVLOZgaJpZM4SHekc .
Just so you know, I too am using this module. It has helped us to automate many aspects of our migration to WorkDay and the integration with ActiveDirectory. Thank you for putting this out there.
W. Perry Harris Global Active Directory
As long as everyone understands that there are no guarantees. It is entirely possible that this module could cause baldness, could warp time and space, could kill your puppy or, could do nothing at all. I’ve shared what I am using, as a starting point for a community developed solution.
That definitely explains where all my hair went, then!
On Wed, Feb 21, 2018 at 11:04 AM, treestryder [email protected] wrote:
As long as everyone understands that there are no guarantees. It is entirely possible that this module could cause baldness, could warp time and space, could kill your puppy or, could do nothing at all. I’ve shared what I am using, as a starting point for a community developed solution.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/treestryder/powershell_module_workdayapi/issues/1#issuecomment-367375927, or mute the thread https://github.com/notifications/unsubscribe-auth/AQDL73Q7-7d4gy-Lg4o8X8XXxuP_ouCIks5tXD6CgaJpZM4SHekc .
@sup3rmark Were you able to determine if it is the script or Workday causing the inconsistent results?