Skip to Content

How to fetch InstanceID from TASKGATEWAY service?

Sep 18, 2017 at 10:19 AM


avatar image

Hi Experts,

I'm trying to fetch the value of InstanceID in Taskgateway service but I don't know what values to pass to the request URI. Is there any way that I can get the value of InstanceID from the request URI without passing values for any other properties?
Once I get the value of InstanceID, I've to pass that to the TaskCollection entityset which will fetch all other details.

I've searched for solutions in other blogs and discussions but still no luck. Can anyone help me?

Thanks in advance :)


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sreehari Patnaik Sep 19, 2017 at 04:07 PM

Got it !!!

Please try any of the below request URIs.

1) /sap/opu/odata/IWPGW/TASKPROCESSING;v=2/TaskCollection?$value

2) /sap/opu/odata/IWPGW/TASKPROCESSING;v=2/TaskCollection?$top

These will fetch all the details of the entityset TaskCollection. 1) It will fetch details of all the workitems 2) will fetch details of only the top/first workitem. Either way you'll get the value of InstanceID for your UT cases.

But please make sure that you are running these URIs (Login to Gateway system) with the same ID (User) to which the workitems are assigned in workflow. I was trying the same with the wrong ID while posting this question. ;)

I know that this can be a bit silly for many of you but for beginners like me it may come handy. :)


10 |10000 characters needed characters left characters exceeded