cancel
Showing results for 
Search instead for 
Did you mean: 

oData not working in Workflow User Task

former_member185558
Active Participant
0 Kudos

My oData service works perfectly when tested on its own, but after it is not fetching any data when that UI5 is used as standard takk,

following is my oData get call

		oModel.read( sPath, {
				 urlParameters: {
				 //"$format": "JASON"
				// 	"$expand": "doc_descr,doc_longtext,doc_objectlinks"
				},
				error: function (oError) {
					 console.log("Error", oError);
				},
				success: function (oData, response) {
					console.log("oData", oData);
					console.log("Description", oData.Documentdata);
					console.log("Description2", oData.Documentdata.Description);
					// console.log("Description", oData.doc_descr.results);
					// console.log("Longtext", oData.doc_longtext.results);
					// console.log("Object Links", oData.doc_objectlinks.results);
					var oDescrModel = new sap.ui.model.json.JSONModel(oData.Documentdata);
					// var oLongTextModel = new sap.ui.model.json.JSONModel(oData.doc_longtext);
					oTable.setModel(oDescrModel);
					console.log("oDescrModel" , oDescrModel);
				}
			});

what could be issue? i checked NEO-APP Jason file for my APP it seens correct? please suggest and help in troubleshooting

former_member185558
Active Participant
0 Kudos

Hi Tobias,

Thanks for your reply,

I have couple of tables in UI5 app which are binded to respective oData services, those worked perfectly when i test index.html of UI5 app, then I made neccessary changes in component.js (to capture startupparameters etc) and linked that UI5 app to custom UI of task.

After deploying UI5 app and Workflow to cloud (although I got this message while deploying Workflow app to cloud : 12:04:47 AM (Application Index) URI block was not added to the manifest.json file: Unknown project guidelines)

When I tested workflow , the Task appears correctly in my inbox, and the workflow instance jason also correctly passed to my fields.

In above bottom two tables are emtpy , which worked correctly as UI5 app as I mentioned.

I am getting following in my console

oData calls appear to fail with 404 code

did add the code in Jurgen's answer below in my component.js of App.

Thanks and regards

View Entire Topic
thejk
Explorer
0 Kudos

Hi Niketan,

have you read this:

https://answers.sap.com/questions/12652598/no-items-shown-in-list-in-custom-user-task-ui-in-s.html?c...

looks like you have the same Problem that I answered there.

Regards,

Jürgen

former_member185558
Active Participant
0 Kudos

Thanks Juergen,

I did add the function at the end of component.js

former_member185558
Active Participant
0 Kudos

Thanks Juergen,

It seems it worked,

now its asking me user id / pwd while calling oData ,

somehow it seems some authentication issue

tobias_breyer
Contributor
0 Kudos

Hi Niketan,

you should check the destination that is used for the HTTP request that triggers that popup. As it is a browser popup, I suppose you should see a 401 status code in the network console for the relevant request.

One of the reasons for that popup can be that SSO does not work, because the destination is not of type App2AppSSO:

See

https://help.sap.com/viewer/f85276c5069a429fa37d1cd352785c25/Cloud/en-US/c628bb07530147c6ad292f03c3b...

Regards,

Tobias