cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in calling http service from workflow app in CF

vibiswal
Explorer
0 Kudos

Hello Experts,

I have created one workflow app in CF which works fine in terms of workflow API calls. But now my requirement is to call http service for which I have created one destination through which I am trying to call the service.

My issue is: when I add the destination in xs-app.json then my component.js is not getting loaded. But when I remove this destination from route in xs-app.json then my application is loading but service call gives "404 not found" error.

I have followed below URL and removed approuter from application.

https://help.sap.com/viewer/e157c391253b4ecd93647bf232d18a83/Cloud/en-US/6416241449b545469210b590f03...

Please provide your suggestion how can I make succes call to Http service.

Thanks,

Accepted Solutions (0)

Answers (4)

Answers (4)

Archana
Product and Topic Expert
Product and Topic Expert

Hello Vijaylaxmi,

My blog should help you: https://blogs.sap.com/2020/09/08/calling-external-api-in-custom-task-ui-of-workflow-in-cloud-foundry...

If you have added a destination in the your xs-app.json then you need to also have a destination service instance mentioned in mta.yaml. Check in my blog how to do so.

vibiswal
Explorer
0 Kudos

Thanks Balko,

Please find my response.

1. Destination created in cockpit.

2. Yes added destination in mta.yaml file.

3. Http service is in cloud not on onpremise.

Would like to know how can I add y destination in xs-app.json when there is no app-router in my custom UI application.

Thanks,

vbalko-claimate
Active Participant
0 Kudos

there is also (or should be) xs-app.json file in your custom UI - here in this repository I have sample of workflow MTA application with custom UI app. https://github.com/vbalko/SAP-mta-wf-customUI-sample

You can clone that and use it as a template for your application.

There is also a blog post describing how I made that application http://vbalko.blogspot.com/2020/09/create-workflow-mtar-application-with.html

And regarding your last question - how to add destination if you dont have app router.

You can add it to the xs-app.json of UI app, but you will still need approuter (maybe) from other project (MTA app) to have access point to your launchpad. If you have that - then you can add destination to the xs-app.json of that other app router.

I think that the steps from that help page are little bit confusing. That approuter should be deleted only when you are adding multiple UI applications to the project. You still need at least one app router to handle access requests.

vibiswal
Explorer
0 Kudos

Hello Archana,

The link which you provided above is for adding workflow standard destination. My requirement is to add http destination in xs-app.json which I explained more in below blog query. I dont have app router and xs-security.json.

In xs-app.json when I add new destination to call http service from controller code by ajax call I am not getting componet.js and if i remove that destination "404 not found" error I am getting.

https://blogs.sap.com/2020/08/27/starting-workflow-from-custom-fiori-application-in-cloud-foundry/co...

I really need any pointer so raised same question multiple times. Sorry for any confusion.

Thanks,

vbalko-claimate
Active Participant
0 Kudos

How you defined destination? As a env parameter or in the cockpit?

Did you add destination service as a requirement to the mta.yaml? Also notice, that if that destination targets on premise system through SAP Cloud Connector, then you need to add also Connectivity service as a requirement.

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos
0 Kudos

Hi Archana,

I have created workflow in cloud trail account, try to consume at Abap environment (RAP ). I have tested in SAP BUSINESS API environment working fine.

But while consuming from cloud abap getting authorization error like full authorization required .

Please help me to resolve this.

Thanks in advance.