11-06-2018 10:38 PM
I have a input csv data like below:
how to format & group the data to like below and how to pass the values to worker_reference
11-07-2018 06:38 AM
Are you trying to fit all of the rows from the input into the $Worker_Reference.ID
array? Like so:
{
Worker_Reference: {
ID: [
{ type: "Employee_ID", value: "A4" },
{ type: "Employee_ID", value: "A3" },
{ type: "Employee_ID", value: "A2" },
{ type: "Employee_ID", value: "A9" }
]
}
Or, is every row still a separate document, like so:
// Document #1
{
Worker_Reference: {
ID: [
{ type: "Employee_ID", value: "A4" }
]
}
// Document #2
{
Worker_Reference: {
ID: [
{ type: "Employee_ID", value: "A3" }
]
}
// ...
And, where does the $Provisioning_Group
value fit in?
11-07-2018 05:47 PM
It’s the first one, the target customized envelope is like below:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:ns0=“urn:com.workday/bsvc”>
SOAP-ENV:Header
ns0:Workday_Common_Header
ns0:Include_Reference_Descriptors_In_Response$Include_Reference_Descriptors_In_Response</ns0:Include_Reference_Descriptors_In_Response>
</ns0:Workday_Common_Header>
</SOAP-ENV:Header>
SOAP-ENV:Body
<ns0:Put_Provisioning_Group_Assignment_Request ns0:version=“$version”>
ns0:Provisioning_Group_Assignment_Data
ns0:Worker_Reference#foreach($ID in $Provisioning_Group_Assignment_Data.Worker_Reference.ID)
<ns0:ID ns0:type=“$ID.type”>$ID.value</ns0:ID>#end
</ns0:Worker_Reference>
ns0:Provisioning_Group$Provisioning_Group_Assignment_Data.Provisioning_Group</ns0:Provisioning_Group>
</ns0:Provisioning_Group_Assignment_Data>
</ns0:Put_Provisioning_Group_Assignment_Request>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>