SAP Knowledge Base Article - Public

2664244 - Query to PerPersonRelationship entity returns null when filtered with wfRequestNav/status

Symptom

You are  expanding wfRequest entity from PerPersonRelationship entity and putting a filter on the status proproperty of wfRequest entity, the response is null.

Environment

SuccessFactors BizX

Reproducing the Issue

1. You are using "PerPersonRelationship" entity to get dependent information.

2. You are using filter for the status (e.g. COMPLETED) of Workflow request (navigating to wfRequest entity : PerPersonRelationship->PerPersonal->WfRequest).

Example Query:

/odata/v2/PerPersonRelationship?$expand=personNav%2FemploymentNav%2FuserNav%2CrelationshipTypeNav%2FpicklistLabels%2CrelPersonNav%2CcustomString2Nav%2FpicklistLabels%2CrelPersonalNav%2FmaritalStatusNav%2FpicklistLabels%2CcustomString4Nav%2FpicklistLabels%2CcustomString3Nav%2FpicklistLabels%2CcustomString1Nav%2FpicklistLabels&$filter=lastModifiedDateTime%20ge%20datetimeoffset'2018-03-16T19%3A30%3A00.000Z'%20and%20relPersonalNav%2FwfRequestNav%2Fstatus%20eq%20'COMPLETED'&$top=25

3. The output is null / no data.

Cause

This is an expected behaviour.

Resolution

If you expand to wfRequest entity from PerPersonRelationship entity and put a filter on the status proproperty of wfRequest entity, if there is no workflow records of dependent user, the response should be null.

For example:

user 'smormony1' has a dependent (Child) user '117_d1466'. PerPersonRelationship-> relPersonalNav, got the information of user '117_d1466' (personIdExternal='117_d1466',startDate=datetime'2018-03-01T00:00:00'), then navigate from relPersonalNav to wfRequestNav, it will check if there is workflow of user '117_d1466'. If there is no workflow records of dependent user '117_d1466', the response should be null.

Testdata1.PNG

 

NOTE:

If we directly query PerPersonal and expand to wfRequestNav:

1. filter user 'smormony1', you will get the response of wfRequestNav/status


/odata/v2/PerPersonal?$select=personIdExternal,startDate,wfRequestNav/status&$expand=wfRequestNav&$format=json&$filter=personIdExternal+eq+'smormony1'

Testdata2.PNG

 

2. put filter on dependent user '117_d1466', the response will be null.


/odata/v2/PerPersonal?$select=personIdExternal,startDate,wfRequestNav/status&$expand=wfRequestNav&$format=json&$filter=personIdExternal+eq+'117_d1466'

Testdata3.PNG

Hence, the above mentioned behaviour is expected.

Keywords

wfRequestNav, PerPersonRelationship, dependent, navigation is not working, Workflow request , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-INC , Integration Center , Problem

Product

SAP SuccessFactors HCM Core 1711