Skip to Content

The ODATA Source doesn't work in SAP Custom UI Task

Hi Experts,

I am new on Workflow SACP. I want include a custom UI User Task but i want to include a UploadCollection with files to permit to the user take decision in some documents related to the user decision. In conclusion i need to add an OData source as usual.

I create a WF in the SAP Web IDE like:

After that i can include a task of ui as the item in the menu allow to include in the project folder

It will create a folder with the app as a usual SAPUI5 application. After that i try to use one of my destinations that i used in other applications.

The change is reflected in the manifest.json as is expected.

After the definition i include it in the workflow model and deploy the "workflow custom task" and the "workflow model". Starting the application on the inbox. I can't access to my model app:

I saw it in Network tab with a 404:$metadata?sap-language=ES

I had read some entries on blogs that we need to change the URI of the odata source to get connected into MyInboxApp:$metadata /$metadata

But i can't reach my odata source. I try to guess which uri at least with the metadata information in a get request and in other way using the component or another advice. For e.g.

or Component.js

* Overwrite function of UIComponent because if running in MyInbox-App we need a different URL for our oData-Service
* @param oManifestModels
* @param oManifestDataSources
	_initComponentModels: function(oManifestModels, oManifestDataSources) {
			var service;
			// running in Inbox?
			if (this.getComponentData() && this.getComponentData().startupParameters) {
				var startupParameters = this.getComponentData().startupParameters;
				if (startupParameters.inboxAPI) {
					// yes, prefix the oData URL with the path of the Application
					var prefix = "/" + startupParameters.oParameters.sApplicationPath;
					for (service in oManifestDataSources)
						if (, service))
							if (oManifestDataSources[service].uri)
								oManifestDataSources[service].uri = prefix + oManifestDataSources[service].uri;
					for (service in oManifestModels)
						if (, service))
							if (oManifestModels[service].uri)
								oManifestModels[service].uri = prefix + oManifestModels[service].uri;
			}, oManifestModels, oManifestDataSources);

But i can't reach the odata source.

Any idea to override that connection for my destination?

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.