cancel
Showing results for 
Search instead for 
Did you mean: 

BPM OData Service - Not able to access input data

Former Member
0 Kudos

I am tring to follow steps mentioned in the below blog

http://scn.sap.com/community/bpm/blog/2013/10/18/bpm-odata-exploring-the-service

I am able to access the metadata of my task but i am not able to get the inputdata of my task.

1. When i use the below URL, i get the entity details.

http://hostname:port/bpmodata/taskdata.svc/<taskid>/$metadata

===================================

</EntityType>

<EntityType Name="Context_RequestInfo">

<Key>

<PropertyRef Name="EDM_Key"/>

</Key>

<Property Name="EDM_Key" Type="Edm.String" Nullable="false"/>

<Property Name="id" Type="Edm.Int64" Nullable="true" DefaultValue="0"/>

<Property Name="status" Type="Edm.String" Nullable="true"/>

</EntityType>

<EntityType Name="ReviewRequestCompleteEventTypeOUTPUT">

<Key>

<PropertyRef Name="EDM_Key"/>

</Key>

<Property Name="EDM_Key" Type="Edm.String" Nullable="false"/>

<NavigationProperty Name="ReviewRequestCompleteEvent" Relationship="BPMTaskData.ReviewRequestCompleteEventTypeOUTPUT_Context" FromRole="ReviewRequestCompleteEventTypeOUTPUT" ToRole="Context"/>

</EntityType>

==================================

2. When i use the below URL, i get the InputData details

http://hostname:port/bpmodata/taskdata.svc/<taskid>/InputData('<taskid>')

=========================

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://hostname:port/bpmodata/taskdata.svc/<taskid>/">

<id>

http://hostname:port/bpmodata/taskdata.svc/<taskid>/InputData('<taskid>')

</id>

<title type="text">InputData</title>

<updated>2016-03-22T10:06:58.683+03:00</updated>

<category term="BPMTaskData.InputData" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>

<link href="InputData('<taskid>')" rel="edit" title="InputData"/>

<link href="InputData('<taskid>')/ContextTypeINPUT" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContextTypeINPUT" title="ContextTypeINPUT" type="application/atom+xml;type=entry"/>

<content type="application/xml">

<m:properties>

<d:EDM_Key><taskid></d:EDM_Key>

</m:properties>

</content>

</entry>

===========================

3. When i use the below URL, i get the below error. I Checked logs and it says Property not found

http://hostname:port/bpmodata/taskdata.svc/<taskid>/InputData('<taskid>')?$expand=Context_RequestInfo

======

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code/>

<message xml:lang="en-US">

An error occured. 404 Not Found. Log ID: C0000A407EAA111100000000005300B8

</message>

</error>

=========

Log message

=====================

[EXCEPTION]

com.sap.core.odata.api.exception.ODataApplicationException: Could not find property with name: 'Context_RequestInfo'.

at com.sap.bpm.odata.logging.BPMODataErrorCallback.getExceptionForTracing(BPMODataErrorCallback.java:128)

at com.sap.bpm.odata.logging.BPMODataErrorCallback.handleError(BPMODataErrorCallback.java:9

=================

I am trying to read Context_RequestInfo details like "id" and "status". Details of the entity is mentioned above.

Looking forward to your comments/solutions.

Thanks

Senthil

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I think that it is incorrect to set Entity name in "expand". (Context_RequestInfo is Entity name.)
Entity is not data, please set "Collection" name.

You may check collection name by access to

http://hostname:port/bpmodata/taskdata.svc/

Thanks.

Tsuyoshi

Former Member
0 Kudos

Dear Tsuyoshi,

I am not able to find the collection from metadata output. Please find the attached metadata output XML, let me know the name i should use it in EXPAND.

I want to read id and status from RequestInfo.

Thanks

Senthil

0 Kudos

Dear Senthil,

I have not used BPM Odata Service.
So my answer is about general odata issue.

I checked metadata, collection(entityset) "Context_RequestInfo" is exist.
Can you access http://hostname:port/bpmodata/taskdata.svc/<taskid>/Context_RequestInfo  ?

Or can you access http://hostname:port/bpmodata/taskdata.svc/<taskid>/Context_RequestInfo('<taskid>') ?

Thanks.

Tsuyoshi

Former Member
0 Kudos

Dear Tsuyoshi,

I get the below error when i access

http://hostname:port/bpmodata/taskdata.svc/<taskid>/Context_RequestInfo 

An error occured. 500 Internal Server Error. Log ID: C0000A407EAA044E0000000000810086

I get the same error when i access

http://hostname:port/bpmodata/taskdata.svc/<taskid>/Context_RequestInfo('<taskid>') ?


Checked Logs in LogViewer...

===

[EXCEPTION]

com.sap.core.odata.api.exception.ODataApplicationException: There is no SDO DataObject for 'Context_RequestInfo' Entity Set.

at com.sap.bpm.odata.tm.BPMTaskDataODataSingleProcessor.getDataObjectForEntitySet(BPMTaskDataODataSingleProcessor.java:277

====



Thanks

Senthil


0 Kudos

Dear Senthil

Thank you for your confirmation.

It seems this issue is caused on BPM side.

So, it is better to post this issue to BPM forum with your confirmation (There is no SDO DataObject for 'Context_RequestInfo' Entity Set).

Thanks.

Tsuyoshi

Former Member
0 Kudos

Before posting in this forum, i posted there as well. Now i have updated that post and looking for responses.

Thanks
Senthil