cancel
Showing results for 
Search instead for 
Did you mean: 

BPM OData - Error in Completing task

Former Member
0 Kudos

Hello All,

I have created a custom task (using UI5) and deployed the same with BPM process on PO server. So, my UI5 is working fine and i am able to view the input data inside custom UI5 task, but i am getting below exception (in NWA) while trying to complete (approve) my task. Not sure what does below signifies?? Any pointers would be appreciated.

The Data Services Request version '3.0' is not supported for the request payload.


Traces from NWA -

Request URI: http://host:50000/bpmodata/taskdata.svc/5475c7ef719c11e4c8d300000034595e/OutputData.


HTTP Headers:
content-type: application/atom+xml; charset=UTF-8
connection: keep-alive
accept-language: en-US
Content-Length: 1692
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
dataserviceversion: 3.0
pragma: no-cache
cache-control: no-cache
cookie:
saplb_*
JSESSIONID
JSESSIONMARKID
MYSAPSSO2
x-csrf-token
maxdataserviceversion: 2.0
accept-encoding: gzip, deflate
referer
Accept: application/atom+xml,application/atomsvc+xml,application/xml

[EXCEPTION]
com.sap.core.odata.api.exception.ODataApplicationException: The Data Services Request version '3.0' is not supported for the request payload.
at com.sap.bpm.odata.logging.BPMODataErrorCallback.getExceptionForTracing(BPMODataErrorCallback.java:128)
at com.sap.bpm.odata.logging.BPMODataErrorCallback.handleError(BPMODataErrorCallback.java:95)
at com.sap.core.odata.core.ODataExceptionWrapper.handleErrorCallback(ODataExceptionWrapper.java:111)
at com.sap.core.odata.core.ODataExceptionWrapper.wrapInExceptionResponse(ODataExceptionWrapper.java:92)
at com.sap.core.odata.core.ODataRequestHandler.handle(ODataRequestHandler.java:115)
at com.sap.core.odata.core.rest.ODataSubLocator.handle(ODataSubLocator.java:128)
at com.sap.core.odata.core.rest.ODataSubLocator.handlePost(ODataSubLocator.java:63)
at sun.reflect.GeneratedMethodAccessor3269.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

Thanks

Amit Srivastava

Accepted Solutions (1)

Accepted Solutions (1)

former_member104848
Participant
0 Kudos

Hello Amit,

You can see in your HTTP request , you have the following header :

HTTP Headers:

content-type: application/atom+xml; charset=UTF-8

connection: keep-alive

accept-language: en-US

Content-Length: 1692

user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0

dataserviceversion: 3.0

pragma: no-cache

cache-control: no-cache

cookie:

saplb_*

JSESSIONID

JSESSIONMARKID

MYSAPSSO2

x-csrf-token

maxdataserviceversion: 2.0

accept-encoding: gzip, deflate

referer

Accept: application/atom+xml,application/atomsvc+xml,application/xml


The error says the backend does not support oData v3.0. You could see this link to understand the meaning of these headers : Setting the OData Data Service Version Headers


You could remove one of these headers and specify the version as 2.0.


Regards

Radhika

Former Member
0 Kudos

Hello Radhika,

Yaa, i noticed that DataServiceVersion is coming as 3.0, but the concern is i am not setting these headers anywhere in my controller (UI5) code.

I believe these headers are being set automatically by system while completing custom UI5 task using oData services.

TaskApproved : function() {  

              var Id1  = "5475c7ef719c11e4c8d300000034595e";

            var odataModel = this.getView().getModel();

var outputData = {};

            var ven = odataModel.getProperty("/InputData('" + Id1 + "')/Vendor/ContactDetails");

            outputData.Vendor = ven;

            odataModel.create("/OutputData", outputData, null, function() {

                  }, function(oEvent) {

                        alert("Error in Task Completion");

                  });

                        }



Thanks

Amit Sriavstava

former_member104848
Participant
0 Kudos

Hi Amit,

Which version are you on?

I do not see the version being set as 3.0, in the custom UI5 task , generated code. Nor do I see that UI5 sets this value as 3.0 by default.

Could you please recheck if this value for the header is being set elsewhere in your code?

Regards

Radhika

Former Member
0 Kudos

Hello,

I am using PO 7.31 SP11.

>>Could you please recheck if this value for the header is being set elsewhere in your code?

As already stated, i am not setting these headers anywhere in my view/controller code. It's a very simple UI5 application assigned to a NW BPM task (Using PI, reading vendor details from a file and then inside NW BPM assigning UI5 application to a task) and not sure where it's messed up...

In the past, i have implemented a ui5 application using PO 7.31 SP09 and there it was working fine.

Thanks

Amit Srivastava

former_member104848
Participant
0 Kudos

Hi Amit,

Would it be possible for you to zip and attach your Custom Task UI application code, so that I can check?

Regards

Radhika

former_member104848
Participant
0 Kudos

Hi Amit,

Meanwhile, could you also try to expicitly set the DataServiceVersion header value to 2.0 : as follows 

var odataModel = this.getView().getModel();

odataModel.oHeaders['DataServiceVersion'] = '2.0';


Please note though - this is not the recommended way as you access the internal variable of the UI5 oDataModel.


Regards

Radhika

Former Member
0 Kudos

Hello Radhika,

Please find view and controller code attached.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hello Radhika,

I tried adding the version of data service in the controller code, but it resulted into the same error again...

odataModel.oHeaders['DataServiceVersion'] = '2.0';



Thanks

Amit Srivastava

former_member104848
Participant
0 Kudos

This seems a little strange. As you said, I see no where in your application '3.0'.

Also, I don't see that UI5 can set this value by default within the framework.

UI5 ODataModel only allows setting the MaxDataServiceVersion value. Moreover the oDataModel supports v2.0 by default and says 3.0 support is only experimental.


We would probably need to look at this from a wider angle, with access to your application to see what is wrong. I would recommend you to create an OSS with access to your system to check the issue.


Regards

Radhika

former_member104848
Participant
0 Kudos

Is the value of the DataServiceVersion header in the odata request still 3.0 ?

Regards

Radhika

Former Member
0 Kudos

Yes.

hitesh_arora_erp
Participant
0 Kudos

Hi Amit,

I am also facing similar issue,were u able to resolve the same??

Regards,

Hitesh

Answers (1)

Answers (1)

mahdi
Newcomer
0 Kudos

Hi,

Do you have any arrays ([]) in your data you are sending back?