cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing the workflow API through CAP

UxKjaer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello experts.

I'm trying to access the Workflow API on CF through a remote service.

I've checked out some previous answers, namely these:

unable to call external service

starting workflow instance from cap

call Workflow API & write information back to (CAP) app

But I still can't seem to get it working. I can access my workflow via the approuter, but not when trying to do it via the cap service.

I get the error when calling the odata service

message: 'Error during request to remote service: Failed to build headers. Caused by: The destination tried to provide authorization tokens but failed in all cases. This is most likely due to misconfiguration.\n' +

'Original error messages:\n' +

'Bad credentials'

These are my settings:

.cdsrc.json:

default-env.json:

Approuter config:

Manifest yaml:

Destination:

gregorw
Active Contributor
0 Kudos

Can you please try if you can call the task-instances endpoint using this REST Client script: workflow.http when you've maintained the .env file with:

workflow_url=https://<your subaccount>.authentication.us10.hana.ondemand.com
workflow_rest= https://api.workflow-sap.cfapps.us10.hana.ondemand.com/workflow-service/rest
workflow_clientid=your client id
workflow_clientsecret =your client secret

You need to replace us10 with your region.

Marian_Zeis
Active Contributor
0 Kudos

Are you allowed to use Greenshot?

Makes it much easier to hide secrets in pictures 🙂

Accepted Solutions (1)

Accepted Solutions (1)

UxKjaer
Product and Topic Expert
Product and Topic Expert

I finally got it working. I ended up deleting my destination and recreating via the create from service instance. I had set the wrong authentication type. This is what got me rolling.

Answers (0)