
<d:GenerateNextPersonIDResponse xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:type="SFOData.GenerateNextPersonIDResponse">
<d:personID>10010</d:personID>
</d:GenerateNextPersonIDResponse>
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import java.lang.*
def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;
body = body.replaceAll("d:", "");
message.setBody(body);
return message;
}
{"User":{"User":{"userId":"10010","firstName":"Peggy","lastName":"Carter","hireDate":"2023-02-27T00:00:00.000","gender":"F","nationality":"999999999999","status":"t"}}}
"userId":"10010","firstName":"Peggy","lastName":"Carter","hireDate":"/Date(1677456000000)/","gender":"F","nationality":"999999999999","status":"t"
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import groovy.xml.XmlUtil;
import groovy.xml.StreamingMarkupBuilder;
import java.text.SimpleDateFormat;
import java.util.Date;
import groovy.xml.*; def Message processData(Message message) {
def properties = message.getProperties();
def hiredate = properties.get("hiredate");
if(hiredate!=''){
def sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss")
def date = sdf.parse(hiredate)
def epoch = date.time
dotNetDate = "/Date(" + epoch + ")/"
}
else{
dotNetDate='';
}
message.setProperty("hiredate", dotNetDate);
return message;
}
--batch_mybatch
Content-Type: multipart/mixed; boundary=changeset_mychangeset1
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "User(userId='${property.personID}')"
},
${property.userbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "PerPerson(personIdExternal='${property.personID}')"
},
${property.personbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "EmpEmployment(personIdExternal='${property.personID}',userId='${property.personID}')"
},
${property.emplbody},"isContingentWorker":true
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "WorkOrder(effectiveStartDate=datetime'${property.startdate}',userSysId='${property.personID}')"
},
${property.workbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "EmpJob(seqNumber=1,startDate=datetime'${property.startdate}',userId='${property.personID}')"
},
${property.jobbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "PerPersonal(personIdExternal='${property.personID}',startDate=datetime'${property.startdate}')"
},
${property.personalbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "PerNationalId(cardType='MisparZehut',country='ISR',personIdExternal='${property.personID}')"
},
${property.nationalbody},"isPrimary":true
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "PerAddressDEFLT(addressType='home',personIdExternal='${property.personID}',startDate=datetime'${property.startdate}')"
},
${property.addressbody}
}
--changeset_mychangeset1
Content-Type: application/http
Content-Transfer-Encoding: binary
POST upsert HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"__metadata": {
"uri": "PerPhone(phoneType='${property.optionPT}',personIdExternal='${property.personID}')"
},
${property.phonebody},"isPrimary":true
}
--changeset_mychangeset1--
--batch_mybatch--
--batch_a6a959f5-0d6a-48a6-9d2f-20f9ac746080
Content-Type: multipart/mixed; boundary=changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 150
{
"d" : [
{
"key" : "10010", "status" : "OK", "editStatus" : "INSERTED", "message" : null, "index" : 0, "httpCode" : 201, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 177
{
"d" : [
{
"key" : "PerPerson/personIdExternal=10010", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 208
{
"d" : [
{
"key" : "EmpEmployment/personIdExternal=10138,EmpEmployment/userId=10010", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 229
{
"d" : [
{
"key" : "WorkOrder/effectiveStartDate=2023-02-27T00:00:00.000+01:00,WorkOrder/userSysId=10010", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 559
{
"d" : [
{
"key" : "EmpJob/seqNumber=1,EmpJob/startDate=2023-02-27T00:00:00.000+01:00,EmpJob/userId=10010", "status" : "OK", "editStatus" : "UPSERTED","message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 231
{
"d" : [
{
"key" : "PerPersonal/personIdExternal=10010,PerPersonal/startDate=2023-02-27T00:00:00.000+01:00", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 242
{
"d" : [
{
"key" : "PerNationalId/cardType=MisparZehut,PerNationalId/country=ISR,PerNationalId/personIdExternal=10010", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 272
{
"d" : [
{
"key" : "PerAddressDEFLT/addressType=home,PerAddressDEFLT/personIdExternal=10010,PerAddressDEFLT/startDate=2023-02-27T00:00:00.000+01:00", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
successfactors-message: X-SF-Correlation-Id, successfactors-sourcetype are missing in request headers
Content-Length: 201
{
"d" : [
{
"key" : "PerPhone/personIdExternal=10010,PerPhone/phoneType=526", "status" : "OK", "editStatus" : "UPSERTED", "message" : null, "index" : 0, "httpCode" : 200, "inlineResults" : null
}
]
}
--changeset_2e0455d6-79e3-4161-871e-0cb754f8ff76--
--batch_a6a959f5-0d6a-48a6-9d2f-20f9ac746080--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
6 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |