SAP Knowledge Base Article - Public

3700589 - Workflow API Discrepancy in Owner Data Retrieval - WfRequestStep OData API

Symptom

The API WfRequestStep is being used to retrieve data from each Workflow step, but some of the steps have the ownerId and ownerNav equal to null. On the UI all the approvers are visible.

Environment

SAP SuccessFactors HCM Suite

  • OData API

Reproducing the Issue

  1. API call to /odata/v2/WfRequestStep
  2. On the response, both ownerId and ownerNav are null:
    • "ownerId": null
    • "ownerNav": null

Cause

The Workflow API behavior aligns with the guide specifications. For approver types such as "Dynamic Group" and "Position," the 'ownerId' and 'ownerNav' fields are null, as these steps have multiple owners. For approver type "Role," the 'ownerId' field is populated with the UserID.

To check what is the approverType a query to WfRequestStep can be performed, where the approver type is returned, such as "approverType": "POSITION". This can be checked on the UI as well.

To check the workflow configuration on the UI, the following steps can be followed:

1. Make a query to WfRequestStep, this will return the wfRequestStepId

2. Get the wfRequestStepId and make an API call to EmpWfRequest and filter by the WfRequestId. This will return the field wfConfig with the workflow name

3. On the UI, go to Manage Organization, Pay and Job Structures

This will return all the configuration from thw Workflow, including the Approver Type.

Resolution

  1. Verify the Workflow Request ID associated with the steps in the API response.
  2. Confirm that the approver type matches the expected behavior as described in the guide:
  • Dynamic Group: `ownerId` and `ownerNav` are null.
  • Position: `ownerId` and `ownerNav` are null.
  • Role: `ownerId` is populated with the UserID.
  1. If the API response aligns with the guide's behavior, no further action is required.
  2. If discrepancies persist, enable OData API Audit Logs in the SuccessFactors instance as per KBA 3141692.
  3. Wait for 5 minutes after enabling the logs.
  4. Reproduce the issue and collect the full payloads (query) from the OData API Audit Logs in SuccessFactors.
  5. Identify the specific API call in the logs and collect all related log files.
  6. Share the collected logs with SAP Support for further investigation.

See Also

Keywords

workflow api, approver mismatch, dynamic group, position approver, role approver, odata api, successfactors approval workflow, api response discrepancy, approval process visibility, workflow request id, api audit logs , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite all versions