Skip to main content
Nintex Community Menu Bar

K2 integration with SAP

  • October 8, 2019
  • 4 replies
  • 106 views
  • Translate

Hi,

I am trying to create a CRUD workflow using K2 and SAP. On SAP side we have exposed the functionality as OData service. I followed the video https://www.youtube.com/watch?v=sFjfS65CO1E and set up the OData Service broker as Service instance in K2. The SmartObject generated lists all the CRUD operations and the list function executes without any issues. The other operations create/update/delete fail with a message - CSRF token validation failed.

As per the article - https://help.sap.com/saphelp_gateway20sp12/helpdata/en/e6/cae27d5e8d4996add4067280c8714e/frameset.htm

the list function which is a non-modifying request sends a request header property x-csrf-token=fetch and retrieves a CSRF token. This token should be then used as request header property for the modifying requests. 

How can I set this up ? 

I have not found much information on CRUD operations for K2 + SAP using OData so any help is much appreciated. 

Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+9

Hi ns1


 


Check the attached link below:


https://help.k2.com/onlinehelp/k2five/devref/5.0/default.htm#Controls/CSRF-Validation.htm 


 


Regards


Elvis

Translate

  • Author
  • 4 replies
  • October 8, 2019

Thank you for your quick reply. I did see that article but this involves code updates and also we are using K2 Cloud rather than K2 Five. Does it still apply ?

 

Translate

  • Author
  • 4 replies
  • October 8, 2019

Can anybody help in retrieving a response header from a OData SmartObject ? I can then get the csrf token sent by SAP Gateway.

Translate

  • Author
  • 4 replies
  • October 10, 2019

We got round the issue by not passing x-csrf-token not ideal but atleast we got something running. I did manage to retrieve response headers but K2 does not supply them for list method.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings