cancel
Showing results for 
Search instead for 
Did you mean: 

Calling External API In Custom Task UI of SAP Build Process Automation

verreydthans
Participant
0 Kudos

Hi,

We're using SAP Build Process Automation for setting up a new workflow.
We created also Custom UI's as described here:

- https://help.sap.com/docs/workflow-capability/workflow-cloud-foundry/creating-custom-task-ui
- https://help.sap.com/docs/build-process-automation/sap-build-process-automation/technical-informatio...

Now, we want to use odata services from the backend system in these custom UI's.

I already followed the blog (https://blogs.sap.com/2020/09/08/calling-external-api-in-custom-task-ui-of-workflow-in-cloud-foundry/) but still, we're facing issues when using the odata services (http 500 - Internal server error)

- Destination created in BTP Cockpit

- xs-app.json updated

    {
"source": "^/S4HANA_Dev_Dest(.*)$",
"target": "$1",
"destination": "S4HANA_Development",
"authenticationType": "none",
"csrfProtection": false
},

- The steps for the mta file are a little bit confusing, as we're using the SAP Managed appRouter and so, we don't have the approuter as a module here...

- Manifest

        "dataSources": {
"productDropdown": {
"uri": "S4HANA_Dev_Dest/sap/opu/odata/sap/ZAPI_SRV",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/metadata.xml",
"odataVersion": "2.0"
}
}
}

Our URL's of the odata calls are like (wich returns http 500): https://company.sap-process-automation.cfapps.eu10.hana.ondemand.com/appRouter.customui-0.0.1/S4HANA...

When using the app as a "standalone app" within the Launchpad Module, the destination is reachable and OKAY

https://company.launchpad.cfapps.eu10.hana.ondemand.com/appRouter.customui-0.0.1/S4HANA_Dev_Dest/sap...

Any thoughts?

Thx!

Accepted Solutions (1)

Accepted Solutions (1)

verreydthans
Participant
0 Kudos

Apparently, the SBPA managed appRouter doesn't use the Connectivity Service.

So, no Destinations can be used in customUI apps currently.

issue addressed to SAP!

simonblaser_haufe
Discoverer
0 Kudos

Hello Hans,

do you have any status updates? Is there a ticket or something to follow your request to SAP?

Thank you already

Answers (1)

Answers (1)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Hans,
You should be able to call any external REST or ODATA APIs from custom Task UI build on SAPUI5 in SAP Build Process Automation. We have already used this in our pre-built content packages, and I have also have a section for Managed App-Router in my blog that you are referring above. You can use this content package for your reference, which has UI5-based-taskui to help you understand (open Lobby, goto store and import the content package, download the UI5 package, and import it in Business Application Studio)

Hope this helps,
Archana

naveed_shehzad
Explorer
0 Kudos

@ArchanaI am trying to import the content package, but getting error.

naveed_shehzad_0-1706779993441.png