cancel
Showing results for 
Search instead for 
Did you mean: 

SCP CF Workflow - Service Task to SCP CF ABAP OData Service - XSRF Token Validation Failed

0 Kudos

Hello Community,

We are working on a PoC involving the workflow service in SCP CF environment connected to the ABAP environment in SCP CF (steampunk). We are encountering a failure where a service task cannot complete due to XSRF Token validation failing. Essentially the SCP CF Workflow service is unable to call / redirect to a SCP CF ABAP OData v2 service and complete a test DELETE operation

Here is the scenario:

  1. There is a simple OData v2 service built. It is located at the following relative path: /sap/opu/odata/sap/YSBTABLE;v=0001. The service endpoint is /SDTable and contains two records. We wish to delete one of those records as a test of the Service Task. We provide the key of the record to do so.
  2. In the destination of the service task, we have put the host of our ABAP environment in SCP CF: https://guid-removed.abap-web.us10.hana.ondemand.com/ Separately with our Infra team, we have maintained the Communication Arrangement as described in the SAP Help documentation in order to allow SCP CF ABAP and SCP CF Workflow to integrate with each other.
  3. The host in #2 concatenated with the endpoints in #1 point to a valid OData v2 service.
  4. In the path of the service task, we have put the information in #1: /sap/opu/odata/sap/YSBTABLE;v=0001/SDTable(${context.key})
  5. In the HTTP Method, we have selected DELETE
  6. In the path to XSRF Token, we have put the relative path: /sap/opu/odata/sap/YSBTABLE;v=0001. In the ABAP OData Service, a HEAD request to this endpoint generates the XSRF Token with the appropriate Fetch header.

Upon Building and Deploying this scenario, we start the workflow instance in the provided Portal apps and complete a user task to sequence to the service task. When the service task "completes", it returns in erroneous status with the response text XSRF Token Validation Failed and the record in #4 above is not deleted.

<removed issue around ill configured destination, configuration has been fixed. Unable to generate XSRF Token from HEAD Request>

Web IDE

Workflow

We would appreciate help straightening out this configuration. Please let us know if you need additional information! Thank you in advance!

View Entire Topic
0 Kudos

To resolve this issue, we had to complete the setup of our SCP CF ABAP environment's communication arrangement and communication scenario. Upon creating a communication scenario and arrangement, publishing it, and configuring it in SCP CF ABAP, this issue resolved itself.

The steps for proper configuration and completeness are found here:

https://developers.sap.com/tutorials/abap-environment-business-service-provisioning.html#849af707-00...
https://developers.sap.com/tutorials/abap-environment-communication-arrangement.html