cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP CF: workflow - configure service task

former_member729305
Participant

Dear all,

I am currently configuring a service task within my workflow which has the function to write back the status of my workflow to my (CAP) app which lies within the Cloud. So there is no backend connected. Once a new Item (Book) has been confirmed/rejected the decision should be written/patched into my app for that book record into the field "status_workflow" --> see Path below in Service Task.

The issue is that if I try a PATCH request I receive the response: "failed with status code 401 (Unauthorized) and response body 'Unauthorized'". The GET request goes through but responds "The 'Content-Type' header of the HTTP response contained the value 'text/html' not a 'application/json' or a JSON-compatible mime-type as expected."

My destination is OAuth which is why I assume XSRF Token is not needed. It provides the entry link to my application and points to my Workflow Service Instance in client credentials(Id and Secret).

Does anyone of you have an idea how to approach that issue?

I would be very grateful for receiving answers

Best Regards

Max

Service Task:

Header Information - not sure if these are really necessary

destination:

View Entire Topic
haraldschubert
Advisor
Advisor
0 Kudos

Hi Max,

your CAP app is protected through an XSUAA instance. You need to maintain a destination with the URL set to point to your app. The security related attributes of the destination need to match the values of the XSUAA instance. Then, I would assume you would want to propagate the principal from Workflow to CAP. Service tasks support principal propagation. Finally, you need to make sure the user that is propagated has the necessary roles assigned defined in the xs-security.json for your XSUAA.

Cheers,

Harald